[8616] in athena10

home help back first fref pref prev next nref lref last post

Re: [Debathena] #913: Come up with an awesome way to manage nobuild

daemon@ATHENA.MIT.EDU (Debathena Trac)
Mon Oct 31 16:02:55 2011

MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
From: "Debathena Trac" <debathena@MIT.EDU>
Cc: debathena@MIT.EDU
To: jdreed@MIT.EDU
Date: Mon, 31 Oct 2011 20:02:50 -0000
Reply-To: 
Message-ID: <057.506df3cd99945e4314ebb3d5c5c92d27@mit.edu>
In-Reply-To: <042.75e1daba858c743993734d7a05b4ccf7@mit.edu>
Content-Transfer-Encoding: 8bit

#913: Come up with an awesome way to manage nobuild files
--------------------+-----------------------------------
 Reporter:  jdreed  |         Owner:
     Type:  defect  |        Status:  new
 Priority:  normal  |     Milestone:  The Distant Future
Component:  --      |    Resolution:
 Keywords:          |  Upstream bug:  #875 #862
--------------------+-----------------------------------

Comment (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 \

 }}}

-- 
Ticket URL: <http://athena10.mit.edu/trac/ticket/913#comment:1>
Debathena <http://debathena.mit.edu>
MIT Debathena Project


home help back first fref pref prev next nref lref last post