X-Git-Url: https://git.tld-linux.org/?a=blobdiff_plain;ds=sidebyside;f=wwwbin%2Fobsolete-check.sh;fp=wwwbin%2Fobsolete-check.sh;h=0000000000000000000000000000000000000000;hb=f7b22268ab563fa906be0653d037f1805e220e5c;hp=52a9f81e19bfc618f993f3dbf6773c65838e0905;hpb=b7b854ca43601a08077b7c4c4fa1313a198d936a;p=tld-ftp-admin.git diff --git a/wwwbin/obsolete-check.sh b/wwwbin/obsolete-check.sh deleted file mode 100755 index 52a9f81..0000000 --- a/wwwbin/obsolete-check.sh +++ /dev/null @@ -1,46 +0,0 @@ -#!/bin/sh -# check for packages on ftp whose .spec does not exist (anymore) -# this is extremely heavy on cvs server, so you run it once per month or so -# Author: Elan Ruusamäe - -export LC_ALL=C -ftpdir=$HOME/ftp -wwwdir=$HOME/www -CVSROOT=:pserver:cvs@cvs.pld-linux.org:/cvsroot -d=$- - -orphaned_pkgs() { - set -$d - [ -s $t/pkgs.desc ] || /usr/bin/poldek --skip-installed "$@" --cmd "desc *" > $t/pkgs.desc - [ -s $t/pkgs.lst ] || sed -n 's/^Source package: \(.*\)-[^-]\+-[^-]\+$/\1/p' $t/pkgs.desc | sort -u > $t/pkgs.lst - # {w32codec,acroread,...}-installer pkgs - sed -i -e 's,-installer$,,' $t/pkgs.lst - for pkg in $(cat $t/pkgs.lst); do - # use awk to match package without any regexp fuzz - awk -vpkg=$pkg.spec -vm=1 '$1 == pkg{m=0} END{exit m}' $t/cvs.lst || echo Obsolete: $pkg - done -} - -# generate list of .specs on ftp. needs cvsnt client -cvs_pkgs() { - set -$d - [ -s $t/cvs.raw ] || cvs -d $CVSROOT -Q ls -e packages > $t/cvs.raw 2>/dev/null - [ -s $t/cvs.dirs ] || awk -F/ '$1 == "D" { print $2 } ' $t/cvs.raw > $t/cvs.dirs - [ -s $t/cvs.specs ] || { - while read pkg; do - cvs -d $CVSROOT -Q ls -e packages/$pkg/$pkg.spec 2>/dev/null - done < $t/cvs.dirs > $t/cvs.lst.tmp && mv $t/cvs.lst.tmp $t/cvs.specs - } - [ -s $t/cvs.lst ] || awk -F/ '$1 == "" { print $2 } ' $t/cvs.specs > $t/cvs.lst -} - - -set -e -t=$(mktemp -d) -#t=/home/pld/admins/th/tmp/tmp.KOCrX7BtOy - -cvs_pkgs -orphaned_pkgs -s $ftpdir/PLD/i686/RPMS/ -s $ftpdir/PLD/noarch/RPMS/ > $t/orphaned.txt && cat $t/orphaned.txt > $wwwdir/main-orphaned4.txt - -chmod 644 $wwwdir/*.txt -#rm -rf $t