commit:     70989003ffd70e95ff818a78baf8a1d9ac7af2fb
Author:     Markus Meier <maekke <AT> gentoo <DOT> org>
AuthorDate: Wed Aug 19 17:09:10 2015 +0000
Commit:     Markus Meier <maekke <AT> gentoo <DOT> org>
CommitDate: Wed Aug 19 17:09:10 2015 +0000
URL:        https://gitweb.gentoo.org/dev/maekke.git/commit/?id=70989003

scripts: update keywording script to work with gentoo git repo

Signed-off-by: Markus Meier <maekke <AT> gentoo.org>

 scripts/keyword.sh | 15 +++++++--------
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/scripts/keyword.sh b/scripts/keyword.sh
index 912bba7..bc64786 100755
--- a/scripts/keyword.sh
+++ b/scripts/keyword.sh
@@ -1,7 +1,7 @@
 #!/bin/bash
 # by {maekke,opfer}@gentoo.org
 
-REPODIR="${HOME}/cvs/gentoo-x86"
+REPODIR="${HOME}/cvs/gentoo"
 BUGZ_USER="[email protected]"
 BUGZ="bugz"
 BUGZ_DEFAULT_OPTS="--base https://bugs.gentoo.org/xmlrpc.cgi --user 
${BUGZ_USER}"
@@ -60,13 +60,13 @@ for pkg in ${pkgs} ; do
        [[ ${qatom#} < 2 ]] && die "invalid atom ${pkg}"
        category=${qatom[0]/=}
        pn=${qatom[1]}
+       cpn=${category}/${pn}
        version=${qatom[2]}
        revision=${qatom[3]}
        [[ -n "${revision}" ]] && version="${version}-${revision}"
 
-       cd "${REPODIR}/${category}/${pn}" || die "package ${category}/${pn} not 
found"
-       cvs up -C || die "cvs up failed"
-       find . -name '.#*' -delete || die "removing .#* failed"
+       cd "${REPODIR}/${cpn}" || die "package ${cpn} not found"
+       git pull --rebase=preserve || die "git pull failed"
        [[ -e ${pn}-${version}.ebuild ]] || die "ebuild (${pn}-${version}) not 
found"
        repoman full --include-arches "${arches//\~/}" || die "repoman full 
failed on non-modified tree"
 
@@ -80,9 +80,9 @@ for pkg in ${pkgs} ; do
 
        # commit message
        if [[ ${arches:0:1} == "~" ]] ; then
-               msg="add ${arches// //}"
+               msg="${cpn}: add ${arches// //}"
        else
-               msg="${tmparches// //} stable"
+               msg="${cpn} ${tmparches// //} stable"
        fi
        [[ ${bugid} != "0" ]] && msg="${msg}, bug #${bugid}"
 
@@ -90,9 +90,8 @@ for pkg in ${pkgs} ; do
                ekeyword ${tmparches} ${pn}-${version}.ebuild || die "ebuild 
not found"
                repoman manifest || die "repoman manifest failed"
                repoman full --include-arches "${arches//\~/}" || die "repoman 
full failed on modified tree"
-               echangelog "${msg}" || die "echangelog failed"
-               repoman manifest || die "repoman manifest failed"
                repoman commit --include-arches "${arches//\~/}" -m "${msg}" || 
die "repoman commit failed"
+               git push --signed || die "git push failed"
        else
                echo "nothing to do here"
        fi

Reply via email to