1 alias ebuild-sync='rsync -av ./ /usr/portage/${PWD#/usr/local/src/gentoo/repo/gentoo/} --exclude ChangeLog --exclude CVS --exclude metadata.xml --delete'
2 alias ebuild-emerge='sudo emerge -1av $(echo ${PWD} | awk -F/ "{printf \"%s/%s\", \$(NF-1), \$(NF)}")'
3 alias ekeyword='ekeyword -v -q'
4 alias repoman='repoman -q -q'
5 alias rf='/usr/local/src/gentoo/portage/repoman/bin/repoman.git -q full'
9 && echo "No ChangeLog" \
11 echangelog "$@" || return 1
14 repoman commit "${@:1:$#-1}" -m "${@:$#}" || return 1
18 _echangelog "$@" || exit 1
19 cvs commit -m "$@" || exit 1
24 while [[ $# -gt 0 ]] ; do
25 declare url=$1 tmp=$(mktemp) filename || return 1
26 [[ ${url} == */* ]] || url="http://bugs.gentoo.org/attachment.cgi?id=${url}"
27 printf '%s -> ' "${url}"
28 if eval $(wget -S -O"${tmp}" "${url}" 2>&1 |
29 grep 'Content-disposition:' | sed 's/.* //') && \
30 mv "${tmp}" "${filename}" && \
31 chmod $(printf "%03o" "$((0666 & ~$(umask)))") "${filename}" ; then
42 if [[ $@ == *.ebuild* ]] ; then
45 keys=$(sed -n '/^[[:space:]]*KEYWORD/{s:.*=::;s:"::g;p}' ${e})
47 [[ ${a} != ~* ]] && continue
50 ~arm64|~m68k|~mips|~s390|~sh) continue ;;
51 ~*) ret="${ret} ${a}" ;;
58 printf '%s@gentoo.org,' ${ret//\~}
61 stable_arch_emails() {
62 arch_emails "$@" | sed -r -e 's:([^ ]*-[^ ]*|mips)@[^ ]*::g'
65 local f=${1:-metadata.xml}
66 local maintainer=$(xml sel -t -v pkgmetadata/herd $f)
67 if [[ ${maintainer:-no-herd} == "no-herd" ]] ; then
68 maintainer=$(xml sel -t -v pkgmetadata/maintainer/email $f)
69 elif [[ -n ${maintainer} ]] ; then
70 maintainer="${maintainer}@gentoo.org"
72 if [[ -z ${maintainer} ]] ; then
73 echo "No maintainer found in $f"
81 if [[ $1 == "-m" ]] ; then
85 if [[ -z $1 ]] || [[ -n $2 ]] ; then
86 echo "Usage: submit_bug_stable <ebuilds>"
90 maintainer=$(eget_maintainer) || return 1
91 local cat=$(basename $(dirname $(pwd)))
92 local pkg=${1%.ebuild}
93 local ebuild=${pkg}.ebuild
94 local cc=$(stable_arch_emails ${ebuild})
95 if [[ -z ${cc} ]] ; then
96 echo "Unable to read ebuild '${ebuild}'"
99 if [[ ${maintainer} == *" "* ]] ; then
100 cc+=",${maintainer#* }"
101 maintainer=${maintainer%% *}
106 -t "${cat}/${pkg}: stabilize" \
111 --product='Gentoo Linux' \
112 --component=Ebuilds \
114 --severity=enhancement
119 if [[ ! -e ChangeLog ]] ; then
120 # running in a category rather than package
123 [[ -z $* ]] && set -- arm64 m68k s390 sh
125 ekeyword "${k}=x86" $(grep -l "KEYWORDS.*${k}" *${cat}*.ebuild)
130 [[ $1 == [[:digit:]]* ]] && msg="$msg #$1" && shift
131 echo git commit -m "$(echo $@ | sed 's: :/:g') $msg"
132 git commit -m "$(echo $@ | sed 's: :/:g') $msg"
134 erstable() { _erit stable "$@" ; }
135 erlove() { _erit love "$@" ; }
137 export PORTAGE_INST_UID=${UID}
138 export PORTAGE_INST_GID=`id -g`