Skip to content

Commit

Permalink
Refactorize and quote package when getting deps of package
Browse files Browse the repository at this point in the history
  • Loading branch information
mudler committed Jul 29, 2017
1 parent 5c927a2 commit 928d6da
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions builder
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ sub package_deps {

if ( !exists $package_dep_cache{$cache_key} ) {
my @dependencies =
qx/equery -C -q g --depth=$depth $package/; #depth=0 it's all
qx/equery -C -q g --depth=$depth '$package'/; #depth=0 it's all
chomp @dependencies;

# If an unversioned atom is given, equery returns results for all versions in the portage tree
Expand Down Expand Up @@ -245,12 +245,7 @@ sub abs_atom { atom; s/^(\<|\>|=)+// }
# Same again as a function
sub to_atom { my $p = shift; local $_ = $p; atom; return $_; }

sub to_abs_atom {
my $p = shift;
$p = to_atom($p);
$p =~ s/^(\<|\>|=)+//;
return $p;
}
sub to_abs_atom { my $p = shift; local $_ = $p; abs_atom; return $_; }

# Input: Array
# Output: array with unique elements
Expand Down

0 comments on commit 928d6da

Please sign in to comment.