diff options
author | Robert Buchholz <rbu@gentoo.org> | 2009-07-03 08:59:56 +0000 |
---|---|---|
committer | Robert Buchholz <rbu@gentoo.org> | 2009-07-03 08:59:56 +0000 |
commit | 0ef3c0bac5be41ba82de091241059c3478a4c9e8 (patch) | |
tree | db41394aa256297fda26ac34a9c5a8269f2dbc2f /bin | |
parent | libtiff (diff) | |
download | security-0ef3c0bac5be41ba82de091241059c3478a4c9e8.tar.gz security-0ef3c0bac5be41ba82de091241059c3478a4c9e8.tar.bz2 security-0ef3c0bac5be41ba82de091241059c3478a4c9e8.zip |
make import bugzilla compatible to latest pybugz, delete cache files only after download
svn path=/; revision=1457
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/target | 5 | ||||
-rwxr-xr-x | bin/update | 30 |
2 files changed, 20 insertions, 15 deletions
@@ -95,7 +95,10 @@ def print_targets(version, liaisons, prestable, bugno, username): def cc_arches_to(bugno, username, message, cc_add, auth): try: - import bugz + try: + import bugz.bugzilla as bugz + except ImportError: + import bugz import re except: return @@ -36,29 +36,31 @@ fi # Update all cached files -mkdir -p cache -cd cache -rm -f allitems.html{,.gz} +mkdir -p cache/download.tmp +cd cache/download.tmp echo "[DOWNLOAD] MITRE Master database" wget ${VERB} http://cve.mitre.org/data/downloads/allitems.html.gz gunzip allitems.html.gz +mv allitems.html .. -echo "===============================================================================" -echo "[DOWNLOAD] NVD Last Modified file" -wget --timestamping ${VERB} http://nvd.nist.gov/download/nvdcve-modified.xml - +YEARS='modified' if [ -n "${FULL}" ] ; then - echo "===============================================================================" - YEAR=`date +"%Y"` - echo "[DOWNLOAD] NVD Database 2002..${YEAR}" - for yr in `seq 2002 ${YEAR}`; do - [ -f nvdcve-$yr.xml ] || touch nvdcve-$yr.xml - wget --timestamping ${VERB} http://nvd.nist.gov/download/nvdcve-$yr.xml || true - done + YEAR=`date +"%Y"` + YEARS="$YEARS `seq ${YEAR} -1 2002`" fi echo "===============================================================================" +for yr in $YEARS; do + echo "[DOWNLOAD] NVD Database '$yr'" + cp ../nvdcve-$yr.xml . || touch nvdcve-$yr.xml + wget --timestamping ${VERB} http://nvd.nist.gov/download/nvdcve-$yr.xml && mv nvdcve-$yr.xml .. +done + +cd .. +rmdir download.tmp + +echo "===============================================================================" echo "[UPDATE] Updating our CVE data" NEWLIST="$(mktemp -t cveupdate.XXXXXXXXX)" |