summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Ismael Haase Hernández <hahj87@gmail.com>2012-02-06 09:46:21 -0600
committerJoshua Ismael Haase Hernández <hahj87@gmail.com>2012-02-06 09:53:01 -0600
commit5fe233209d9db31cc176edbcc76f9fe801c5eba0 (patch)
tree69f825406627005ace3c7884515f5ed2d3c9246d
parentc5d7675fa4de40514deda2757cd027bb4870424e (diff)
librechroot: -r option creates empty repo
librerelease: exit with error if signing fails
-rwxr-xr-x[-rw-r--r--]fullpkg-find0
-rwxr-xr-xlibrechroot6
-rwxr-xr-xlibrerelease9
3 files changed, 12 insertions, 3 deletions
diff --git a/fullpkg-find b/fullpkg-find
index 8c0c063..8c0c063 100644..100755
--- a/fullpkg-find
+++ b/fullpkg-find
diff --git a/librechroot b/librechroot
index 31516ac..dfeabb0 100755
--- a/librechroot
+++ b/librechroot
@@ -83,8 +83,12 @@ EOF
function clean_repo {
msg "Cleaning repo for chroot: ${CHROOTDIR}/${CHROOTNAME}"
if [ -d "${CHROOTDIR}/${CHROOTNAME}/repo" ]; then
- rm -rf "${CHROOTDIR}/${CHROOTNAME}/repo"
+ find "${CHROOTDIR}/${CHROOTNAME}/repo/" -mindepth 1 -delete
+ else
+ mkdir -p "${CHROOTDIR}/${CHROOTNAME}/repo"
fi
+ bsdtar -czf "${CHROOTDIR}/${CHROOTNAME}/repo/repo.db.tar.gz" -T /dev/null
+ ln -s "repo.db.tar.gz" "${CHROOTDIR}/${CHROOTNAME}/repo/repo.db"
}
source /etc/libretools.conf
diff --git a/librerelease b/librerelease
index f31bc3a..3021393 100755
--- a/librerelease
+++ b/librerelease
@@ -72,7 +72,12 @@ function sign_packages {
fi
msg2 "Signing ${package}..."
- gpg --default-key "${SIGID}" --output "${package}${SIGEXT}" --detach-sig "${package}"
+ gpg --default-key "${SIGID}" --output "${package}${SIGEXT}" \
+ --detach-sig "${package}" || {
+ error "Signing failed"
+ exit 2
+ }
+
done
}
@@ -110,7 +115,7 @@ done
clean_non_packages
if [ ! -z "${SIGID}" ]; then
sign_packages
-else
+else
error "Package signing is *required*"
exit 1
fi