summaryrefslogtreecommitdiff
path: root/cron-jobs/check_archlinux
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-01-14 16:37:23 -0500
committerAaron Griffin <aaronmgriffin@gmail.com>2009-01-14 16:37:23 -0500
commit6e0ea2deb4f28baeebef2c549c30daee60f8e8d7 (patch)
tree9435980a4ad6367b8118eaedac330b306d788741 /cron-jobs/check_archlinux
parent3fb6203f79434d48954f6ef3c5be7067beaccd86 (diff)
parent5f64e9993a494040b0280ed0f1daa38f68f9c46b (diff)
Merge branch 'master' of file:///srv/projects/git/dbscripts
Conflicts: db-update Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'cron-jobs/check_archlinux')
-rwxr-xr-xcron-jobs/check_archlinux/check_packages.py23
-rwxr-xr-xcron-jobs/check_archlinux/parse_pkgbuilds.sh9
2 files changed, 22 insertions, 10 deletions
diff --git a/cron-jobs/check_archlinux/check_packages.py b/cron-jobs/check_archlinux/check_packages.py
index 69b14c3..f0fd4a5 100755
--- a/cron-jobs/check_archlinux/check_packages.py
+++ b/cron-jobs/check_archlinux/check_packages.py
@@ -49,11 +49,11 @@ class Depend:
self.version = version
self.mod = mod
-def parse_pkgbuilds(repos):
+def parse_pkgbuilds(repos,arch):
oldcwd = os.getcwd()
os.chdir(absroot)
for repo in repos:
- data = commands.getoutput(oldcwd + '/parse_pkgbuilds.sh ' + repo)
+ data = commands.getoutput(oldcwd + '/parse_pkgbuilds.sh ' + arch + ' ' + repo)
parse_data(repo,data)
os.chdir(oldcwd)
@@ -292,24 +292,27 @@ def print_usage():
print "Usage: ./check_packages.py [OPTION]"
print ""
print "Options:"
- print " --abs-tree=<path> Check specified tree (default : /var/abs)"
- print " --repos=<r1,r2,...> Check specified repos (default : core,extra)"
+ print " --abs-tree=<path> Check the specified tree (default : /var/abs)"
+ print " --repos=<r1,r2,...> Check the specified repos (default : core,extra)"
+ print " --arch=<i686|x86_64> Check the specified arch (default : i686)"
print " -h, --help Show this help and exit"
print ""
print "Examples:"
print "\n Check core and extra in existing abs tree:"
- print " ./check_packages.py --abs-tree=/var/abs --repos=core,extra"
+ print " ./check_packages.py --abs-tree=/var/abs --repos=core,extra --arch=i686"
print "\n Check community:"
- print " ./check_packages.py --abs-tree=/var/abs --repos=community"
+ print " ./check_packages.py --abs-tree=/var/abs --repos=community --arch=i686"
print ""
## Default path to the abs root directory
absroot = "/var/abs"
## Default list of repos to check
repos = ['core', 'extra']
+## Default arch
+arch = "i686"
try:
- opts, args = getopt.getopt(sys.argv[1:], "", ["abs-tree=", "repos="])
+ opts, args = getopt.getopt(sys.argv[1:], "", ["abs-tree=", "repos=", "arch="])
except getopt.GetoptError:
print_usage()
sys.exit()
@@ -319,6 +322,8 @@ if opts != []:
absroot = a
elif o in ("--repos"):
repos = a.split(",")
+ elif o in ("--arch"):
+ arch = a
else:
print_usage()
sys.exit()
@@ -339,11 +344,11 @@ loadrepos = set([])
for repo in repos:
loadrepos = loadrepos | set(get_repo_hierarchy(repo))
-print_heading("Integrity Check")
+print_heading("Integrity Check " + arch + " of " + ",".join(repos))
print "\nPerforming integrity checks..."
print "==> parsing pkgbuilds"
-parse_pkgbuilds(loadrepos)
+parse_pkgbuilds(loadrepos,arch)
repopkgs = {}
for name,pkg in packages.iteritems():
diff --git a/cron-jobs/check_archlinux/parse_pkgbuilds.sh b/cron-jobs/check_archlinux/parse_pkgbuilds.sh
index d4205ae..47aec89 100755
--- a/cron-jobs/check_archlinux/parse_pkgbuilds.sh
+++ b/cron-jobs/check_archlinux/parse_pkgbuilds.sh
@@ -1,5 +1,10 @@
#!/bin/bash
+# Usage : parse_pkgbuilds.sh arch <pkgbuilds_dir1,dir2,...>
+# Example : parse_pkgbuilds.sh i686 /var/abs/core /var/abs/extra
+
+exit() { return; }
+
parse() {
unset pkgname pkgver pkgrel
unset depends makedepends conflicts provides
@@ -67,10 +72,12 @@ find_pkgbuilds() {
fi
}
-if [ -z "$*" ]; then
+if [ -z "$1" -o -z "$2" ]; then
exit 1
fi
+CARCH=$1
+shift
for dir in "$@"; do
find_pkgbuilds $dir
done