RPM Community Forums

Mailing List Message of <rpm-cvs>

[CVS] RPM: rpm/ devtool devtool.conf

From: Ralf S. Engelschall <rse@rpm5.org>
Date: Thu 30 Aug 2007 - 10:27:41 CEST
Message-Id: <20070830082741.230E734845B@rpm5.org>
  RPM Package Manager, CVS Repository
  http://rpm5.org/cvs/
  ____________________________________________________________________________

  Server: rpm5.org                         Name:   Ralf S. Engelschall
  Root:   /v/rpm/cvs                       Email:  rse@rpm5.org
  Module: rpm                              Date:   30-Aug-2007 10:27:41
  Branch: HEAD                             Handle: 2007083009274000

  Modified files:
    rpm                     devtool devtool.conf

  Log:
    instead of hard-coding a %thirdpartydefs section into the reusable
    (and hence generic) 'devtool' script, add the functionality of a
    '@source' command which is able to 'source' an arbitrary section and
    use this to load the %thirdpartydefs section now

  Summary:
    Revision    Changes     Path
    2.7         +10 -3      rpm/devtool
    2.91        +1  -1      rpm/devtool.conf
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: rpm/devtool
  ============================================================================
  $ cvs diff -u -r2.6 -r2.7 devtool
  --- rpm/devtool	29 Aug 2007 16:41:58 -0000	2.6
  +++ rpm/devtool	30 Aug 2007 08:27:40 -0000	2.7
  @@ -42,10 +42,9 @@
   touch $tmpfile
   ( sed <${DEVTOOL_SRCDIR}/devtool -e '1,/^##  devtool.func {/d' -e '/^##  } devtool.func/,$d'
     sed <${DEVTOOL_SRCDIR}/devtool.conf -e "1,/^%common/d" -e '/^%.*/,$d'
  -  sed <${DEVTOOL_SRCDIR}/devtool.conf -e "1,/^%thirdpartydefs/d" -e '/^%.*/,$d'
     sed <${DEVTOOL_SRCDIR}/devtool.conf -e "1,/^%$cmd/d" -e '/^%.*/,$d' ) |\
   sed -e 's;\([ 	]\)@\([a-zA-Z_][a-zA-Z0-9_-]*\);\1devtool_\2;' \
  -    -e 's;\([ 	]\)%\([a-zA-Z_][a-zA-Z0-9_-]*\);\1devtool_devtool \2;' \
  +    -e 's;\([ 	]\)%\([a-zA-Z_][a-zA-Z0-9_-]*\);\1devtool_execute \2;' \
   >>$tmpfile
   
   #   execute run-command script
  @@ -58,10 +57,18 @@
   
   ##  devtool.func { # is now embedded. This line used as cutting point. Do not remove.
   
  -devtool_devtool () {
  +devtool_execute () {
       sh ${DEVTOOL_SRCDIR}/devtool "$@"
   }
   
  +devtool_source () {
  +    _tmpfile="${TMPDIR-/tmp}/devtool.$$.tmp.source"
  +    rm -f $_tmpfile
  +    sed <${DEVTOOL_SRCDIR}/devtool.conf -e "1,/^%$2/d" -e '/^%.*/,$d' >$_tmpfile
  +    . $_tmpfile
  +    rm -f $_tmpfile
  +}
  +
   devtool_require () {
       t="$1"; o="$2"; p="$3"; e="$4"; a="$5"
       v=`($t $o | head -1 | awk "{ print \\\$$p; }") 2>/dev/null`
  @@ .
  patch -p0 <<'@@ .'
  Index: rpm/devtool.conf
  ============================================================================
  $ cvs diff -u -r2.90 -r2.91 devtool.conf
  --- rpm/devtool.conf	29 Aug 2007 16:41:58 -0000	2.90
  +++ rpm/devtool.conf	30 Aug 2007 08:27:40 -0000	2.91
  @@ -237,7 +237,7 @@
       ##  o 2007-07-25: ppc-aix5.3-gcc3.3.2
       ##
   
  -    %thirdpartydefs
  +    @source %thirdpartydefs
   
       #   prerequisite check
       for tool in gzip tar patch perl; do
  @@ .
Received on Thu Aug 30 10:27:41 2007
Driven by Jeff Johnson and the RPM project team.
Hosted by OpenPKG and Ralf S. Engelschall.
Powered by FreeBSD and OpenPKG.