Ticket #913 (closed defect: fixed)

Opened 10 years ago

Last modified 10 years ago

Come up with an awesome way to manage nobuild files

Reported by: jdreed Owned by:
Priority: normal Milestone: The Distant Future
Component: -- Keywords:
Cc: Fixed in version:
Upstream bug: #875 #862

Description

We should do something better with nobuild files. In particular, we primarily use them for cluster vs not-cluster, so we should come up with a way to flag packages as cluster (in their control files, maybe?) and have a master file that lists what versions we support cluster on.

See also #875 #862

Change History

comment:1 Changed 10 years ago by jdreed

Per discussion at release-team, I'd like to proposed that instead of nobuild files, we honor the following fields in control:

XSC-DebathenaBuildFor?
XSC-DebathenaNoBuild?

And the following patches to daupload-proposed and sbuildhack:

Index: daupload-proposed
===================================================================
--- daupload-proposed	(revision 25422)
+++ daupload-proposed	(working copy)
@@ -46,6 +46,15 @@
 if [ "$1" = "-S" ]; then S=1; shift; fi
 
 change=$1
+set +e
+NOBUILD=$(grep-dctrl -n -s DebathenaNoBuild -F DebathenaNoBuild -e . "$change")
+BUILDFOR=$(grep-dctrl -n -s DebathenaBuildFor -F DebathenaBuildFor -e . "$change")
+if [ -n "$NOBUILD" ] && [ -n "$BUILDFOR" ]; then
+    echo "Error: changes file contains both DebathenaBuildFor and DebathenaNoBuild"
+    echo "(This should never happen, since sbuildhack should have caught it.)"
+    exit 1
+fi
+set -e
 cd "$(dirname "$change")"
 change=$(basename "$change")
 base=${change%_source.changes}
@@ -57,11 +66,13 @@
     ! [ -s "$1" ] || missing="$missing-$1 "
 }
 
-# If ./nobuild exists, filter out its contents from DEBIAN_CODES.
-if [ -e nobuild ]; then
+# Adjust DEBIAN_CODES based on DebathenaBuildFor or DebathenaNoBuild
+if [ -n "$BUILDFOR" ]; then
+    DEBIAN_CODES=$BUILDFOR
+elif [ -n "$NOBUILD" ]; then
     newcodes=
     for code in $DEBIAN_CODES; do
-	if ! fgrep -q "$code" nobuild; then
+	if ! echo $NOBUILD | fgrep -q "$code"; then
 	    newcodes="$newcodes $code"
 	fi
     done
Index: sbuildhack
===================================================================
--- sbuildhack	(revision 25422)
+++ sbuildhack	(working copy)
@@ -22,11 +22,32 @@
 EOF
 if [ -z "$dist" ] || [ -z "$arch" ]; then usage; fi
 
-if [ -e nobuild ] && fgrep -q "$dist" nobuild; then
-  echo "Skipping $dist since it is listed in ./nobuild."
+dscfile=
+for i in $@; do
+  if echo $i | grep -q .dsc$; then
+    dscfile=$i
+  fi
+done
+
+NOBUILD=$(grep-dctrl -n -s DebathenaNoBuild -F DebathenaNoBuild -e . "$dscfile")
+BUILDFOR=$(grep-dctrl -n -s DebathenaBuildFor -F DebathenaBuildFor -e . "$dscfile")
+
+if [ -n "$NOBUILD" ] && [ -n "$BUILDFOR" ]; then
+    echo "It is an error to specify both DebathenaBuildFor and DebathenaNoBuild fields."
+    echo "Pick one and try again."
+    exit 1
+fi
+
+if [ -n "$NOBUILD" ] && echo "$NOBUILD" | fgrep -q "$dist"; then
+  echo "Skipping $dist since it is listed in the DebathenaNoBuild field"
   exit
 fi
 
+if [ -n "$BUILDFOR" ] && ! echo "$BUILDFOR" | fgrep -q "$dist"; then
+  echo "Skipping $dist since it is not listed in the DebathenaBuildFor field"
+  exit
+fi
+
 sbuild --append-to-version=`gettag "$dist"` \
 	-d "$dist" --arch="$arch" \
 	--apt-update --apt-distupgrade \

comment:2 Changed 10 years ago by jdreed

comment:3 Changed 10 years ago by jdreed

  • Status changed from new to committed

comment:4 Changed 10 years ago by jdreed

  • Status changed from committed to closed
  • Resolution set to fixed

Deployed to the locker.

comment:5 Changed 10 years ago by jdreed

  • Status changed from closed to reopened
  • Resolution fixed deleted

NAK, the current code in daupload-proposed doesn't work, because XSC fields don't get copied to the source changes file, only the binary ones.

comment:6 Changed 10 years ago by jdreed

Right, well, that didn't work. New plan. Revert sbuildhack and daupload-proposed, and instead write out the nobuild files in dasource, based on X-whatever fields in the control file. The fields need not be propagated to the source and changes files.

comment:7 Changed 10 years ago by jdreed

Possibly re-fixed in r25498

comment:8 Changed 10 years ago by jdreed

TTL expired, deployed, tested, functional.

comment:9 Changed 10 years ago by jdreed

  • Status changed from reopened to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.