diff options
Diffstat (limited to 'trunk')
-rw-r--r-- | trunk/lib/common.sh | 2 | ||||
-rw-r--r-- | trunk/src/createpkg | 16 |
2 files changed, 16 insertions, 2 deletions
diff --git a/trunk/lib/common.sh b/trunk/lib/common.sh index 5b69772..0e70572 100644 --- a/trunk/lib/common.sh +++ b/trunk/lib/common.sh @@ -799,6 +799,8 @@ function update_md5_checksum { cat CHECKSUMS.md5 | gzip -9 -c - > CHECKSUMS.md5.gz + echo "Updated CHECKSUMS.md5" + svn_add CHECKSUMS.md5 svn_add CHECKSUMS.md5.gz diff --git a/trunk/src/createpkg b/trunk/src/createpkg index 2db3269..a511e2f 100644 --- a/trunk/src/createpkg +++ b/trunk/src/createpkg @@ -534,6 +534,16 @@ fi # Remove old packages from repository tree if [ $REMOVE_OLD_PACKAGE -eq $on ]; then + # first remove entries from CHECKSUMS.md5 + if [ -f "$MAKEPKG_REPOS/CHECKSUMS.md5" ]; then + sed -i "/$PACKAGE-.*-.*-.*.*$/d" $MAKEPKG_REPOS/CHECKSUMS.md5 + fi + + # then remove entries from patches/CHECKSUMS.md5 + if [ -f "$MAKEPKG_REPOS/patches/CHECKSUMS.md5" ]; then + sed -i "/$PACKAGE-.*-.*-.*.*$/d" $MAKEPKG_REPOS/patches/CHECKSUMS.md5 + fi + # Using subversion if [ -d "$MAKEPKG_REPOS/.svn" ]; then @@ -544,12 +554,13 @@ if [ $REMOVE_OLD_PACKAGE -eq $on ]; then PACKAGE_ARCH="`package_arch $PKG_NAME`" PACKAGE_BUILD="`package_build $PKG_NAME`" + # Using -mindepth 2 so it doesn't delete the new package for file in `find . -mindepth 2 -name "$PACKAGE-*-*-*.*"`; do if svn_check $file; then # Just delete packages with different arch, version or build number if [ "`package_version $file`" != "$PACKAGE_VERSION" ] || \ - [ "`package_arch $file`" != "$PACKAGE_ARCH" ] || \ - [ "`package_build $file`" != "$PACKAGE_BUILD" ]; then + [ "`package_arch $file`" != "$PACKAGE_ARCH" ] || \ + [ "`package_build $file`" != "$PACKAGE_BUILD" ]; then svn del --force $file fi else @@ -572,6 +583,7 @@ if [ $REMOVE_OLD_PACKAGE -eq $on ]; then cd $cwd else + # Using -mindepth 2 so it doesn't delete the new package find $MAKEPKG_REPOS -mindepth 2 -name "$PACKAGE-*-*-*.*" -exec rm {} 2>/dev/null \; find $MAKEPKG_REPOS -name "$PACKAGE.slack-required" -exec rm {} 2>/dev/null \; fi |