Skip to content

Commit

Permalink
when using -l/-L do print the package list only for all types of inst…
Browse files Browse the repository at this point in the history
…all commands.

@known is collecting package names inside the loop, print them after the loop
  • Loading branch information
Thomas Lange committed Nov 5, 2017
1 parent f8ae277 commit b8b9ff1
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions bin/install_packages
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,14 @@ foreach $atype (@commands) {
mkpackagelist(@{$list{$atype}}); # create lists of known and unknown packages
getsources(); # retrieve sources
if ($opt_l) {
# only print the package list
print join ' ',@known,"\n";
exit 0;
next;
}
if ($opt_L) {
# only print the package list
execute("$rootcmd $command{'inst-internal'} @known | egrep ^Inst");
exit 0;
next;
}

# pass only maxpl packages to apt-get
while (@known) {
my $shortlist = join(' ', splice @known,0,$maxpl);
Expand Down Expand Up @@ -231,6 +230,13 @@ foreach $atype (@commands) {
# - - - - - - - - - - - - - - - - - - - - - - - - - - -
# end of the big foreach loop
# - - - - - - - - - - - - - - - - - - - - - - - - - - -
if ($opt_L) {
exit 0;
}
if ($opt_l) {
print join ' ',@known,"\n";
exit 0;
}

# remove preloaded files
foreach my $entry (@preloadrmlist) {
Expand Down

0 comments on commit b8b9ff1

Please sign in to comment.