Forráskód Böngészése

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 <[email protected]>
Jo-Philipp Wich 6 éve
szülő
commit
8c9b182db6
1 módosított fájl, 5 hozzáadás és 0 törlés
  1. 5 0
      scripts/ipkg-remove

+ 5 - 0
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