From 277c01e56e42977c01a1fe709cfe2130bf177ac2 Mon Sep 17 00:00:00 2001 From: Aaron Griffin Date: Fri, 13 Feb 2009 12:09:46 -0800 Subject: Correct the sourceball removal step Only remove sourceballs that do NOT exist in any repo This code is experimental Signed-off-by: Aaron Griffin --- db-functions | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'db-functions') diff --git a/db-functions b/db-functions index a2e2f72..c105dab 100644 --- a/db-functions +++ b/db-functions @@ -66,6 +66,17 @@ getpkgname() { echo ${tmp%-*-*} } +# Get the pkgver-pkgrel of this package +getpkgver() { + local tmp + + tmp=${1##*/} + tmp=${tmp%$PKGEXT} + tmp=${tmp%$SRCEXT} + tmp=${tmp%-$CARCH} + echo $tmp | sed 's|.*-\(.*-.*\)$|\1|g' +} + check_pkg_arch () { #check_pkg_arch pkgfile arch local arch _arch="$(/usr/bin/bsdtar -xOf "$1" .PKGINFO | /bin/grep "^arch" | /bin/sed 's|\w*\s*=\s*\(.*\)|\1|')" -- cgit v1.2.3-24-g4f1b