summaryrefslogtreecommitdiffstats
path: root/cron-jobs
diff options
context:
space:
mode:
authorHenning Garus <henning.garus@gmail.com>2009-09-01 23:54:47 +0200
committerAaron Griffin <aaronmgriffin@gmail.com>2009-09-18 22:18:10 +0200
commita46bca9a39b37e7574f87468ddc5fb9b9577786e (patch)
treee573407df6e3aa4889a3d1e4b567cc548a6079d4 /cron-jobs
parent915c5ce3119c84aedf30c14d0e9a87a84510271a (diff)
downloaddbscripts-a46bca9a39b37e7574f87468ddc5fb9b9577786e.tar.gz
dbscripts-a46bca9a39b37e7574f87468ddc5fb9b9577786e.tar.xz
check_packages.py: Allow multiple abs-trees
By parsing multiple abs trees we can add any when parsing the other trees, checking any standalone doesn't make much sense. Signed-off-by: Henning Garus <henning.garus@gmail.com> Signed-off-by: Xavier Chantry <shiningxc@gmail.com> Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'cron-jobs')
-rwxr-xr-xcron-jobs/check_archlinux/check_packages.py32
-rwxr-xr-xcron-jobs/integrity-check2
2 files changed, 18 insertions, 16 deletions
diff --git a/cron-jobs/check_archlinux/check_packages.py b/cron-jobs/check_archlinux/check_packages.py
index f2a9601..c12858d 100755
--- a/cron-jobs/check_archlinux/check_packages.py
+++ b/cron-jobs/check_archlinux/check_packages.py
@@ -51,10 +51,11 @@ class Depend:
self.mod = mod
def parse_pkgbuilds(repos,arch):
- for repo in repos:
- data = commands.getoutput(os.path.dirname(sys.argv[0]) + '/parse_pkgbuilds.sh '
- + arch + ' ' + absroot + '/' + repo)
- parse_data(repo,data)
+ for absroot in absroots:
+ for repo in repos:
+ data = commands.getoutput(os.path.dirname(sys.argv[0]) + '/parse_pkgbuilds.sh '
+ + arch + ' ' + absroot + '/' + repo)
+ parse_data(repo,data)
def parse_data(repo,data):
attrname = None
@@ -332,9 +333,9 @@ def print_usage():
print "Usage: ./check_packages.py [OPTION]"
print ""
print "Options:"
- print " --abs-tree=<path> Check the specified tree (default : /var/abs)"
+ print " --abs-tree=<path[,path]> Check the specified tree(s) (default : /var/abs)"
print " --repos=<r1,r2,...> Check the specified repos (default : core,extra)"
- print " --arch=<any|i686|x86_64> Check the specified arch (default : i686)"
+ print " --arch=<i686|x86_64> Check the specified arch (default : i686)"
print " -h, --help Show this help and exit"
print ""
print "Examples:"
@@ -345,7 +346,7 @@ def print_usage():
print ""
## Default path to the abs root directory
-absroot = "/var/abs"
+absroots = ["/var/abs"]
## Default list of repos to check
repos = ['core', 'extra']
## Default arch
@@ -359,7 +360,7 @@ except getopt.GetoptError:
if opts != []:
for o, a in opts:
if o in ("--abs-tree"):
- absroot = a
+ absroot = a.split(',')
elif o in ("--repos"):
repos = a.split(",")
elif o in ("--arch"):
@@ -371,14 +372,15 @@ if opts != []:
print_usage()
sys.exit()
-if not os.path.isdir(absroot):
- print "Error : the abs tree " + absroot + " does not exist"
- sys.exit()
-for repo in repos:
- repopath = absroot + "/" + repo
- if not os.path.isdir(repopath):
- print "Error : the repository " + repo + " does not exist in " + absroot
+for absroot in absroots:
+ if not os.path.isdir(absroot):
+ print "Error : the abs tree " + absroot + " does not exist"
sys.exit()
+ for repo in repos:
+ repopath = absroot + "/" + repo
+ if not os.path.isdir(repopath):
+ print "Error : the repository " + repo + " does not exist in " + absroot
+ sys.exit()
# repos which need to be loaded
loadrepos = set([])
for repo in repos:
diff --git a/cron-jobs/integrity-check b/cron-jobs/integrity-check
index 0b59064..b3185ec 100755
--- a/cron-jobs/integrity-check
+++ b/cron-jobs/integrity-check
@@ -9,5 +9,5 @@ fi
$basedir/check_archlinux/check_packages.py \
--repos="$1" \
- --abs-tree="/srv/abs/rsync/$2" --arch="$2" |\
+ --abs-tree="/srv/abs/rsync/$2,/srv/abs/rsync/any" --arch="$2" |\
$basedir/devlist-mailer "Integrity Check $2: $1" "$3"