Skip to content

Commit

Permalink
fix minor issue about package finder
Browse files Browse the repository at this point in the history
  • Loading branch information
sulincix committed May 30, 2024
1 parent effa2ac commit df0cdc3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 5 additions & 2 deletions src/data/dependency.vala
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ private array cache_list;

private bool ignore_missing;
private bool reinstall;
private string parent;
private bool ignore_dependency;
private int max_depth = -1;
private bool unsafe;
Expand Down Expand Up @@ -60,7 +61,7 @@ private static void resolve_process (string[] names) {
pkg = get_installed_package (name);
}
}else {
string errmsg = _ ("Package is not installable: %s").printf (name);
string errmsg = _ ("Package is not installable: %s Required by %s").printf (name, parent);
if (!ignore_missing) {
error_add (errmsg);
} else {
Expand All @@ -77,6 +78,7 @@ private static void resolve_process (string[] names) {
if (!ignore_dependency) {
// run recursive function
depth += 1;
parent=name;
resolve_process (pkg.dependencies);
depth -= 1;
}
Expand Down Expand Up @@ -232,12 +234,13 @@ public string[] resolve_dependencies (string[] names) {
if (max_depth <= 0) {
max_depth = 1000000;
}

// reset need list
need_install = new array ();
// reset cache list
cache_list = new array ();
depth=0;
parent = "";
resolve_process (names);
error (3);
return need_install.get ();
Expand Down
4 changes: 2 additions & 2 deletions src/data/repository.vala
Original file line number Diff line number Diff line change
Expand Up @@ -170,9 +170,9 @@ public bool is_available_source (string name) {
//DOC: return true if package/source is available
public bool is_available_from_repository (string name) {
if (get_bool ("no-emerge")) {
return is_available_source (name);
}else {
return is_available_package (name);
}else {
return is_available_source (name);
}
}

Expand Down

0 comments on commit df0cdc3

Please sign in to comment.