pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/55713: sysutils/sysupgrade: Use ARCHIVE_EXTENSION in clean command as well
>Number: 55713
>Category: pkg
>Synopsis: sysutils/sysupgrade: Use ARCHIVE_EXTENSION in clean command as well
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Oct 10 15:45:00 +0000 2020
>Originator: Sunil Nimmagadda
>Release: pkgsrc-2020Q3
>Organization:
>Environment:
NetBSD somehost 9.99.73 NetBSD 9.99.73 (GENERIC) #0: Thu Oct 8 16:00:09 UTC 2020 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
>Description:
The clean command still uses a glob (*gz*) with rm(1) which fails to remove sets when ARCHIVE_EXTENSION is set to "tar.xz". Subsequent 'sysupgrade auto' command sees these stale sets in /var/cache/sysupgrade and wouldn't download the latest sets from RELEASEDIR.
>How-To-Repeat:
# sysupgrade auto
...
sysupgrade: I: Cleaning downloaded files
$ ls /var/cache/sysupgrade
base.tar.xz etc.tar.xz man.tar.xz modules.tar.xz tests.tar.xz xbase.tar.xz xetc.tar.xz xserver.tar.xz
comp.tar.xz games.tar.xz misc.tar.xz rescue.tar.xz text.tar.xz xcomp.tar.xz xfont.tar.xz
# sysupgrade clean
sysupgrade: I: Cleaning downloaded files
# ls /var/cache/sysupgrade
base.tar.xz etc.tar.xz man.tar.xz modules.tar.xz tests.tar.xz xbase.tar.xz xetc.tar.xz xserver.tar.xz
comp.tar.xz games.tar.xz misc.tar.xz rescue.tar.xz text.tar.xz xcomp.tar.xz xfont.tar.xz
# sysupgrade auto
sysupgrade: I: Starting auto-update with stages: fetch modules kernel sets etcupdate postinstall clean
sysupgrade: W: Reusing existing /var/cache/sysupgrade/base.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/comp.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/etc.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/games.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/man.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/misc.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/modules.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/rescue.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/tests.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/text.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/xbase.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/xcomp.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/xetc.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/xfont.tar.xz
sysupgrade: W: Reusing existing /var/cache/sysupgrade/xserver.tar.xz
...
>Fix:
diff --git a/sysutils/sysupgrade/distinfo b/sysutils/sysupgrade/distinfo
--- a/sysutils/sysupgrade/distinfo
+++ b/sysutils/sysupgrade/distinfo
@@ -6,4 +6,4 @@
Size (sysupgrade-1.5.tar.gz) = 75833 bytes
SHA1 (patch-default.conf) = ff367ebbdc56e1009a57a8bd254c424033257726
SHA1 (patch-sysupgrade.conf.5.in) = dfe5d90d0360212ea052f2e25a26820ad277480b
-SHA1 (patch-sysupgrade.sh) = e84a8ea01fca16734206a864b0a51f38c27489a8
+SHA1 (patch-sysupgrade.sh) = 35f0197f16bd0824fbbe39894870f0e38e963fa2
diff --git a/sysutils/sysupgrade/patches/patch-sysupgrade.sh b/sysutils/sysupgrade/patches/patch-sysupgrade.sh
--- a/sysutils/sysupgrade/patches/patch-sysupgrade.sh
+++ b/sysutils/sysupgrade/patches/patch-sysupgrade.sh
@@ -133,3 +133,12 @@
done
shtk_cli_info "Performing postinstall checks"
+@@ -412,7 +429,7 @@ sysupgrade_clean() {
+ [ ${#} -eq 0 ] || shtk_cli_usage_error "clean does not take any arguments"
+
+ shtk_cli_info "Cleaning downloaded files"
+- rm -f "$(shtk_config_get CACHEDIR)"/*.*gz*
++ rm -f "$(shtk_config_get CACHEDIR)"/*."$(shtk_config_get ARCHIVE_EXTENSION)"
+ }
+
+
Home |
Main Index |
Thread Index |
Old Index