From 0c1bc1c8f12666e6d7b9246d8770ed92d50d9eba Mon Sep 17 00:00:00 2001 From: slakmagik Date: Tue, 15 Mar 2011 20:46:08 +0000 Subject: [PATCH] correct parameter expansion in get_source_names() The assignment to SRCNAME was trying to cut out the longest match of '%/download' rather than cutting off '/download'. The notable practical effect was not recognizing that we had a source in the cache, since foo.tar.gz/download != foo.tar.gz, so downloading it again. (Again, I wonder how this could have ever gotten through testing and, again, I feel like this sort of botched parameter expansion has happened before, but can't find it in the vcs.) --- src/usr/sbin/sbopkg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/usr/sbin/sbopkg b/src/usr/sbin/sbopkg index aaa8f2e..30cb0c4 100755 --- a/src/usr/sbin/sbopkg +++ b/src/usr/sbin/sbopkg @@ -2775,7 +2775,7 @@ get_source_names() { # remove the '/download' from several SRCNAMEs that end that way # rather than in the actual tarball so the subsequent basename doesn't # end with 'download' - SRCNAME=${DL//%\/download} + SRCNAME=${DL%\/download} SRCNAME=${SRCNAME##*/} # calcurse has a nonsense url in the info file - this is to get it # through this function and on to remove_obsolete_sources()