4 echo "Usage: cvs_gentoo_url <file>[:rev1[:rev2]]"
8 # spec has the form file:rev1[:rev2]
9 # rev2 defaults to rev1-1
15 if [[ ! -e ${file} ]] ; then
16 echo "file '${file}' does not exist"
20 [[ ${file} == */* ]] && dir=${file%/*}
24 if [[ -z ${rev2} ]] ; then
28 set -- $(grep /${file}/ CVS/Entries)
32 if [[ ${rev2} == "0" ]] ; then
36 # existing file, bump rev automatically
37 rev2="1.$((${rev2#1.}+1))"
40 local rev2r=${rev2#1.}
41 local rev1=${3:-1.$((rev2r - 1))}
43 local cvsroot=$(<${dir}/CVS/Repository)
44 if [[ ${cvsroot} == gentoo-x86* ]] ; then
45 cvsroot=${cvsroot#gentoo-x86}
50 [[ ${rev2} == "1.1" || ${rev1} == "${rev2}" ]] \
51 && urirev="?rev=${rev2}" \
52 || urirev="?r1=${rev1}&r2=${rev2}"
53 echo "http://sources.gentoo.org/${cvsroot}/${file}${urirev}"
57 _cvs_gentoo_url "${f}"
62 local repo=$(git config remote.origin.url | sed 's:.*git.overlays.gentoo.org/::')
63 git log -n3 ${1:-HEAD} | \
64 sed "s,^commit ,http://git.overlays.gentoo.org/gitweb/?p=${repo};a=commitdiff;h=,"
68 [[ ! -e ChangeLog ]] \
69 && echo "No ChangeLog" \
71 echangelog "$@" || return 1
72 repoman commit -m "$@" || return 1
75 declare url=$1 tmp=$(mktemp) filename || return 1
76 [[ $url == */* ]] || url="http://bugs.gentoo.org/attachment.cgi?id=$url"
77 eval $(wget -S -O"$tmp" "$url" 2>&1 | tee /dev/tty | \
78 grep 'Content-disposition:' | sed 's/.* //') && \
79 mv "$tmp" "$filename" && \
80 chmod $(printf "%03o" "$((0666 & ~$(umask)))") "$filename" && \
81 ls -l "$filename" && \
88 if [[ $@ == *.ebuild* ]] ; then
91 keys=$(sed -n '/^KEYWORD/{s:.*=::;s:"::g;p}' ${e})
93 [[ ${a} != ~* ]] && continue
94 ret="${ret} ${a/\~}@gentoo.org"
99 ret="${ret} ${a/\~}@gentoo.org"
104 submit_bug_stable() {
106 if [[ $1 == "-m" ]] ; then
110 if [[ -z $1 ]] || [[ -n $2 ]] ; then
111 echo "Usage: submit_bug_stable <ebuilds>"
114 local maintainer=$(xml sel -t -v pkgmetadata/herd metadata.xml)
115 if [[ ${maintainer} == "no-herd" ]] ; then
116 maintainer=$(xml sel -t -v pkgmetadata/maintainer/email metadata.xml)
117 elif [[ -n ${maintainer} ]] ; then
118 maintainer="${maintainer}@gentoo.org"
120 if [[ -z ${maintainer} ]] ; then
121 echo "No maintainer found in metadata.xml"
124 local cat=$(basename $(dirname $(pwd)))
125 local pkg=${1%.ebuild}
126 local ebuild=${pkg}.ebuild
127 local cc=$(arch_emails ${ebuild} | sed -r -e 's:([^ ]*-fbsd|mips)@[^ ]*::g')
128 if [[ -z ${cc} ]] ; then
129 echo "Unable to read ebuild '${ebuild}'"
133 -u vapier@gentoo.org \
134 -t "Stabilize ${cat}/${pkg}" \
144 if [[ ! -e ChangeLog ]] ; then
145 # running in a category rather than package
148 [[ -z $* ]] && set -- arm m68k s390 sh
150 local list="$(grep "^KEYWORDS=.*~${k}\>.*[^~]x86" *${cat}*d -l)"
151 [[ -z ${list} ]] && continue
152 sed -i "1s:.*:# Copyright 1999-$(date +%Y) Gentoo Foundation:" ${list}
153 ekeyword ${k} ${list}
158 [[ $1 == [[:digit:]]* ]] && msg="$msg #$1" && shift
159 echo repoman commit -m "$(echo $@ | sed 's: :/:g') $msg"
160 repoman commit -m "$(echo $@ | sed 's: :/:g') $msg"
162 erstable() { _erit stable "$@" ; }
163 erlove() { _erit love "$@" ; }