]> gitweb.fluxo.info Git - simplepkg.git/commitdiff
createpkg: deleting duplicated packages in different folders
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Fri, 28 Nov 2008 18:54:13 +0000 (18:54 +0000)
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>
Fri, 28 Nov 2008 18:54:13 +0000 (18:54 +0000)
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@609 04377dda-e619-0410-9926-eae83683ac58

trunk/src/createpkg

index aae327a336f69c1a53a358792eecca5ab786fbf4..c6df151e350eb755c12609bea95676d8c14fa3d0 100644 (file)
@@ -376,10 +376,11 @@ function remove_old_package_data {
       # Using -mindepth 2 so it doesn't delete the new PACKAGE
       for file in `find . -mindepth 2 -name "$PACKAGE-*-*-*.tgz" -o -name "$PACKAGE-*-*-*.meta"`; do
         candidate="`echo $file | sed -e 's/\.meta/\.tgz/'`" # otherwise PACKAGE info functions can fail
-        # Just delete packages with different arch, version or build number
+        # Just delete packages with different arch, version, build number or folder
         if [ "`package_version $candidate`" != "$PACKAGE_VERSION" ] || \
            [ "`package_arch $candidate`" != "$PACKAGE_ARCH" ] || \
-           [ "`package_build $candidate`" != "$PACKAGE_BUILD" ]; then
+           [ "`package_build $candidate`" != "$PACKAGE_BUILD" ] || \
+           [ "`dirname $candidate`" != "`dirname $makepkg_repos/$SUBFOLDER/$PKG_NAME`" ]; then
           svn_del $file
         fi
       done