aboutsummaryrefslogtreecommitdiff
path: root/gentoo
diff options
context:
space:
mode:
authorKenton Groombridge <concord@gentoo.org>2022-06-01 14:23:13 -0400
committerKenton Groombridge <concord@gentoo.org>2022-06-03 09:07:37 -0400
commit497edc4c920a2a01f91e5af51f118d21ef0b140a (patch)
tree05e4a045fc507f47f217cae099bc7401818e7c0c /gentoo
parentUpdate release-userspace script (diff)
downloadhardened-refpolicy-497edc4c920a2a01f91e5af51f118d21ef0b140a.tar.gz
hardened-refpolicy-497edc4c920a2a01f91e5af51f118d21ef0b140a.tar.bz2
hardened-refpolicy-497edc4c920a2a01f91e5af51f118d21ef0b140a.zip
Make release-userspace script prefer pkgdev
Use pkgdev and pkgcheck if they are available and fallback to repoman otherwise. Signed-off-by: Kenton Groombridge <concord@gentoo.org>
Diffstat (limited to 'gentoo')
-rw-r--r--gentoo/release-userspace.sh27
1 files changed, 22 insertions, 5 deletions
diff --git a/gentoo/release-userspace.sh b/gentoo/release-userspace.sh
index 93565f23..4b81d2fd 100644
--- a/gentoo/release-userspace.sh
+++ b/gentoo/release-userspace.sh
@@ -21,6 +21,9 @@ sys-apps/restorecond
# app-admin/setools not released together
# dev-python/sepolgen became selinux-python in 2.7 release
+SCAN="$(command -v pkgcheck || command -v repoman)"
+COMMIT="$(command -v pkgdev || command -v repoman)"
+
usage() {
echo "Usage: $0 <release date> <newversion>"
echo ""
@@ -51,6 +54,20 @@ die() {
exit 2
}
+# scan the tree for QA issues with pkgcheck or repoman
+doScan() {
+ if [[ "$(basename "${SCAN}")" == "pkgcheck" ]]; then
+ "${SCAN}" -q scan --staged
+ else
+ "${SCAN}" -q full
+ fi
+}
+
+# commit the current staged changes with pkgdev or repoman
+doCommit() {
+ "${COMMIT}" -q commit -m "${@}"
+}
+
# set the release date in the live ebuilds so it will be correct when copying to the new version
updateLiveEbuilds() {
local PKG
@@ -80,10 +97,10 @@ updateLiveEbuilds() {
# commit changes
git add "${PN}-9999.ebuild"
git --no-pager diff --cached
- repoman -q full
+ doScan
if [[ $? -eq 0 ]]
then
- repoman -q commit -m "$PKG: update live ebuild"
+ doCommit "$PKG: update live ebuild"
else
git reset -- .
fi
@@ -112,14 +129,14 @@ createEbuilds() {
sed -i -e "/${PN}-${NEWVERSION//_/-}/d" Manifest || die
cp ${PN}-9999.ebuild ${PN}-${NEWVERSION}.ebuild || die
- repoman -q manifest || die
+ "${COMMIT}" -q manifest || die
git add Manifest ${PN}-${NEWVERSION}.ebuild || die
#git --no-pager diff --cached
- repoman -q full
+ doScan
if [[ $? -eq 0 ]]
then
- repoman -q commit -m "$PKG: bump to ${NEWVERSION}" || die
+ doCommit "$PKG: bump to ${NEWVERSION}" || die
else
git reset -- . || die
fi