[26294] in Source-Commits
/svn/athena r25498 - trunk/debathena/scripts
daemon@ATHENA.MIT.EDU (Jonathan D Reed)
Sun May 13 22:26:17 2012
Date: Sun, 13 May 2012 22:26:15 -0400
From: Jonathan D Reed <jdreed@MIT.EDU>
Message-Id: <201205140226.q4E2QFbS007957@drugstore.mit.edu>
To: source-commits@MIT.EDU
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Author: jdreed
Date: 2012-05-13 22:26:15 -0400 (Sun, 13 May 2012)
New Revision: 25498
Modified:
trunk/debathena/scripts/dasource
trunk/debathena/scripts/sbuildhack
Log:
Revert r25479 and r25479
Modified: trunk/debathena/scripts/dasource
===================================================================
--- trunk/debathena/scripts/dasource 2012-05-14 01:22:34 UTC (rev 25497)
+++ trunk/debathena/scripts/dasource 2012-05-14 02:26:15 UTC (rev 25498)
@@ -97,6 +97,30 @@
([ -f "$dir/debian/control.in" ] && cd $dir && DEB_AUTO_UPDATE_DEBIAN_CONTROL=yes debian/rules debian/control || :)
[ -f "$dir/debian/control" ] || die "Can't find or generate debian/control!"
+ # Read in debian-versions
+ . $basedir/debian-versions.sh
+
+ NOBUILD=$(grep-dctrl -n -s Debathena-No-Build -F Debathena-No-Build -e . "$dir/debian/control")
+ BUILDFOR=$(grep-dctrl -n -s Debathena-Build-For -F Debathena-Build-For -e . "$dir/debian/control")
+ if [ -n "$NOBUILD" ] && [ -n "$BUILDFOR" ]; then
+ echo "It is an error to specify both X-Debathena-Build-For and"
+ echo "X-Debathena-No-Build. Pick one and try again."
+ die
+ elif [ -z "$NOBUILD" ] && [ -z "$BUILDFOR" ]; then
+ [ -f "$pkgname/nobuild" ] && echo "NOTE: Please migrate legacy ./nobuild to X-Debathena-No-Build!"
+ else
+ [ -f "$pkgname/nobuild" ] && rm "$pkgname/nobuild"
+ if [ -n "$BUILDFOR" ]; then
+ NOBUILD=
+ for code in $DEBIAN_CODES; do
+ if ! echo "$BUILDFOR" | fgrep -q "$code"; then
+ NOBUILD="$NOBUILD $code"
+ fi
+ done
+ fi
+ echo "$NOBUILD" > "$pkgname/nobuild"
+ fi
+
# Create a suitable orig tarball if necessary.
(cd $dir && $basedir/daorig)
Modified: trunk/debathena/scripts/sbuildhack
===================================================================
--- trunk/debathena/scripts/sbuildhack 2012-05-14 01:22:34 UTC (rev 25497)
+++ trunk/debathena/scripts/sbuildhack 2012-05-14 02:26:15 UTC (rev 25498)
@@ -22,39 +22,11 @@
EOF
if [ -z "$dist" ] || [ -z "$arch" ]; then usage; fi
-dscfile=
-for i in "$@"; do
- if echo "$i" | grep -q '\.dsc$'; then
- dscfile=$i
- fi
-done
-
-[ -n "$dscfile" ] || usage
-
-NOBUILD=$(grep-dctrl -n -s Debathena-No-Build -F Debathena-No-Build -e . "$dscfile")
-BUILDFOR=$(grep-dctrl -n -s Debathena-Build-For -F Debathena-Build-For -e . "$dscfile")
-
-if [ -n "$NOBUILD" ] && [ -n "$BUILDFOR" ]; then
- echo "It is an error to specify both Debathena-Build-For and Debathena-No-Build fields."
- echo "Pick one and try again."
- exit 1
-fi
-
-if [ -z "$NOBUILD" ] && [ -z "$BUILDFOR" ] && [ -e nobuild ]; then
- NOBUILD="$(cat nobuild)"
- echo "NOTE: Please migrate ./nobuild to XSC-Debathena-No-Build!"
-fi
-
-if [ -n "$NOBUILD" ] && echo "$NOBUILD" | fgrep -q "$dist"; then
- echo "Skipping $dist since it is listed in the Debathena-No-Build field"
+if [ -e nobuild ] && fgrep -q "$dist" nobuild; then
+ echo "Skipping $dist since it is listed in ./nobuild."
exit
fi
-if [ -n "$BUILDFOR" ] && ! echo "$BUILDFOR" | fgrep -q "$dist"; then
- echo "Skipping $dist since it is not listed in the Debathena-Build-For field"
- exit
-fi
-
sbuild --append-to-version=`gettag "$dist"` \
-d "$dist" --arch="$arch" \
--apt-update --apt-distupgrade \