aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-11-27 20:50:48 +0000
committerrhatto <rhatto@04377dda-e619-0410-9926-eae83683ac58>2008-11-27 20:50:48 +0000
commit4e04db42916e6b5bce711e17ae11ca2f65c4a523 (patch)
treee184bef2792a52cd28bacd8064bbaa7103495c70
parentf9c53d45050654728770c8e3a121c66fdeb90460 (diff)
downloadsimplepkg-4e04db42916e6b5bce711e17ae11ca2f65c4a523.tar.gz
simplepkg-4e04db42916e6b5bce711e17ae11ca2f65c4a523.tar.bz2
more repo improvements
git-svn-id: svn+slack://slack.fluxo.info/var/svn/simplepkg@557 04377dda-e619-0410-9926-eae83683ac58
-rw-r--r--trunk/lib/common.sh2
-rw-r--r--trunk/src/createpkg16
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