Git-Url:
http://git.frugalware.org/gitweb/gitweb.cgi?p=vmexam.git;a=commitdiff;h=8f70c370b112303cb9ebbca55d2a0d732b8c5e7d
commit 8f70c370b112303cb9ebbca55d2a0d732b8c5e7d
Author: Miklos Vajna <[EMAIL PROTECTED]>
Date: Tue Dec 4 15:39:39 2007 +0100
wipcheck.py: import
diff --git a/python/wipcheck.py b/python/wipcheck.py
new file mode 100644
index 0000000..9ba37a1
--- /dev/null
+++ b/python/wipcheck.py
@@ -0,0 +1,32 @@
+import os, sys
+
+# a simple script to check if there are outdated pkgs in a wip repo
+# usage: wipcheck.py bmf frugalware-current
+
+def vercmp(a, b):
+ sock = os.popen("vercmp %s %s" % (a, b))
+ buf = sock.readline()
+ sock.close()
+ return int(buf)
+
+wip = sys.argv[1]
+current = sys.argv[2]
+
+sock = os.popen("pacman-g2 -Sl")
+buf = sock.readlines()
+sock.close()
+
+wpkgs = {}
+cpkgs = {}
+
+for i in buf:
+ if i.startswith(wip + " "):
+ l = i.split(' ')
+ wpkgs[l[1]] = l[2].strip()
+ if i.startswith(current + " "):
+ l = i.split(' ')
+ cpkgs[l[1]] = l[2].strip()
+
+for k, v in wpkgs.items():
+ if k in cpkgs.keys() and vercmp(v, cpkgs[k]) < 0:
+ print "%s-%s is in %s, but %s is in %s, that's bad" % (k, v,
wip, cpkgs[k], current)
_______________________________________________
Frugalware-git mailing list
[email protected]
http://frugalware.org/mailman/listinfo/frugalware-git