[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openpkg-cvs
Subject:    [CVS] OpenPKG: openpkg-src/uvscan/ rc.uvscan uvscan.spec
From:       "Ralf S. Engelschall" <rse () openpkg ! org>
Date:       2004-08-30 13:43:40
Message-ID: 20040830134340.E39B32FDA54 () mail ! openpkg ! org
[Download RAW message or body]

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

  Server: cvs.openpkg.org                  Name:   Ralf S. Engelschall
  Root:   /e/openpkg/cvs                   Email:  rse@openpkg.org
  Module: openpkg-src                      Date:   30-Aug-2004 15:43:40
  Branch: HEAD                             Handle: 2004083014434000

  Modified files:
    openpkg-src/uvscan      rc.uvscan uvscan.spec

  Log:
    make downloading more robust and perform retries

  Summary:
    Revision    Changes     Path
    1.4         +33 -6      openpkg-src/uvscan/rc.uvscan
    1.210       +1  -1      openpkg-src/uvscan/uvscan.spec
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-src/uvscan/rc.uvscan
  ============================================================================
  $ cvs diff -u -r1.3 -r1.4 rc.uvscan
  --- openpkg-src/uvscan/rc.uvscan	2 Aug 2004 18:08:49 -0000	1.3
  +++ openpkg-src/uvscan/rc.uvscan	30 Aug 2004 13:43:40 -0000	1.4
  @@ -11,11 +11,24 @@
   %common
       uvscan_update () {
           #   determine information
  -        uvscan_datadir="@l_prefix@/var/uvscan/data"
  -        uvscan_datfile=`@l_prefix@/bin/curl -s "$uvscan_dat" 2>/dev/null |\
  -                        grep 'dat-[0-9][0-9]*\.tar' | sort | tail -1 |\
  -                        sed -e 's;^.*\(dat-[0-9][0-9]*\.tar\).*$;\1;'`
  +        i=0
  +        while [ $i -lt 3 ]; do
  +            uvscan_datfile=`@l_prefix@/bin/curl -s "${uvscan_dat}" 2>/dev/null |\
  +                            grep 'dat-[0-9][0-9]*\.tar' | sort | tail -1 |\
  +                            sed -e 's;^.*\(dat-[0-9][0-9]*\.tar\).*$;\1;'`
  +            if [ ".${uvscan_datfile}" != . ]; then
  +                break
  +            else
  +                sleep 10
  +            fi
  +            i=$(($i + 1))
  +        done
  +        if [ ".${uvscan_datfile}" = . ]; then
  +            echo "rc:uvscan:ERROR: unable to determine latest DAT file version" 1>&2
  +            return 1
  +        fi
           uvscan_tmpdir=`echo "${uvscan_datfile}" | sed -e 's;\.tar$;;'`
  +        uvscan_datadir="@l_prefix@/var/uvscan/data"
   
           #   determine old (installed) and new (available) versions
           uvscan_version_new=`echo "${uvscan_datfile}" | sed -e 's;^dat-;;' -e 's;\.tar$;;'`
  @@ -29,8 +42,22 @@
           umask 077
           cd ${uvscan_datadir} || return 1
           rm -f ${uvscan_datfile} >/dev/null 2>&1 || true
  -        @l_prefix@/bin/curl -s -o ${uvscan_datfile} \
  -            ${uvscan_dat}/${uvscan_datfile} || return 1
  +        i=0
  +        while [ $i -lt 3 ]; do
  +            @l_prefix@/bin/curl -s -o ${uvscan_datfile} \
  +                ${uvscan_dat}/${uvscan_datfile} || return 1
  +            if [ $? -eq 0 ]; then
  +                break
  +            else
  +                rm -f ${uvscan_datfile} >/dev/null 2>&1 || true
  +                sleep 10
  +            fi
  +            i=$(($i + 1))
  +        done
  +        if [ ! -f ${uvscan_datfile} ]; then
  +            echo "rc:uvscan:ERROR: unable to download latest DAT file" 1>&2
  +            return 1
  +        fi
           rm -rf ${uvscan_tmpdir} >/dev/null 2>&1 || true
           mkdir ${uvscan_tmpdir}
           ( cd ${uvscan_tmpdir} && \
  @@ .
  patch -p0 <<'@@ .'
  Index: openpkg-src/uvscan/uvscan.spec
  ============================================================================
  $ cvs diff -u -r1.209 -r1.210 uvscan.spec
  --- openpkg-src/uvscan/uvscan.spec	26 Aug 2004 19:20:14 -0000	1.209
  +++ openpkg-src/uvscan/uvscan.spec	30 Aug 2004 13:43:40 -0000	1.210
  @@ -39,7 +39,7 @@
   Group:        Filesystem
   License:      Commercial/Free-Trial
   Version:      %{V_engine}.%{V_datfiles}
  -Release:      20040826
  +Release:      20040830
   
   #   list of sources
   Source0:      ftp://ftp.mcafee.com/pub/antivirus/datfiles/4.x/dat-%{V_datfiles}.tar
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic