From 0691b6632e612818c52dbecfd2635fd954d42e23 Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Tue, 21 Jul 2009 19:19:22 +0200 Subject: add support for split packages to db-remove Signed-off-by: Aaron Griffin --- db-remove | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'db-remove') diff --git a/db-remove b/db-remove index 4763f3d..621154d 100755 --- a/db-remove +++ b/db-remove @@ -1,7 +1,7 @@ #!/bin/bash if [ $# -ne 3 ]; then - echo "usage: $(basename $0) " + echo "usage: $(basename $0) " exit 1 fi @@ -9,7 +9,7 @@ fi source_makepkg -packagename="$1" +packagebase="$1" reponame="$2" arch="$3" @@ -49,17 +49,23 @@ repo_lock $reponame $arch /bin/mkdir -p "$WORKDIR" -echo "==> Removing package '$packagename' from '$reponame'..." >&2 +echo "==> Removing package '$packagebase' from '$reponame'..." >&2 cd "$WORKDIR" /usr/bin/svn checkout -N $svnpath checkout cd checkout -/usr/bin/svn up -q $packagename -if [ -d "$packagename/repos/$svnrepo" ]; then +/usr/bin/svn up -q $packagebase +if [ -d "$packagebase/repos/$svnrepo" ]; then echo " Removing from subversion" - /usr/bin/svn rm --force -q "$packagename/repos/$svnrepo" - /usr/bin/svn commit -q -m "$(basename $0): $packagename removed by $(id -un)" + . "$packagebase/repos/$svnrepo/$BUILDSCRIPT" + /usr/bin/svn rm --force -q "$packagebase/repos/$svnrepo" + /usr/bin/svn commit -q -m "$(basename $0): $packagebase removed by $(id -un)" +else + echo " Warning: $packagebase not found in $svnrepo" + echo " Removing split packages is not supported" + echo " You need to specify each sub package instead" + pkgname=$packagebase fi cd "$WORKDIR" @@ -82,7 +88,7 @@ for architecture in $arches; do echo " Removing from $reponame DB file ($architecture)" cd build/ - /usr/bin/repo-remove -q "$reponame.db.tar.$DB_COMPRESSION" $packagename + /usr/bin/repo-remove -q "$reponame.db.tar.$DB_COMPRESSION" ${pkgname[@]} /bin/mv "$reponame.db.tar.$DB_COMPRESSION" "$ftppath/$architecture" -- cgit v1.2.3-24-g4f1b