-- cgit v1.2.3-70-g09d2 From 75def25af22779a1cfaba57d0e90b7a940bd8a2e Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 4 Nov 2005 13:16:06 +0000 Subject: Helper scripts 2005-11-04 Andy Wingo * scripts/fork-archive-pkgs: Support baz. * scripts/patches-missing: New file, prints a list of patches missing from this version in another archive. --- ChangeLog | 7 +++++++ scripts/fork-archive-pkgs | 8 ++++++-- scripts/patches-missing | 47 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 2 deletions(-) create mode 100755 scripts/patches-missing diff --git a/ChangeLog b/ChangeLog index 04b4c28..7c298b8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-11-04 Andy Wingo + + * scripts/fork-archive-pkgs: Support baz. + + * scripts/patches-missing: New file, prints a list of patches + missing from this version in another archive. + 2005-03-06 Andy Wingo * scripts/make-release-note: Tweak evil regexps to correctly parse diff --git a/scripts/fork-archive-pkgs b/scripts/fork-archive-pkgs index db05f79..5d6b7e7 100755 --- a/scripts/fork-archive-pkgs +++ b/scripts/fork-archive-pkgs @@ -1,8 +1,12 @@ #!/bin/sh +if test -n "$TLA"; + TLA=tla +fi + year=`date +%Y` while [ -n "$1" ]; do - tla archive-setup "guile-gnome-$1--dev--0" - tla tag "guile-gnome-devel@gnu.org--$year/$1--dev--0" "guile-gnome-$1--dev--0" + $TLA archive-setup "guile-gnome-$1--dev--0" + $TLA tag "guile-gnome-devel@gnu.org--$year/$1--dev--0" "guile-gnome-$1--dev--0" shift done diff --git a/scripts/patches-missing b/scripts/patches-missing new file mode 100755 index 0000000..5f45705 --- /dev/null +++ b/scripts/patches-missing @@ -0,0 +1,47 @@ +#!/bin/sh + +set -e + +if test -z "$TLA"; then + TLA=`which tla || which baz` +fi + +usage() { + echo "usage: $0 [--full] ARCHIVE-NAME" >&2 + echo >&2 + echo "Prints the patches from the current tree missing in ARCHIVE-NAME." >&2 + exit 1 +} + +if test $# -eq 0; then + usage +fi + +if test $1 = "--full"; then + full=true + shift +else + full=false +fi + +test $# -eq 1 || usage + +archive=$1 +version=`$TLA parse-package-name $($TLA tree-version)` +dir=`mktemp -d` +cwd=`pwd` +logs1=`mktemp` +logs2=`mktemp` + +$TLA get -s $archive/$version $dir/working-copy +$TLA logs -f --merges -d $dir/working-copy | grep -v 'merges in' | tr -d ' ' > $logs1 +$TLA logs -f --merges -d . | grep -v 'merges in' | tr -d ' ' > $logs2 + +if `$full`; then + diff -u10000 $logs1 $logs2 | egrep -v '^(@|\+\+\+ |---)' | grep -v 'base-0' +else + diff -u0 $logs1 $logs2 | egrep -v '^(@|\+\+\+ |---)' | grep -v 'base-0' +fi + +rm -f $logs1 $logs2 +rm -rf $dir -- cgit v1.2.3-70-g09d2 From 87e0c2e968e5217353bb251a13223df08edc2b1e Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 4 Nov 2005 13:46:19 +0000 Subject: Smarter patches-missing 2005-11-04 Andy Wingo * scripts/patches-missing: Use {arch}/+upstream if available. Don't print diffs any more, just show the patches that are missing. Let --full do a cat-archive-log on the patch. --- ChangeLog | 4 ++++ scripts/patches-missing | 49 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 39 insertions(+), 14 deletions(-) diff --git a/ChangeLog b/ChangeLog index 7c298b8..797de84 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-11-04 Andy Wingo + * scripts/patches-missing: Use {arch}/+upstream if available. + Don't print diffs any more, just show the patches that are + missing. Let --full do a cat-archive-log on the patch. + * scripts/fork-archive-pkgs: Support baz. * scripts/patches-missing: New file, prints a list of patches diff --git a/scripts/patches-missing b/scripts/patches-missing index 5f45705..ef847b7 100755 --- a/scripts/patches-missing +++ b/scripts/patches-missing @@ -6,42 +6,63 @@ if test -z "$TLA"; then TLA=`which tla || which baz` fi +if ! $TLA tree-id 2>&1 >/dev/null; then + echo "Error: not in a valid arch working tree." >&2 + exit 1 +fi + usage() { - echo "usage: $0 [--full] ARCHIVE-NAME" >&2 + echo "usage: $0 [--full] [FQVN]" >&2 echo >&2 - echo "Prints the patches from the current tree missing in ARCHIVE-NAME." >&2 + echo "Prints the patches from the current tree missing in FQVN," >&2 + echo "defaulting to {arch}/+upstream." >&2 exit 1 } -if test $# -eq 0; then - usage -fi - -if test $1 = "--full"; then +if test $# -ge 1 -a "$1" = "--full"; then full=true shift else full=false fi -test $# -eq 1 || usage +if test $# -eq 0; then + if test -f `$TLA tree-root`/{arch}/+upstream; then + upstream=`cat $($TLA tree-root)/{arch}/+upstream` + else + echo "Error: No upstream version specified and {arch}/+upstream not found." >&2 + exit 1 + fi +else + test $# -eq 1 || usage + upstream=$1 +fi -archive=$1 -version=`$TLA parse-package-name $($TLA tree-version)` dir=`mktemp -d` cwd=`pwd` logs1=`mktemp` logs2=`mktemp` +out=`mktemp` -$TLA get -s $archive/$version $dir/working-copy +$TLA get -s $upstream $dir/working-copy $TLA logs -f --merges -d $dir/working-copy | grep -v 'merges in' | tr -d ' ' > $logs1 $TLA logs -f --merges -d . | grep -v 'merges in' | tr -d ' ' > $logs2 +# no idea why i have to use tee here +diff -u0 $logs1 $logs2 | tee $out >/dev/null + +patches=$(cat $out \ + | egrep -v '^(@|\+\+\+ |---)' \ + | grep -v 'base-0' \ + | sed -e 's/^\+//') + if `$full`; then - diff -u10000 $logs1 $logs2 | egrep -v '^(@|\+\+\+ |---)' | grep -v 'base-0' + for i in $patches; do + $TLA cat-archive-log $i + done else - diff -u0 $logs1 $logs2 | egrep -v '^(@|\+\+\+ |---)' | grep -v 'base-0' + echo $patches fi -rm -f $logs1 $logs2 +rm -f $logs1 $logs2 $out rm -rf $dir -- cgit v1.2.3-70-g09d2 From f8ace7aaeb63ab941de15f8a4d2c10711282c26e Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 4 Nov 2005 13:58:47 +0000 Subject: patches-missing fixen 2005-11-04 Andy Wingo * scripts/patches-missing: Don't do anything about patches in upstream but not in the local copy. Handle the no-diff case better. Better non-full output. --- ChangeLog | 4 ++++ scripts/patches-missing | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 797de84..99ffb09 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2005-11-04 Andy Wingo + * scripts/patches-missing: Don't do anything about patches in + upstream but not in the local copy. Handle the no-diff case + better. Better non-full output. + * scripts/patches-missing: Use {arch}/+upstream if available. Don't print diffs any more, just show the patches that are missing. Let --full do a cat-archive-log on the patch. diff --git a/scripts/patches-missing b/scripts/patches-missing index ef847b7..0efe9bc 100755 --- a/scripts/patches-missing +++ b/scripts/patches-missing @@ -52,7 +52,7 @@ $TLA logs -f --merges -d . | grep -v 'merges in' | tr -d ' ' > $logs2 diff -u0 $logs1 $logs2 | tee $out >/dev/null patches=$(cat $out \ - | egrep -v '^(@|\+\+\+ |---)' \ + | egrep -v '^(@|\+\+\+ |-)' \ | grep -v 'base-0' \ | sed -e 's/^\+//') @@ -61,7 +61,7 @@ if `$full`; then $TLA cat-archive-log $i done else - echo $patches + for i in $patches; do echo $i; done fi rm -f $logs1 $logs2 $out -- cgit v1.2.3-70-g09d2 From 46bcb28968d8856f1f1744f3f44c285b710e24ea Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Sat, 5 Nov 2005 16:22:11 +0000 Subject: patches-missing -> upstream-missing 2005-11-05 Andy Wingo * scripts/upstream-missing: Change to use baz missing, doh. Renamed from patches-missing. --- ChangeLog | 5 ++++ scripts/patches-missing | 68 ------------------------------------------------ scripts/upstream-missing | 55 +++++++++++++++++++++++++++++++++++++++ 3 files changed, 60 insertions(+), 68 deletions(-) delete mode 100755 scripts/patches-missing create mode 100755 scripts/upstream-missing diff --git a/ChangeLog b/ChangeLog index 99ffb09..e36d821 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-05 Andy Wingo + + * scripts/upstream-missing: Change to use baz missing, doh. + Renamed from patches-missing. + 2005-11-04 Andy Wingo * scripts/patches-missing: Don't do anything about patches in diff --git a/scripts/patches-missing b/scripts/patches-missing deleted file mode 100755 index 0efe9bc..0000000 --- a/scripts/patches-missing +++ /dev/null @@ -1,68 +0,0 @@ -#!/bin/sh - -set -e - -if test -z "$TLA"; then - TLA=`which tla || which baz` -fi - -if ! $TLA tree-id 2>&1 >/dev/null; then - echo "Error: not in a valid arch working tree." >&2 - exit 1 -fi - -usage() { - echo "usage: $0 [--full] [FQVN]" >&2 - echo >&2 - echo "Prints the patches from the current tree missing in FQVN," >&2 - echo "defaulting to {arch}/+upstream." >&2 - exit 1 -} - -if test $# -ge 1 -a "$1" = "--full"; then - full=true - shift -else - full=false -fi - -if test $# -eq 0; then - if test -f `$TLA tree-root`/{arch}/+upstream; then - upstream=`cat $($TLA tree-root)/{arch}/+upstream` - else - echo "Error: No upstream version specified and {arch}/+upstream not found." >&2 - exit 1 - fi -else - test $# -eq 1 || usage - upstream=$1 -fi - -dir=`mktemp -d` -cwd=`pwd` -logs1=`mktemp` -logs2=`mktemp` -out=`mktemp` - -$TLA get -s $upstream $dir/working-copy -$TLA logs -f --merges -d $dir/working-copy | grep -v 'merges in' | tr -d ' ' > $logs1 -$TLA logs -f --merges -d . | grep -v 'merges in' | tr -d ' ' > $logs2 - -# no idea why i have to use tee here -diff -u0 $logs1 $logs2 | tee $out >/dev/null - -patches=$(cat $out \ - | egrep -v '^(@|\+\+\+ |-)' \ - | grep -v 'base-0' \ - | sed -e 's/^\+//') - -if `$full`; then - for i in $patches; do - $TLA cat-archive-log $i - done -else - for i in $patches; do echo $i; done -fi - -rm -f $logs1 $logs2 $out -rm -rf $dir diff --git a/scripts/upstream-missing b/scripts/upstream-missing new file mode 100755 index 0000000..05afbeb --- /dev/null +++ b/scripts/upstream-missing @@ -0,0 +1,55 @@ +#!/bin/sh + +set -e + +if test -z "$TLA"; then + TLA=`which tla || which baz` +fi + +if ! $TLA tree-id 2>&1 >/dev/null; then + echo "Error: not in a valid arch working tree." >&2 + exit 1 +fi + +usage() { + echo "usage: $0 [--full] [FQVN]" >&2 + echo >&2 + echo "Prints the patches from the current tree missing in FQVN," >&2 + echo "defaulting to {arch}/+upstream." >&2 + exit 1 +} + +if test $# -ge 1 -a "$1" = "--full"; then + full=true + shift +else + full=false +fi + +if test $# -eq 0; then + if test -f `$TLA tree-root`/{arch}/+upstream; then + upstream=`cat $($TLA tree-root)/{arch}/+upstream` + else + echo "Error: No upstream version specified and {arch}/+upstream not found." >&2 + exit 1 + fi +else + test $# -eq 1 || usage + upstream=$1 +fi + +dir=`mktemp -d` +version=`$TLA tree-version` + +$TLA get -s $upstream $dir/working-copy +missing=`$TLA missing -d $dir/working-copy $version` + +if `$full`; then + for i in $missing; do + $TLA cat-archive-log $i + done +else + for i in $missing; do echo $i; done +fi + +rm -rf $dir -- cgit v1.2.3-70-g09d2 From 869ba6487b1224ea045807f5345b74f0fccb44ae Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Thu, 22 Dec 2005 23:20:51 +0000 Subject: merge with upstream --- scripts/add-upstream | 2 +- scripts/upstream-missing | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/add-upstream b/scripts/add-upstream index f05bbb6..8c82ffc 100755 --- a/scripts/add-upstream +++ b/scripts/add-upstream @@ -16,7 +16,7 @@ for f in . *; do else pkg="$f" fi - echo guile-gnome-devel@gnu.org--2004/$pkg--dev--0 > $upstream + echo guile-gnome-devel@gnu.org--2005/$pkg--dev--0 > $upstream fi fi done diff --git a/scripts/upstream-missing b/scripts/upstream-missing index 05afbeb..f0e4c9e 100755 --- a/scripts/upstream-missing +++ b/scripts/upstream-missing @@ -53,3 +53,9 @@ else fi rm -rf $dir + +if test -z "$missing"; then + exit 1 +else + exit 0 +fi -- cgit v1.2.3-70-g09d2 From 9a9b22990e1ed9f0e7e37efc74d0f60da0db594d Mon Sep 17 00:00:00 2001 From: Andy Wingo Date: Fri, 23 Dec 2005 02:46:17 +0000 Subject: Remove build-dep on SLIB. 2005-12-22 Andy Wingo * scripts/update-inventories: Make tla-agnostic. * autogen-pkg.sh: Remove build-dep on SLIB. --- ChangeLog | 6 ++++++ autogen-pkg.sh | 14 -------------- scripts/update-inventories | 8 ++++++-- 3 files changed, 12 insertions(+), 16 deletions(-) diff --git a/ChangeLog b/ChangeLog index 36ea4e5..19e09d3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2005-12-22 Andy Wingo + + * scripts/update-inventories: Make tla-agnostic. + + * autogen-pkg.sh: Remove build-dep on SLIB. + 2005-11-05 Andy Wingo * scripts/fork-archive-pkgs: Work with tla or baz. I think. diff --git a/autogen-pkg.sh b/autogen-pkg.sh index 17f5fb7..323c475 100644 --- a/autogen-pkg.sh +++ b/autogen-pkg.sh @@ -206,20 +206,6 @@ AC_SUBST(GUILE_CFLAGS) AC_SUBST(GUILE_LIBS) AC_MSG_RESULT(yes) -# The defs generator uses slib for globbing and printf -AC_MSG_CHECKING(for SLIB) -if ! guile -c '(use-modules (ice-9 slib))' >/dev/null 2>&1; then - AC_MSG_ERROR([guile-gnome needs SLIB to build. - -Most distributions ship a guile-slib package, for example guile-1.6-slib -on Debian. Otherwise, you can install it yourself by downloading it -from http://swissnet.ai.mit.edu/~jaffer/SLIB.html and install it via the -method detailed in the SLIB Installation node of the guile info manual. -Sucks for you! -]) -fi -AC_MSG_RESULT(yes) - # Check for g-wrap PKG_CHECK_MODULES(G_WRAP, g-wrap-2.0-guile >= 1.9.4) diff --git a/scripts/update-inventories b/scripts/update-inventories index cd4fc10..331a527 100755 --- a/scripts/update-inventories +++ b/scripts/update-inventories @@ -1,9 +1,13 @@ #!/bin/bash -for i in `tla tree-lint -t`; do +if test -z "$TLA"; then + TLA=`which tla || which baz` +fi +if echo $TLA | grep -q tla; then lint=tree-lint; else lint=lint; fi +for i in `$TLA $lint -t`; do echo "Marking '$i' as precious" inv=`dirname $i`/.arch-inventory echo "precious ^$(basename $i)\$" >> $inv - if ! tla id --silent $inv; then + if ! $TLA id --silent $inv; then echo "Adding $inv as source" tla add -i `uuidgen` $inv; fi -- cgit v1.2.3-70-g09d2