]> git.wh0rd.org Git - home.git/commitdiff
gentoo: update ebuild helpers
authorMike Frysinger <vapier@gentoo.org>
Wed, 4 May 2022 13:14:11 +0000 (09:14 -0400)
committerMike Frysinger <vapier@gentoo.org>
Wed, 4 May 2022 13:14:11 +0000 (09:14 -0400)
.profile.d/gentoo.sh

index 950260c749a7a455f8427a647ea201b38d061d87..8aac8e8528d73cbd3d631f00e66cfa14f1593833 100644 (file)
@@ -1,9 +1,13 @@
-alias ebuild-sync='rsync -av ./ /usr/portage/${PWD#/usr/local/src/gentoo/repo/gentoo/} --exclude ChangeLog --exclude CVS --exclude metadata.xml --delete'
-alias ebuild-emerge='sudo emerge -1av $(echo ${PWD} | awk -F/ "{printf \"%s/%s\", \$(NF-1), \$(NF)}")'
+alias ebuild-sync='rsync -av ./ /usr/portage/${PWD#/usr/local/src/gentoo/repo/gentoo/} --exclude ChangeLog --exclude metadata.xml --delete'
 alias ekeyword='ekeyword -v -q'
 alias repoman='repoman -q -q'
 alias rf='/usr/local/src/gentoo/portage/repoman/bin/repoman.git -q full'
 
+ebuild-emerge() {
+       sudo -E emerge -1av "$@" \
+               $(echo "${PWD}" | awk -F/ "{printf \"%s/%s\", \$(NF-1), \$(NF)}")
+}
+
 _echangelog() {
        [[ ! -e ChangeLog ]] \
                && echo "No ChangeLog" \
@@ -107,16 +111,16 @@ submit_bug_stable() {
                -d "${msg}" \
                -a "${maintainer}" \
                --cc="${cc// /,}" \
-               -k STABLEREQ \
                --product='Gentoo Linux' \
                --component=Ebuilds \
                --priority=Normal \
                --severity=enhancement
+#              -k STABLEREQ 
 }
 
 eskeys() {
        local k cat
-       if [[ ! -e ChangeLog ]] ; then
+       if [[ ! -e Manifest ]] ; then
                # running in a category rather than package
                cat="/"
        fi
@@ -126,10 +130,22 @@ eskeys() {
        done
 }
 _erit() {
-       local msg=$1 ; shift
-       [[ $1 == [[:digit:]]* ]] && msg="$msg #$1" && shift
-       echo git commit -m "$(echo $@ | sed 's: :/:g') $msg"
-       git commit -m "$(echo $@ | sed 's: :/:g') $msg"
+       if [[ $# -eq 1 ]] ; then
+               echo "Args: <ver> <arches>"
+               return 1
+       fi
+
+       local cat=$(basename "$(dirname "${PWD}")")
+       local pkg=$(basename "${PWD}")
+       local mode=$1 ; shift
+       local ver=$1 ; shift
+       local arches=$(printf '%s/' $(printf '%s\n' "$@" | sort -u))
+       arches=${arches%/}
+       local msg="${cat}/${pkg}: mark ${ver} ${arches} ${mode}"
+
+       local cmd=( git commit -m "${msg}" . )
+       echo "${cmd[@]}"
+       "${cmd[@]}"
 }
 erstable() { _erit stable "$@" ; }
 erlove() { _erit love "$@" ; }