summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xcommitpkg20
-rwxr-xr-xfinddeps7
2 files changed, 24 insertions, 3 deletions
diff --git a/commitpkg b/commitpkg
index f50c607..37faba7 100755
--- a/commitpkg
+++ b/commitpkg
@@ -17,6 +17,19 @@ getpkgfile() {
echo ${1}
}
+##
+# usage : get_full_version( $epoch, $pkgver, $pkgrel )
+# return : full version spec, including epoch (if necessary), pkgver, pkgrel
+##
+get_full_version() {
+ if [[ $1 -eq 0 ]]; then
+ # zero epoch case, don't include it in version
+ echo $2-$3
+ else
+ echo $1:$2-$3
+ fi
+}
+
# Source makepkg.conf; fail if it is not found
if [ -r '/etc/makepkg.conf' ]; then
source '/etc/makepkg.conf'
@@ -108,8 +121,9 @@ echo 'done'
for _arch in ${arch[@]}; do
for _pkgname in ${pkgname[@]}; do
- pkgfile=$(getpkgfile "$_pkgname-$pkgver-$pkgrel-${_arch}".pkg.tar.* 2>/dev/null)
- pkgdestfile=$(getpkgfile "$PKGDEST/$_pkgname-$pkgver-$pkgrel-${_arch}".pkg.tar.* 2>/dev/null)
+ fullver=$(get_full_version ${epoch:-0} $pkgver $pkgrel)
+ pkgfile=$(getpkgfile "$_pkgname-$fullver-${_arch}".pkg.tar.* 2>/dev/null)
+ pkgdestfile=$(getpkgfile "$PKGDEST/$_pkgname-$fullver-${_arch}".pkg.tar.* 2>/dev/null)
if [ ! -f "$pkgfile" -a -f "$pkgdestfile" ]; then
pkgfile="$pkgdestfile"
@@ -119,7 +133,7 @@ for _arch in ${arch[@]}; do
fi
echo -n 'uploading '
- rsync -p --chmod 'ug=rw,o=r' -c -h -L --progress $rsyncopts --partial "${pkgfile}" -e ssh "$server:staging/$repo/${pkgfile##*/}" || abort
+ rsync -p --chmod 'ug=rw,o=r' -c -h -L --progress $rsyncopts --partial "./${pkgfile}" -e ssh "$server:staging/$repo/${pkgfile##*/}" || abort
done
archrelease $repo-${_arch} || abort
done
diff --git a/finddeps b/finddeps
index 5f1a808..ded7a93 100755
--- a/finddeps
+++ b/finddeps
@@ -34,6 +34,13 @@ for d in $(find . -type d); do
echo "$d (makedepends)"
fi
done
+ for dep in "${optdepends[@]/:*}"; do
+ # lose the version comaparator, if any
+ depname=${dep%%[<>=]*}
+ if [ "$depname" = "$match" ]; then
+ echo "$d (optdepends)"
+ fi
+ done
fi
cd $tld
done