]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
more repo improvements
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 27 Nov 2008 20:50:48 +0000 (20:50 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Thu, 27 Nov 2008 20:50:48 +0000 (20:50 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@557 04377dda-e619-0410-9926-eae83683ac58

trunk/lib/common.sh
trunk/src/createpkg

index 5b697722c75791ab803dcdfa6386a4d9694f96c6..0e70572d880b8c484886841f48b9a9280f1db707 100644 (file)
@@ -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
 
index 2db32696d517d4924d24e465384d074ac5eacaff..a511e2f5221d12c92121d1360c4151b086833715 100644 (file)
@@ -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