summaryrefslogtreecommitdiffstats
path: root/dselect/methods/ftp/install.pl
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:40:30 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-15 18:40:30 +0000
commit396478fcc2ed755e02e2573c8be89e9a98aec512 (patch)
tree5f3b06ddc745429831d93323182288ade533804f /dselect/methods/ftp/install.pl
parentAdding debian version 1.22.4. (diff)
downloaddpkg-396478fcc2ed755e02e2573c8be89e9a98aec512.tar.xz
dpkg-396478fcc2ed755e02e2573c8be89e9a98aec512.zip
Merging upstream version 1.22.5.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'dselect/methods/ftp/install.pl')
-rwxr-xr-xdselect/methods/ftp/install.pl30
1 files changed, 13 insertions, 17 deletions
diff --git a/dselect/methods/ftp/install.pl b/dselect/methods/ftp/install.pl
index ea6ea71..75647bd 100755
--- a/dselect/methods/ftp/install.pl
+++ b/dselect/methods/ftp/install.pl
@@ -297,16 +297,14 @@ if($totsize == 0) {
if ($rsize + $totsize > $avsp) {
print "no room for: $fn\n";
delete $downloads{$fn};
- } else {
- if(yesno($def, $downloads{$fn}
- ? "download: $fn ${rsize}k/${csize}k (total = ${totsize}k)"
- : "download: $fn ${rsize}k (total = ${totsize}k)")) {
- $def = 'y';
- $totsize += $rsize;
- } else {
- $def = 'n';
- delete $downloads{$fn};
- }
+ } elsif (yesno($def, $downloads{$fn}
+ ? "download: $fn ${rsize}k/${csize}k (total = ${totsize}k)"
+ : "download: $fn ${rsize}k (total = ${totsize}k)")) {
+ $def = 'y';
+ $totsize += $rsize;
+ } else {
+ $def = 'n';
+ delete $downloads{$fn};
}
}
}
@@ -588,13 +586,11 @@ sub removeinstalled {
my($pkg, $ver) = getdebinfo($fn);
if(!defined($pkg) || !defined($ver)) {
print "Could not get info for: $dir/$fn\n";
- } else {
- if ($curpkgs{$pkg} and dcmpvers($ver, 'le', $curpkgs{$pkg})) {
- print "deleting: $dir/$fn\n";
- unlink $fn;
- } else {
- print "leaving: $dir/$fn\n";
- }
+ } elsif ($curpkgs{$pkg} and dcmpvers($ver, 'le', $curpkgs{$pkg})) {
+ print "deleting: $dir/$fn\n";
+ unlink $fn;
+ } else {
+ print "leaving: $dir/$fn\n";
}
} else {
print "non-debian: $dir/$fn\n";