OpenPKG CVS Repository
  http://cvs.openpkg.org/
  ____________________________________________________________________________

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-src                      Date:   25-Nov-2002 14:24:02
  Branch: OPENPKG_1_1_SOLID                Handle: 2002112513240100

  Modified files:           (Branch: OPENPKG_1_1_SOLID)
    openpkg-src/openpkg     aux.wrapbin.sh openpkg.spec rc rc.openpkg

  Log:
    MFC: various bugfixes and small enhancements

  Summary:
    Revision    Changes     Path
    1.1.2.1     +27 -3      openpkg-src/openpkg/aux.wrapbin.sh
    1.93.2.3    +2  -2      openpkg-src/openpkg/openpkg.spec
    1.14.2.1    +16 -6      openpkg-src/openpkg/rc
    1.5.2.1     +1  -1      openpkg-src/openpkg/rc.openpkg
  ____________________________________________________________________________

  Index: openpkg-src/openpkg/aux.wrapbin.sh
  ============================================================
  $ cvs diff -u -r1.1 -r1.1.2.1 aux.wrapbin.sh
  --- openpkg-src/openpkg/aux.wrapbin.sh        5 Feb 2002 20:23:08 -0000       1.1
  +++ openpkg-src/openpkg/aux.wrapbin.sh        25 Nov 2002 13:24:01 -0000      1.1.2.1
  @@ -29,7 +29,7 @@
   help=0
   verbose=0
   prefix='@l_prefix@'
  -t='@TGZ@'
  +tgz='@TGZ@'
   susr='@SUSR@'
   sgrp='@SGRP@'
   musr='@MUSR@'
  @@ -73,6 +73,27 @@
         (who am i | cut "-d " -f1) 2>/dev/null ||\
         echo $LOGNAME`
   
  +#   determine uncompression tool
  +uncompress=""
  +for t in uncompress gunzip gzip; do
  +    for p in `IFS=":"; echo . $PATH /bin /sbin /usr/bin /usr/sbin`; do
  +        if [ -f "$p/$t" ]; then
  +            uncompress="$p/$t"
  +            if [ ".$t" = .gzip ]; then
  +                uncompress="$uncompress -d"
  +            fi
  +            break
  +        fi
  +    done
  +    if [ ".$uncompress" != . ]; then
  +       break
  +    fi
  +done
  +if [ ".$uncompress" = . ]; then
  +    echo "$0:FAILED: required uncompress, gunzip or gzip tool not found"
  +    exit 1
  +fi
  +
   #   perform the installation
   echo "$0: installing into $prefix..."
   
  @@ -80,6 +101,7 @@
   set -- 1
   @PRE@
   
  +#   make sure prefix/root directory exists
   d=''
   for c in `IFS=/; echo $prefix`; do
       d="$d/$c"
  @@ -92,10 +114,12 @@
           fi
       fi
   done
  +
  +#   extract installation files
   uudecode $f
  -uncompress <$t |\
  +$uncompress <$tgz |\
   (cd $prefix; tar x${v}f -)
  -rm -f $t >/dev/null 2>&1
  +rm -f $tgz >/dev/null 2>&1
   if [ ".$cusr" = .root ]; then
       ( cd $prefix || exit 1
         chown -R -h $musr . >/dev/null 2>&1 || true
  Index: openpkg-src/openpkg/openpkg.spec
  ============================================================
  $ cvs diff -u -r1.93.2.2 -r1.93.2.3 openpkg.spec
  --- openpkg-src/openpkg/openpkg.spec  26 Aug 2002 20:43:20 -0000      1.93.2.2
  +++ openpkg-src/openpkg/openpkg.spec  25 Nov 2002 13:24:01 -0000      1.93.2.3
  @@ -39,8 +39,8 @@
   #   o any cc(1)
   
   #   the package version and release
  -%define       V_openpkg 1.1.0
  -%define       R_openpkg 1.1.0
  +%define       V_openpkg 1.1.1
  +%define       R_openpkg 1.1.1
   
   #   the used software versions
   %define       V_rpm     4.0.2
  Index: openpkg-src/openpkg/rc
  ============================================================
  $ cvs diff -u -r1.14 -r1.14.2.1 rc
  --- openpkg-src/openpkg/rc    2 Apr 2002 12:04:46 -0000       1.14
  +++ openpkg-src/openpkg/rc    25 Nov 2002 13:24:01 -0000      1.14.2.1
  @@ -181,18 +181,22 @@
   fi
   
   #   determine current run-time user
  -user="$LOGNAME"
  +user="`(whoami) 2>/dev/null | awk '{ printf("%s", $1); }'`"
   if [ ".$user" = . ]; then
  -    user="$USER"
  +    user="`(who am i) 2>/dev/null | awk '{ printf("%s", $1); }'`"
       if [ ".$user" = . ]; then
  -        user="`(whoami) 2>/dev/null | awk '{ printf("%s", $1); }'`"
  +        user="$LOGNAME"
  +    fi
  +    if [ ".$user" = . ]; then
  +        echo "$0:ERROR: unable to determine current username" 1>&2
           if [ ".$user" = . ]; then
  -            user="`(who am i) 2>/dev/null | awk '{ printf("%s", $1); }'`"
  +            user="$USER"
               if [ ".$user" = . ]; then
                   echo "$0:ERROR: unable to determine current username" 1>&2
                   exit 1
               fi
           fi
  +        exit 1
       fi
   fi
   
  @@ -289,7 +293,10 @@
           fi
           if [ ".$print" = .1 -o ".$eval" = .1 ]; then
               echo ". $rcfunc" >>$tmpfile
  -            sed <$rcdir/rc.$s_name >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
  +            l_scripts=`ls $rcdir/rc.* | sed -e "s;^$rcdir/rc\.;;"`
  +            for l_name in $l_scripts; do
  +                sed <$rcdir/rc.$l_name >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
  +            done
               echo ". $rcconf" >>$tmpfile
               sed <$rcdir/rc.$s_name >>$tmpfile -e "1,/^%common/d" -e '/^%.*/,$d'
               sed <$rcdir/rc.$s_name >>$tmpfile -e "1,/^%$cmd/d" -e '/^%.*/,$d'
  @@ -301,7 +308,10 @@
               echo "set -x" >>$tmpfile
           fi
           echo ". $rcfunc" >>$tmpfile
  -        sed <$rcdir/rc.$s_name >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
  +        l_scripts=`ls $rcdir/rc.* | sed -e "s;^$rcdir/rc\.;;"`
  +        for l_name in $l_scripts; do
  +            sed <$rcdir/rc.$l_name >>$tmpfile -e "1,/^%config/d" -e '/^%.*/,$d'
  +        done
           echo ". $rcconf" >>$tmpfile
           sed <$rcdir/rc.$s_name >>$tmpfile -e "1,/^%common/d" -e '/^%.*/,$d'
           sed <$rcdir/rc.$s_name >>$tmpfile -e "1,/^%$cmd/d" -e '/^%.*/,$d'
  Index: openpkg-src/openpkg/rc.openpkg
  ============================================================
  $ cvs diff -u -r1.5 -r1.5.2.1 rc.openpkg
  --- openpkg-src/openpkg/rc.openpkg    12 Mar 2002 14:25:28 -0000      1.5
  +++ openpkg-src/openpkg/rc.openpkg    25 Nov 2002 13:24:01 -0000      1.5.2.1
  @@ -44,7 +44,7 @@
                 @l_prefix@/local/bin @l_prefix@/local/sbin
   
       #   make sure the software package manual pages are found
  -    export MANPATH; 
  +    export MANPATH
       opPathAdd -e MANPATH \
                 /usr/man /usr/share/man
       opPathAdd ${opt_prepend} MANPATH \
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to