Skip to content

Commit 928d6da

Browse files
committed
Refactorize and quote package when getting deps of package
1 parent 5c927a2 commit 928d6da

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

builder

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ sub package_deps {
149149

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

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

248-
sub to_abs_atom {
249-
my $p = shift;
250-
$p = to_atom($p);
251-
$p =~ s/^(\<|\>|=)+//;
252-
return $p;
253-
}
248+
sub to_abs_atom { my $p = shift; local $_ = $p; abs_atom; return $_; }
254249

255250
# Input: Array
256251
# Output: array with unique elements

0 commit comments

Comments
 (0)