From 118a14e94a9d46c46a4f340a1d89c3c3c2e1e515 Mon Sep 17 00:00:00 2001 From: Evan Broder Date: Sat, 15 Nov 2008 23:21:20 -0500 Subject: [PATCH] Support building multiple packages in sequence with invirt-build-release svn path=/trunk/packages/invirt-dev/; revision=1671 --- debian/changelog | 6 +++++ invirt-build-release | 73 +++++++++++++++++++++++++------------------------- 2 files changed, 43 insertions(+), 36 deletions(-) diff --git a/debian/changelog b/debian/changelog index 3c7f554..0a098bd 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-dev (0.0.8) unstable; urgency=low + + * Support building multiple packages in sequence + + -- Evan Broder Sat, 15 Nov 2008 23:19:38 -0500 + invirt-dev (0.0.7) unstable; urgency=low * Undo my attempts at correctly splitting the package list; do it less diff --git a/invirt-build-release b/invirt-build-release index 4d01a5d..ea09e2c 100755 --- a/invirt-build-release +++ b/invirt-build-release @@ -2,43 +2,44 @@ svnuri="$(invirt-getconf svn.uri)" set -e -if [ $# -ne 1 ] ; then - echo " usage: invirt-build-release package_name" +if [ $# -eq 0 ] ; then + echo " usage: invirt-build-release package_name [package_name [...]]" exit 1 fi -package=$1 -rm -rf build-release/$package -svn export $svnuri/trunk/packages/$package build-release/$package -cd build-release/$package - -eval `perl '-F:\s+' -lane 'print $F[0]."=".$F[1] if /^Version|^Source|^Distribution/' \ - <(dpkg-parsechangelog)` - -dpkg-buildpackage -us -uc -rfakeroot -S -cd .. -sbuild -A -d hardy-amd64 "${Source}_${Version}.dsc" - -if ! svn ls $svnuri/package_tags/$Source >/dev/null 2>&1; then - svn mkdir $svnuri/package_tags/$Source \ - -m "Create package tags directory" -fi -if ! svn ls $svnuri/package_tags/$Source/$Version >/dev/null 2>&1; then - svn cp $svnuri/trunk/packages/$package $svnuri/package_tags/$Source/$Version \ - -m "Tag $Version of $Source" -else - echo "$(basename $0): tag already exists, not making again" -fi - -[ $Distribution = 'unstable' ] \ - || echo "$(basename $0): warning: Distribution is ${Distribution}, script expects unstable" -changesfile=`pwd`/${Source}_*${Version}*.changes -for i in $changesfile; do - reprepro-env include unstable $i - reprepro-env copy stable unstable \ - $(perl '-F:\s+' -lane 'print $F[1]." " if /^Binary/' <$i) +for package; do + rm -rf build-release/$package + svn export $svnuri/trunk/packages/$package build-release/$package + cd build-release/$package + + eval `perl '-F:\s+' -lane 'print $F[0]."=".$F[1] if /^Version|^Source|^Distribution/' \ + <(dpkg-parsechangelog)` + + dpkg-buildpackage -us -uc -rfakeroot -S + cd .. + sbuild -A -d hardy-amd64 "${Source}_${Version}.dsc" + + if ! svn ls $svnuri/package_tags/$Source >/dev/null 2>&1; then + svn mkdir $svnuri/package_tags/$Source \ + -m "Create package tags directory" + fi + if ! svn ls $svnuri/package_tags/$Source/$Version >/dev/null 2>&1; then + svn cp $svnuri/trunk/packages/$package $svnuri/package_tags/$Source/$Version \ + -m "Tag $Version of $Source" + else + echo "$(basename $0): tag already exists, not making again" + fi + + [ $Distribution = 'unstable' ] \ + || echo "$(basename $0): warning: Distribution is ${Distribution}, script expects unstable" + changesfile=`pwd`/${Source}_*${Version}*.changes + for i in $changesfile; do + reprepro-env include unstable $i + reprepro-env copy stable unstable \ + $(perl '-F:\s+' -lane 'print $F[1]." " if /^Binary/' <$i) + done + reprepro-env copy stable unstable ${Source} + + cd .. + rm -rf build-release done -reprepro-env copy stable unstable ${Source} - -cd .. -rm -rf build-release -- 1.7.9.5