From d5f0f2d2b8d209224ed235f914506c5f52fc2e48 Mon Sep 17 00:00:00 2001 From: Marcin Krol Date: Sat, 27 Sep 2014 11:14:29 +0000 Subject: [PATCH] - added command to list pkgrevs (former auto tags) --- builder.sh | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/builder.sh b/builder.sh index 99c11d9..840aee5 100755 --- a/builder.sh +++ b/builder.sh @@ -320,7 +320,7 @@ Usage: builder [--all-branches] [-D|--debug] [-V|--version] [--short-version] [ [{-Tp|--tag-prefix} ] [{-tt|--test-tag}] [-nu|--no-urls] [-v|--verbose] [--opts ] [--short-circuit] [--show-bconds] [--with/--without ] [--define ] -[--git-pld|--git-tld] [--pkgrev] +[--git-pld|--git-tld] [--pkgrev] [-lp] [.spec][:tag] -4 - force IPv4 when transferring files @@ -466,8 +466,9 @@ Usage: builder [--all-branches] [-D|--debug] [-V|--version] [--short-version] [ --git-pld - force use of PLD git and distfiles --git-tld - force use of TLD git and distfiles (note: it will fall back to PLD git/df if package doesn't exist in TLD git) ---pkgrev - write git revision of package being built into rsync repo +--pkgrev - save git revision of package being built into pkgrevs (note: only official TLD source builders are allowed to do so) +-lp - list pkgrevs for specified package " } @@ -1514,6 +1515,14 @@ set_pkgrev() { Exit_error err_pkgrev_set } +list_pkgrev() { + local _tmp=$(mktemp /tmp/.builder-XXXX) + rm $_tmp 2>/dev/null + $GETURI $OUTFILEOPT $_tmp $PKGREVS_URL/list/$PACKAGE_NAME 1>/dev/null 2>&1 + cat $_tmp + rm $_tmp 2>/dev/null +} + branch_files() { TAG=$1 echo "Git branch: $TAG" @@ -2489,6 +2498,9 @@ while [ $# -gt 0 ]; do --pkgrev) COMMAND="set_pkgrev" shift;; + -lp) + COMMAND="list_pkgrev" + shift;; -*) Exit_error err_invalid_cmdline "$1" ;; @@ -2843,6 +2855,15 @@ case "$COMMAND" in display_bconds set_pkgrev ;; + "list_pkgrev" ) + init_builder + if [ -z "$SPECFILE" ]; then + Exit_error err_no_spec_in_cmdl + fi + get_spec > /dev/null + parse_spec + list_pkgrev + ;; esac if [ -f "`pwd`/.${SPECFILE}_INSTALLED_PACKAGES" -a "$REMOVE_BUILD_REQUIRES" != "" ]; then rm "`pwd`/.${SPECFILE}_INSTALLED_PACKAGES" -- 2.46.0