diff options
author | Dan McGee <dan@archlinux.org> | 2009-08-24 13:22:12 -0500 |
---|---|---|
committer | Dan McGee <dan@archlinux.org> | 2011-03-22 23:52:00 -0500 |
commit | 82e22596d8bfeac89e96d8b2d9eda8e13e14880c (patch) | |
tree | d8456748c92bbef3e2b013916a8564f8c1eaa129 /scripts/makepkg.sh.in | |
parent | ee34869e8934fe55562a84c4eac055256b7c42f0 (diff) | |
download | pacman-82e22596d8bfeac89e96d8b2d9eda8e13e14880c.tar.xz |
makepkg: allow signatures to work with split packages
Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'scripts/makepkg.sh.in')
-rw-r--r-- | scripts/makepkg.sh.in | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in index f28097f6..5d6363f0 100644 --- a/scripts/makepkg.sh.in +++ b/scripts/makepkg.sh.in @@ -1068,6 +1068,9 @@ create_package() { local pkg_file="$PKGDEST/${nameofpkg}-${fullver}-${PKGARCH}${PKGEXT}" local ret=0 + [[ -f $pkg_file ]] && rm -f "$pkg_file" + [[ -f $pkg_file.sig ]] && rm -f "$pkg_file.sig" + # when fileglobbing, we want * in an empty directory to expand to # the null string rather than itself shopt -s nullglob @@ -1097,6 +1100,8 @@ create_package() { if (( ret )); then warning "$(gettext "Failed to create symlink to package file.")" fi + + create_signature "$pkg_file" } create_signature() { @@ -1104,15 +1109,15 @@ create_signature() { return fi local ret=0 - local filename="$PKGDEST/${pkgname}-${pkgver}-${pkgrel}-${CARCH}${PKGEXT}" + local filename="$1" msg "$(gettext "Signing package...")" if [ ! $(type -p "gpg") ]; then error "$(gettext "Cannot find the gpg binary! Is gnupg installed?")" exit 1 # $E_MISSING_PROGRAM fi - gpg --detach-sign --use-agent $filename || ret=$? + gpg --detach-sign --use-agent "$filename" || ret=$? if (( ! ret )); then - msg2 "$(gettext "Created signature file %s.")" $filename.sig + msg2 "$(gettext "Created signature file %s.")" "$filename.sig" else warning "$(gettext "Failed to sign package file.")" fi @@ -2134,8 +2139,6 @@ fi fullver=$(get_full_version $epoch $pkgver $pkgrel) msg "$(gettext "Finished making: %s")" "$pkgbase $fullver ($(date))" -create_signature - install_package exit 0 #E_OK |