aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/ipkg-remove
diff options
context:
space:
mode:
authorJo-Philipp Wich <jo@mein.io>2019-01-21 16:35:40 +0100
committerJo-Philipp Wich <jo@mein.io>2019-01-21 16:35:40 +0100
commit8c9b182db63fb8be6906cdf8df84e58c9c9daae7 (patch)
tree3d89309fde1889b961c7b9a05e86171e0432aeca /scripts/ipkg-remove
parent3fe555c719d0898b15e0f1bb4230191f544e479b (diff)
downloadupstream-8c9b182db63fb8be6906cdf8df84e58c9c9daae7.tar.gz
upstream-8c9b182db63fb8be6906cdf8df84e58c9c9daae7.tar.bz2
upstream-8c9b182db63fb8be6906cdf8df84e58c9c9daae7.zip
scripts: ipkg-remove: handle existing .ipk files without SourceName field
Package archives built before commit e6bcf1e4ac ("build: add ABI_VERSION to binary package names") lack the SourceName control file field which caused ipkg-remove to skip such archives. Add fallback code that matches the files by their basename followed by an underscore, similar to how the old cleanup code worked. Fixes: #2067 Signed-off-by: Jo-Philipp Wich <jo@mein.io>
Diffstat (limited to 'scripts/ipkg-remove')
-rwxr-xr-xscripts/ipkg-remove5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/ipkg-remove b/scripts/ipkg-remove
index c0e0ec880f..f4957004c0 100755
--- a/scripts/ipkg-remove
+++ b/scripts/ipkg-remove
@@ -10,6 +10,11 @@ for pkg in "$@"; do
break
fi
done
+ case "$pkg" in
+ */"${sourcename}_"*.ipk)
+ rm -vf "$pkg"
+ ;;
+ esac
done
exit 0