]> TLD Linux GIT Repositories - tld-ftp-admin.git/blobdiff - wwwbin/obsolete-check.sh
- tldized
[tld-ftp-admin.git] / wwwbin / obsolete-check.sh
diff --git a/wwwbin/obsolete-check.sh b/wwwbin/obsolete-check.sh
deleted file mode 100755 (executable)
index 52a9f81..0000000
+++ /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 <glen@pld-linux.org>
-
-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