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

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-re                       Date:   03-Feb-2004 17:24:04
  Branch: HEAD                             Handle: 2004020316240400

  Modified files:
    openpkg-re              openpkg-dev

  Log:
    migrage vcheck to track (untested) omitting vc.* files; reserve room
    for test command

  Summary:
    Revision    Changes     Path
    1.151       +24 -51     openpkg-re/openpkg-dev
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-re/openpkg-dev
  ============================================================================
  $ cvs diff -u -r1.150 -r1.151 openpkg-dev
  --- openpkg-re/openpkg-dev    20 Jan 2004 12:56:01 -0000      1.150
  +++ openpkg-re/openpkg-dev    3 Feb 2004 16:24:04 -0000       1.151
  @@ -1274,7 +1274,7 @@
   
               echo "++ determining commit file list"
               files="src/${name}"
  -            for file in re/vcheck/vc.${name} web/news.txt; do
  +            for file in web/news.txt; do
                   if [ -f "${OPENPKG_WORK}/$file" ]; then
                       files="$files $file"
                   fi
  @@ -1474,6 +1474,13 @@
                 echo "%description"
                 echo "    ${name} is the most badly packaged program in the OpenPKG 
world."
                 echo ""
  +              echo "%track"
  +              echo "    prog ${name} = {"
  +              echo "      version     = 7.42"
  +              echo "      url         = ftp://ftp.${name}.org/pub/${name}/";
  +              echo "      regex       = ${name}-(__VER__)\.tar\.gz"
  +              echo "    }"
  +              echo ""
                 echo "%prep"
                 echo "    %setup -q"
                 echo ""
  @@ -1509,28 +1516,6 @@
                   echo "cd ${OPENPKG_WORK}/src/${name} && cvs -d ${OPENPKG_REPO} add 
${name}.spec"
               fi
           fi
  -
  -        echo "++ creating openpkg-re/vcheck/vc.${name} skeleton"
  -        if [ ${dry} -eq 0 ]; then
  -            ( echo "config = {"
  -              echo "}"
  -              echo ""
  -              echo "prog ${name} = {"
  -              echo "  version   = 7.42"
  -              echo "  url       = ftp://ftp.${name}.org/pub/${name}/";
  -              echo "  regex     = ${name}-(__VER__)\.tar\.gz"
  -              echo "}"
  -              echo ""
  -            ) >${OPENPKG_WORK}/re/vcheck/vc.${name}
  -            if [ ".${OPENPKG_MODE}" = .developer ]; then
  -                ( cd ${OPENPKG_WORK}/re/vcheck && cvs -d ${OPENPKG_REPO} add 
vc.${name} )
  -            fi
  -        else
  -            echo "creating ${OPENPKG_WORK}/re/vcheck/vc.${name}"
  -            if [ ".${OPENPKG_MODE}" = .developer ]; then
  -                echo "cd ${OPENPKG_WORK}/re/vcheck && cvs -d ${OPENPKG_REPO} add 
vc.${name}"
  -            fi
  -        fi
       done
   }
   
  @@ -1778,25 +1763,19 @@
       done
   }
   
  -vcheck () {
  -    edit=0
  -    check=0
  -    packages=""
  -    while [ ".$1" != . ]; do
  -        case ".$1" in
  -            .-e ) edit=1 ;;
  -            .-c ) check=1 ;;
  -              * ) packages="${packages} $1"
  -        esac
  -        shift
  -    done
  +testit () {
  +    # FIXME consider test() [shell function] vs. test(1) [builtin] vs. rpm 
[non-OpenPKG] --test
  +    $E/bin/rpm --help | grep -- --test >/dev/null && echo "$E/bin/rpm does not 
support --test" # FIXME s/echo/die/
  +    die "testit not yet implemented. Developer: consider testit vs. test(1)"
  +}
   
  -    #   if neither edit nor check specified, do both
  -    if [ ${edit} -eq 0 -a ${check} -eq 0 ]; then
  -        edit=1
  -        check=1
  -    fi
  +vcheck () {
  +    # compatiblity FIXME
  +    die "vcheck is deprecated. Use track."
  +}
   
  +track () {
  +    $E/bin/rpm --help | grep -- --track >/dev/null || die "$E/bin/rpm does not 
support --track"
       if [ ".${packages}" = . ]; then
           if [ ".$P" = . ]; then
               die "package cannot be identified. Neither parameter given nor \$P set."
  @@ -1806,16 +1785,7 @@
           all="${packages}"
       fi
       for name in $all; do
  -        if [ ! -f ${OPENPKG_WORK}/re/vcheck/vc.${name} ]; then
  -            die "version checking specification for package ${name} not found"
  -        fi
  -        if [ ${edit} -ne 0 ]; then
  -            command ${EDITOR-vim} ${OPENPKG_WORK}/re/vcheck/vc.${name}
  -        fi
  -        if [ ${check} -ne 0 ]; then
  -            ( cd ${OPENPKG_WORK}/re/vcheck && make run   PKG=${name} ) 2>/dev/null 
|| true
  -            ( cd ${OPENPKG_WORK}/re/vcheck && make clean PKG=${name} ) 2>/dev/null 
|| true
  -        fi
  +        $E/bin/rpm --track ${name}.spec --nodeps
       done
   }
   
  @@ -2039,8 +2009,9 @@
           \$ openpkg-dev run     # [[spec]...] [-dry] [-f] cmd   append cmd to %prep 
for spec and run rpm -bp
           \$ openpkg-dev search  # [[spec]...]                   search a package on 
master server
           \$ openpkg-dev setup   # [[[spec]ctag]exec]            initial setup of 
openpkg-dev working environment
  +        \$ openpkg-dev test    # [[spec]...]                   run functional test 
(reserved for future use)
  +        \$ openpkg-dev track   # [[spec]...]                   track version 
(formerly called vcheck)
           \$ openpkg-dev update  #                               update development 
environment from master server
  -        \$ openpkg-dev vcheck  # [[spec]...] [-c] [-e]         version check or 
edit (default both)
           \$ openpkg-dev vim     # [[spec]...] [-f]              spec edit and lint 
(if HEAD or forced)
           
--------------------------------------------------------------------------------------------------------
   EOF
  @@ -2087,6 +2058,8 @@
       run     | ru* ) cmd="run"     ;;
       search  | sea*) cmd="search"  ;;
       setup   | set*) cmd="setup"   ;;
  +    test    | te* ) cmd="test"    ;;
  +    track   | tr* ) cmd="track"   ;;
       update  | u*  ) cmd="update"  ;;
       vcheck  | vc* ) cmd="vcheck"  ;;
       vim     | vi* ) cmd="vim"     ;;
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     [EMAIL PROTECTED]

Reply via email to