diff options
author | Thomas Penteker <tek@serverop.de> | 2016-04-02 23:11:47 +0200 |
---|---|---|
committer | Thomas Penteker <tek@serverop.de> | 2016-04-02 23:11:47 +0200 |
commit | 1286051d5a1a79be795185117ec9cdc7ea868f82 (patch) | |
tree | e05f0482151a2ea182b7969fb3db468ff232af89 | |
parent | b33658886e3b27db0740080f2bd89258e89f20d5 (diff) | |
download | pkgutils-1286051d5a1a79be795185117ec9cdc7ea868f82.tar.gz pkgutils-1286051d5a1a79be795185117ec9cdc7ea868f82.tar.xz |
implement proper fallback with/without PKGMK_IGNORE_MD5SUM and PKGMK_IGNORE_SIGNATURE
-rwxr-xr-x | pkgmk.in | 12 |
1 files changed, 9 insertions, 3 deletions
@@ -292,6 +292,12 @@ check_signature() { local RESULT=0 local PUBKEY="" + # fall back to m5sums if no signature is available + if [ ! -e "$PKGMK_ROOT/$PKGMK_SIGNATURE" ] && [ "$PKGMK_IGNORE_MD5SUM" = "no" ]; then + warning "Falling back to old md5sum checking." + return 0; + fi + cd $PKGMK_ROOT if [ -f $PKGMK_SIGNATURE ]; then @@ -501,13 +507,13 @@ make_work_dir() { remove_work_dir mkdir -p $SRC $PKG - if [ "$PKGMK_IGNORE_MD5SUM" = "no" ]; then - check_md5sum - fi if [ "$PKGMK_IGNORE_SIGNATURE" = "no" ]; then test -f $PKGMK_SIGNATURE && cp $PKGMK_SIGNATURE $PKGMK_WORK_DIR check_signature fi + if [ "$PKGMK_IGNORE_MD5SUM" = "no" ]; then + check_md5sum + fi } remove_work_dir() { |