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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-re                       Date:   04-Jul-2003 19:57:54
  Branch: HEAD                             Handle: 2003070418575400

  Modified files:
    openpkg-re              openpkg-dev

  Log:
    ok, add a quick hack: new option -x for lint and release commands for
    running the new (and still developed, hence the option) binary RPM
    linting utility

  Summary:
    Revision    Changes     Path
    1.114       +31 -1      openpkg-re/openpkg-dev
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-re/openpkg-dev
  ============================================================================
  $ cvs diff -u -r1.113 -r1.114 openpkg-dev
  --- openpkg-re/openpkg-dev    17 Jun 2003 16:07:02 -0000      1.113
  +++ openpkg-re/openpkg-dev    4 Jul 2003 17:57:54 -0000       1.114
  @@ -954,13 +954,15 @@
   }
   
   release () {
  -    #   honor optional parameters [-dry] [-m "message"]
  +    #   honor optional parameters [-dry] [-m "message"] [-x]
       dry=0
  +    extra=0
       msg=""
       packages=""
       while [ ".$1" != . ]; do
           case ".$1" in
               .-dry ) dry=1 ;;
  +            .-x   ) extra=1 ;;
               .-m   ) [ ".$2"    = . ] && die "-m option requires argument"
                       [ ".$msg" != . ] && die "-m can only be specified once"
                       shift
  @@ -1100,6 +1102,20 @@
                   fi
               fi
   
  +            if [ ".${BRANCH}" = .HEAD -a ".$extra" = .1 ]; then
  +                bin_template=`HOME=${OPENPKG_WORK} $E/bin/rpm --eval 
'%{_rpmfilename}'`
  +                bin_rpmfile=`HOME=${OPENPKG_WORK} $E/bin/rpm -q --qf 
"${bin_template}" \
  +                             --specfile ${OPENPKG_WORK}/src/${name}/${name}.spec`
  +                bin_rpmdir=`HOME=${OPENPKG_WORK} ${OPENPKG_INST}/bin/rpm --eval 
'%{_rpmdir}'`
  +                if [ -f "$bin_rpmdir/$bin_rpmfile" ]; then
  +                    echo "++ linting ${bin_rpmfile} for HEAD branch"
  +                    perl ${OPENPKG_WORK}/re/rpmlint.pl --check=layout,attrib 
$bin_rpmdir/$bin_rpmfile
  +                    if [ $? -gt 0 ]; then
  +                        die "unacceptable specification: $bin_rpmdir/$bin_rpmfile"
  +                    fi
  +                fi
  +            fi
  +
               echo "++ releasing ${rpmfile}.${ext} to OpenPKG distribution area 
${upload}"
               if [ ${dry} -eq 0 ]; then
                   chmod 664 ${OPENPKG_WORK}/pkg/src/${rpmfile}.${ext}
  @@ -1571,9 +1587,11 @@
   lint () {
       force=0
       packages=""
  +    extra=0
       while [ ".$1" != . ]; do
           case ".$1" in
               .-f ) force=1 ;;
  +            .-x ) extra=1 ;;
                 * ) packages="${packages} $1"
           esac
           shift
  @@ -1607,6 +1625,18 @@
               perl ${OPENPKG_WORK}/re/speclint.pl $file
               if [ $? -gt 0 -a $force -ne 1 ]; then
                   die "unacceptable specification"
  +            fi
  +            if [ ".$extra" = .1 ]; then
  +                bin_template=`HOME=${OPENPKG_WORK} $E/bin/rpm --eval 
'%{_rpmfilename}'`
  +                bin_rpmfile=`HOME=${OPENPKG_WORK} $E/bin/rpm -q --qf 
"${bin_template}" --specfile $file`
  +                bin_rpmdir=`HOME=${OPENPKG_WORK} ${OPENPKG_INST}/bin/rpm --eval 
'%{_rpmdir}'`
  +                if [ -f "$bin_rpmdir/$bin_rpmfile" ]; then
  +                    echo "++ Linting binary package: ${bin_rpmdir}/${bin_rpmfile}"
  +                    perl ${OPENPKG_WORK}/re/rpmlint.pl --check=layout,attrib 
$bin_rpmdir/$bin_rpmfile
  +                    if [ $? -gt 0 ]; then
  +                        die "unacceptable specification: $bin_rpmdir/$bin_rpmfile"
  +                    fi
  +                fi
               fi
           done
       done
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to