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

  Server: cvs.openpkg.org                  Name:   Thomas Lotterer
  Root:   /e/openpkg/cvs                   Email:  [EMAIL PROTECTED]
  Module: openpkg-tools                    Date:   31-Jan-2005 11:37:10
  Branch: HEAD                             Handle: 2005013110371000

  Modified files:
    openpkg-tools/cmd       bf-mk.pl

  Log:
    erase obsolete files to reclaim disk space (integrate my old janitor
    script)

  Summary:
    Revision    Changes     Path
    1.5         +24 -0      openpkg-tools/cmd/bf-mk.pl
  ____________________________________________________________________________

  patch -p0 <<'@@ .'
  Index: openpkg-tools/cmd/bf-mk.pl
  ============================================================================
  $ cvs diff -u -r1.4 -r1.5 bf-mk.pl
  --- openpkg-tools/cmd/bf-mk.pl        26 Jan 2005 14:43:13 -0000      1.4
  +++ openpkg-tools/cmd/bf-mk.pl        31 Jan 2005 10:37:10 -0000      1.5
  @@ -472,6 +472,30 @@
           %{driver.ln} $source/$srpm $target/
       done
   
  +    #   erase obsolete DST packages for SLAVE
  +    %{driver.shtool} echo -e "%B++ [EMAIL PROTECTED]:%{shared.prefix}: erase 
obsolete DST packages for SLAVE%b"
  +    reference="%{shared.prefix}/src/$HOST-$ARCH-$OS"
  +    cleanthis="%{shared.prefix}/dst/$HOST-$ARCH-$OS"
  +    for item in `cd $cleanthis && ls 2>/dev/null -1 *-*-*.*-*-*.rpm \
  +        | sed -e 
's;^\(.*-[^-][^-]*-[^-][^-]*\)\.[^-][^-]*-[^-][^-]*-[^-][^-]*\.rpm$;\1;' \
  +        | sort`; do #aide-0.10-20040920.ix86-freebsd4.10-openpkg.rpm => 
aide-0.10-20040920
  +        if [ ! -f "$reference/$item.src.rpm" ]; then
  +            rm $cleanthis/$item.*-*-*.rpm
  +        fi
  +    done
  +
  +    #   erase obsolete LOG files for SLAVE
  +    %{driver.shtool} echo -e "%B++ [EMAIL PROTECTED]:%{shared.prefix}: erase 
obsolete LOG files for SLAVE%b"
  +    reference="%{shared.prefix}/src/$HOST-$ARCH-$OS"
  +    cleanthis="%{shared.prefix}/log/$HOST-$ARCH-$OS"
  +    for item in `cd $cleanthis && ls 2>/dev/null -1 *-*-*.log.*.*-*-* \
  +        | sed -e 
's;^\(.*-[^-][^-]*-[^-][^-]*\)\.log\.[^.][^.]*\.[^-][^-]*-[^-][^-]*-[^-][^-]*$;\1;'
 \
  +        | sort`; do #aide-0.10-20040206.log.dv1.ix86-freebsd4.9-openpkg => 
aide-0.10-20040206
  +        if [ ! -f "$reference/$item.src.rpm" ]; then
  +            rm $cleanthis/$item.log.*.*-*-*
  +        fi
  +    done
  +
       #   erase packages from SLAVE OpenPKG instance
       %{driver.shtool} echo -e "%B++ [EMAIL PROTECTED]:%{shared.prefix}: erase 
packages from SLAVE OpenPKG instance%b"
       ( cd $target && %{driver.make} \
  @@ .
______________________________________________________________________
The OpenPKG Project                                    www.openpkg.org
CVS Repository Commit List                     openpkg-cvs@openpkg.org

Reply via email to