summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJudd Vinet <judd@archlinux.org>2003-05-23 07:08:57 +0200
committerJudd Vinet <judd@archlinux.org>2003-05-23 07:08:57 +0200
commit9656502b826f7e7b22658a7091b30c73baeda958 (patch)
treed921dbabf4af861ced77a03149a35f25139d4b7a
parentc6a78c714e6dc0a814d954eb55ec0028e897f1f9 (diff)
downloaddbscripts-9656502b826f7e7b22658a7091b30c73baeda958.tar.gz
dbscripts-9656502b826f7e7b22658a7091b30c73baeda958.tar.xz
removed calls to htmlpkglist (no longer needed)
-rwxr-xr-xdb-arch7
-rwxr-xr-xdb-unstable9
-rwxr-xr-xpkgdb23
3 files changed, 10 insertions, 29 deletions
diff --git a/db-arch b/db-arch
index c6a7339..510637d 100755
--- a/db-arch
+++ b/db-arch
@@ -1,16 +1,11 @@
#!/bin/bash
-# $Id: db-arch,v 1.5 2003/05/21 23:07:33 judd Exp $
+# $Id: db-arch,v 1.6 2003/05/23 05:08:57 judd Exp $
echo "==> Updating ABS Tree..." >&2
cd /tmp
rm -rf arch
CVSROOT=:ext:judd@cvs.archlinux.org:/home/cvs-arch cvs -q export -r CURRENT -f arch/build
-echo "==> Rebuilding HTML Package List..." >&2
-cd /tmp/arch/build
-rm -f packages.txt
-/arch/htmlpkglist arch
-mv pkgs_arch_name.html pkgs_arch_cat.html /home/sites/archlinux/htdocs/pkglists
/arch/pkgdb 1
echo "==> Generating Text Package List..." >&2
diff --git a/db-unstable b/db-unstable
index 4d76d9e..45c69c7 100755
--- a/db-unstable
+++ b/db-unstable
@@ -1,5 +1,5 @@
#!/bin/bash
-# $Id: db-unstable,v 1.2 2003/05/21 23:07:33 judd Exp $
+# $Id: db-unstable,v 1.3 2003/05/23 05:08:57 judd Exp $
echo "==> Generating pacsync2 Database for UNSTABLE..." >&2
cd /tmp
@@ -7,13 +7,6 @@ CVS_RSH=ssh CVSROOT=:ext:cvs.archlinux.org:/home/cvs-unstable cvs -q export -r C
/usr/bin/gensync /tmp/unstable /tmp/unstable.db.tar.gz
[ -f /tmp/unstable.db.tar.gz ] && mv -f /tmp/unstable.db.tar.gz /home/ftp/unstable
-echo "==> Rebuilding HTML Package List..." >&2
-cd /tmp/unstable
-rm -f packages.txt
-/arch/htmlpkglist unstable
-cp -f pkgs_unstable_name.html /home/sites/archlinux/htdocs/pkglists
-cp -f pkgs_unstable_cat.html /home/sites/archlinux/htdocs/pkglists
-rm pkgs_unstable_name.html pkgs_unstable_cat.html
/arch/pkgdb 3
rm -rf /tmp/unstable
diff --git a/pkgdb b/pkgdb
index b063da7..b394e3a 100755
--- a/pkgdb
+++ b/pkgdb
@@ -1,5 +1,5 @@
#!/bin/bash
-# $Id: pkgdb,v 1.1 2003/05/21 23:07:33 judd Exp $
+# $Id: pkgdb,v 1.2 2003/05/23 05:08:57 judd Exp $
tl=`pwd`
TMPFILE=/tmp/.mysqltmp
@@ -20,6 +20,8 @@ for category in `find * -type d -maxdepth 0 | grep -v CVS | grep -v "^unofficial
for pkg in `ls $category | sort`; do
cd $tl/$category/$pkg
if [ -f PKGBUILD ]; then
+ unset depends source deplist sources
+ unset pkgname pkgver pkgrel pkgdesc url
. PKGBUILD
deplist=${depends[@]}
deplist=`php -r "echo addslashes(\"$deplist\");"`
@@ -29,29 +31,20 @@ for category in `find * -type d -maxdepth 0 | grep -v CVS | grep -v "^unofficial
pkgver=`php -r "echo addslashes(\"$pkgver\");"`
pkgrel=`php -r "echo addslashes(\"$pkgrel\");"`
pkgdesc=`php -r "echo addslashes(\"$pkgdesc\");"`
+ url=`php -r "echo addslashes(\"$url\");"`
mysql -u $dbuser -p$dbpass $dbname >$TMPFILE <<_EOF
-SELECT id FROM packages WHERE repoid=$repoid AND pkgname='$pkgname';
+SELECT id,pkgver,pkgrel FROM packages WHERE repoid=$repoid AND pkgname='$pkgname';
_EOF
- id=`tail -1 $TMPFILE`
+ id=`tail -1 $TMPFILE | awk '{print $1}'`
if [ "$id" != "" ]; then
- mysql -u $dbuser -p$dbpass $dbname >$TMPFILE <<_EOF
-SELECT pkgver,pkgrel FROM packages WHERE repoid=$repoid AND pkgname='$pkgname';
-_EOF
- oldver=`tail -1 $TMPFILE | awk '{print $1}'`
- oldrel=`tail -1 $TMPFILE | awk '{print $2}'`
+ oldver=`tail -1 $TMPFILE | awk '{print $2}'`
+ oldrel=`tail -1 $TMPFILE | awk '{print $3}'`
if [ "$oldver" != "$pkgver" -o "$oldrel" != "$pkgrel" ]; then
mysql -u $dbuser -p$dbpass $dbname <<_EOF
UPDATE packages SET category='$category',pkgname='$pkgname',pkgver='$pkgver',
pkgrel='$pkgrel',pkgdesc='$pkgdesc',url='$url',sources='$sources',
depends='$deplist',lastupdate=NOW() WHERE id='$id';
_EOF
- else
- mysql -u $dbuser -p$dbpass $dbname <<_EOF
-UPDATE packages SET category='$category',pkgname='$pkgname',pkgver='$pkgver',
-pkgrel='$pkgrel',pkgdesc='$pkgdesc',url='$url',sources='$sources',
-depends='$deplist' WHERE id='$id';
-_EOF
-
fi
else
mysql -u $dbuser -p$dbpass $dbname <<_EOF