[Collab-qa-commits] r58 - / fileconflicts
Filippo Giunchedi
filippo at alioth.debian.org
Fri Mar 16 01:13:23 CET 2007
Author: filippo
Date: 2007-03-16 00:13:23 +0000 (Fri, 16 Mar 2007)
New Revision: 58
Added:
fileconflicts/
fileconflicts/Makefile
fileconflicts/README.txt
fileconflicts/get-conflicts.py
fileconflicts/parse-contents.py
fileconflicts/query-contents.py
fileconflicts/testing-conflicts
fileconflicts/testing-whitelist
fileconflicts/testing/
fileconflicts/unstable-conflicts
fileconflicts/unstable-whitelist
fileconflicts/unstable/
Log:
add fileconflicts scripts
Added: fileconflicts/Makefile
===================================================================
--- fileconflicts/Makefile 2007-03-15 18:09:45 UTC (rev 57)
+++ fileconflicts/Makefile 2007-03-16 00:13:23 UTC (rev 58)
@@ -0,0 +1,39 @@
+all: testing-conflicts unstable-conflicts
+
+testing-conflicts: testing/Packages.gz testing.db testing-whitelist
+ ./get-conflicts.py $^ > $@
+
+unstable-conflicts: unstable/Packages.gz unstable.db unstable-whitelist
+ ./get-conflicts.py $^ > $@
+
+unstable.db: unstable/Contents-i386.gz
+ ./parse-contents.py $^ $@
+
+testing.db: testing/Contents-i386.gz
+ ./parse-contents.py $^ $@
+
+testing/Contents-i386.gz: /org/ftp.debian.org/ftp/dists/testing/Contents-i386.gz
+# wget -O $@ http://ftp.it.debian.org/debian/dists/$@
+ cp /org/ftp.debian.org/ftp/dists/testing/Contents-i386.gz testing/Contents-i386.gz
+
+unstable/Contents-i386.gz: /org/ftp.debian.org/ftp/dists/unstable/Contents-i386.gz
+# wget -O $@ http://ftp.it.debian.org/debian/dists/$@
+ cp /org/ftp.debian.org/ftp/dists/unstable/Contents-i386.gz unstable/Contents-i386.gz
+
+testing/Packages.gz: /org/ftp.debian.org/ftp/dists/testing/main/binary-i386/Packages.gz
+ mkdir -p testing
+ #wget -O $@ http://ftp.it.debian.org/debian/dists/testing/main/binary-i386/Packages.gz
+ # change this to your local mirror or use the line above
+ cp /org/ftp.debian.org/ftp/dists/testing/main/binary-i386/Packages.gz testing/Packages.gz
+
+unstable/Packages.gz: /org/ftp.debian.org/ftp/dists/unstable/main/binary-i386/Packages.gz
+ mkdir -p unstable
+ #wget -O $@ http://ftp.it.debian.org/debian/dists/unstable/main/binary-i386/Packages.gz
+ # change this to your local mirror or use the line above
+ cp /org/ftp.debian.org/ftp/dists/unstable/main/binary-i386/Packages.gz unstable/Packages.gz
+
+clean:
+ -rm testing-conflicts unstable-conflicts
+
+reallyclean:
+ -rm unstable/Packages.gz testing/Packages.gz unstable/Contents-i386.gz testing/Contents-i386.gz unstable.db testing.db
Added: fileconflicts/README.txt
===================================================================
--- fileconflicts/README.txt 2007-03-15 18:09:45 UTC (rev 57)
+++ fileconflicts/README.txt 2007-03-16 00:13:23 UTC (rev 58)
@@ -0,0 +1,16 @@
+file conflicts between packages
+===============================
+
+testing-conflicts and unstable-conflicts contain file clashes between packages,
+the format is simple:
+
+package1 package2 .. packageN [ list_of_offending_files ]
+
+the list is generated for i386 based on Contents.gz file.
+
+only packages that do not have the Conflicts: field are listed.
+
+note that the list might contain false positives as packages might manage file
+clashes with alternatives (e.g. bitchx{-ssl})
+
+-- filippo (@) debian.org
Added: fileconflicts/get-conflicts.py
===================================================================
--- fileconflicts/get-conflicts.py 2007-03-15 18:09:45 UTC (rev 57)
+++ fileconflicts/get-conflicts.py 2007-03-16 00:13:23 UTC (rev 58)
@@ -0,0 +1,53 @@
+#!/usr/bin/python
+# released under the GPLv2
+# author: Filippo Giunchedi <filippo at debian.org>
+# outputs packages with common files but no Conflicts (as in: the field is not present)
+import os,apt_pkg,sys,cPickle
+
+# comment this line if using python >= 2.4
+from sets import Set as set
+
+if len(sys.argv) < 4:
+# whitelist is a one-per-line file with packages to exclude
+ print "usage: Packages.gz output.db whitelist"
+ sys.exit(1)
+
+packagesfile = sys.argv[1]
+stdin, stdout = os.popen2(["zcat", "--", packagesfile])
+#os.close(stdin)
+parse = apt_pkg.ParseTagFile(stdout)
+
+with_conflicts = set()
+whitelist = set([ x.strip('\n') for x in open(sys.argv[3]).readlines() if not x.startswith('#') ])
+
+while parse.Step():
+ try:
+ if parse.Section.has_key("Conflicts"):
+ with_conflicts.update([parse.Section["Package"]])
+ #pkgs[parse.Section["Package"]] = apt_pkg.ParseDepends(parse.Section["Conflicts"])
+ except KeyError:
+ pass
+
+f = open(sys.argv[2], 'r')
+dups = cPickle.load(f)
+f.close()
+
+out = {}
+
+# file => package1 .. packageN
+#print whitelist
+for k,v in dups.items():
+ if whitelist and set(v).intersection(whitelist):
+ continue
+
+ if not set(v).intersection(with_conflicts):
+# merge and reverse the output list:
+# package1 .. packageN => list_of_files
+ key = " ".join(dups[k])
+ if not out.has_key(key):
+ out[key] = []
+ out[key].append(k)
+
+for k in out.keys():
+ print k, out[k]
+ print
Property changes on: fileconflicts/get-conflicts.py
___________________________________________________________________
Name: svn:executable
+ *
Added: fileconflicts/parse-contents.py
===================================================================
--- fileconflicts/parse-contents.py 2007-03-15 18:09:45 UTC (rev 57)
+++ fileconflicts/parse-contents.py 2007-03-16 00:13:23 UTC (rev 58)
@@ -0,0 +1,28 @@
+#!/usr/bin/python
+# released under the GPLv2
+# author: Filippo Giunchedi <filippo at debian.org>
+# parses Contents.gz into a cpickled-.db file for later use
+import re, gzip, sys, cPickle
+
+dup_re = re.compile("^(\S+)\s+(\S+,\S+)+$")
+dups = {}
+
+def main():
+ if len(sys.argv) < 3:
+ print "usage: Contents.gz output.db"
+ sys.exit(1)
+
+ f = gzip.open(sys.argv[1])
+ for l in f.readlines():
+ m = dup_re.match(l)
+ if m:
+ # file -> list_of_packages
+ dups[m.group(1)] = [ x.split('/')[-1] for x in m.group(2).split(',')]
+
+ f.close()
+ f = open(sys.argv[2], 'w')
+ cPickle.dump(dups, f)
+ f.close()
+
+if __name__ == '__main__':
+ main()
Property changes on: fileconflicts/parse-contents.py
___________________________________________________________________
Name: svn:executable
+ *
Added: fileconflicts/query-contents.py
===================================================================
--- fileconflicts/query-contents.py 2007-03-15 18:09:45 UTC (rev 57)
+++ fileconflicts/query-contents.py 2007-03-16 00:13:23 UTC (rev 58)
@@ -0,0 +1,24 @@
+#!/usr/bin/python
+# released under the GPLv2
+# author: Filippo Giunchedi <filippo at debian.org>
+# queries the given db for optional package
+import cPickle, sys
+
+def main():
+ if len(sys.argv) < 2:
+ print "usage: contents.db [package]"
+ sys.exit(1)
+
+ f = open(sys.argv[1], 'r')
+ dups = cPickle.load(f)
+ f.close()
+
+ for k,v in dups.items():
+ if len(sys.argv) == 2:
+ print k,v
+ else:
+ if sys.argv[2] in v:
+ print k, dups[k]
+
+if __name__ == '__main__':
+ main()
Property changes on: fileconflicts/query-contents.py
___________________________________________________________________
Name: svn:executable
+ *
Added: fileconflicts/testing-conflicts
===================================================================
--- fileconflicts/testing-conflicts 2007-03-15 18:09:45 UTC (rev 57)
+++ fileconflicts/testing-conflicts 2007-03-16 00:13:23 UTC (rev 58)
@@ -0,0 +1,8 @@
+nvidia-kernel-2.6.18-4-486 nvidia-kernel-legacy-2.6.18-4-486 ['lib/modules/2.6.18-4-486/nvidia/nvidia.ko', 'usr/share/lintian/overrides/nvidia-kernel-2.6.18-4-486']
+
+nvidia-kernel-2.6.18-4-686 nvidia-kernel-legacy-2.6.18-4-686 ['usr/share/lintian/overrides/nvidia-kernel-2.6.18-4-686', 'lib/modules/2.6.18-4-686/nvidia/nvidia.ko']
+
+nvidia-glx nvidia-glx-legacy ['usr/bin/nvidia-bug-report.sh', 'usr/lib/libGLcore.so.1', 'usr/share/lintian/overrides/nvidia-glx', 'usr/lib/nvidia/tls_test', 'usr/lib/nvidia/tls_test_dso.so', 'usr/lib/libnvidia-tls.so.1', 'usr/share/bug/nvidia-glx/script', 'usr/lib/xorg/modules/drivers/nvidia_drv.o']
+
+nvidia-kernel-2.6.18-4-k7 nvidia-kernel-legacy-2.6.18-4-k7 ['lib/modules/2.6.18-4-k7/nvidia/nvidia.ko', 'usr/share/lintian/overrides/nvidia-kernel-2.6.18-4-k7']
+
Added: fileconflicts/testing-whitelist
===================================================================
--- fileconflicts/testing-whitelist 2007-03-15 18:09:45 UTC (rev 57)
+++ fileconflicts/testing-whitelist 2007-03-16 00:13:23 UTC (rev 58)
@@ -0,0 +1,62 @@
+unace
+unace-nonfree
+bitchx
+bitchx-ssl
+cdecl
+cutils
+dclock
+ivtools-bin
+finger
+finger-ldap
+g++
+pentium-builder
+loop-aes-utils
+mount
+runit
+runit-run
+xmms
+xmms-mpg123-ja
+amd64-libs-dev
+lib64bz2-dev
+bnetd
+pvpgn
+mesa-common-dev
+nvidia-glx-legacy-dev
+nvidia-glx-dev
+nvidia-glx-dev
+nvidia-glx-legacy-dev
+festvox-rablpc16k
+festvox-rablpc8k
+exim4-daemon-heavy-dbg
+exim4-daemon-light-dbg
+x11proto-gl-dev
+nvidia-glx-legacy-dev
+cmap-adobe-cns1
+xpdf-chinese-traditional
+liblzo-dev
+liblzo2-dev
+libtk-filedialog-perl
+horae
+libalps-light1
+libalps1
+crafty-books-medium
+crafty-books-small
+crafty-books-medtosmall
+cmap-adobe-japan1
+xpdf-japanese
+amd64-libs
+lib64bz2-1.0
+nvidia-kernel-2.6.18-3-k7
+nvidia-kernel-legacy-2.6.18-3-k7
+gnome-applets-data
+trashapplet
+gnokii-smsd
+smstools
+pimppa
+parmetis-test
+libsablevm-classlib1-java
+libsablevm-native1
+nvidia-kernel-2.6.18-3-686
+nvidia-kernel-legacy-2.6.18-3-686
+cmap-adobe-gb1
+xpdf-chinese-simplified
Added: fileconflicts/unstable-conflicts
===================================================================
--- fileconflicts/unstable-conflicts 2007-03-15 18:09:45 UTC (rev 57)
+++ fileconflicts/unstable-conflicts 2007-03-16 00:13:23 UTC (rev 58)
@@ -0,0 +1,20 @@
+libgoogle-perftools0 tau ['usr/bin/pprof']
+
+kernel-patch-bootsplash linux-patch-bootsplash ['usr/src/kernel-patches/diffs/bootsplash/bootsplash-3.1.4-2.6.10.diff.gz', 'usr/src/kernel-patches/diffs/bootsplash/bootsplash-3.0.7-2.4.23.diff.gz', 'usr/src/kernel-patches/all/unpatch/bootsplash', 'usr/src/kernel-patches/diffs/bootsplash/bootsplash-3.1.4-2.6.3.diff.gz', 'usr/src/kernel-patches/diffs/bootsplash/bootsplash-3.1.6-2.6.15-jtm.diff.gz', 'usr/src/kernel-patches/diffs/bootsplash/bootsplash-3.1.3-2.6.0-test9.diff.gz', 'usr/src/kernel-patches/diffs/bootsplash/bootsplash-3.0.7-2.4.18-vanilla.diff.gz', 'usr/src/kernel-patches/diffs/bootsplash/bootsplash-3.1.6-2.6.14.diff.gz', 'usr/src/kernel-patches/diffs/bootsplash/bootsplash-3.0.7-2.4.24-vanilla.diff.gz', 'usr/src/kernel-patches/diffs/bootsplash/bootsplash-3.0.7-2.4.20-vanilla.diff.gz', 'usr/src/kernel-patches/all/apply/bootsplash', 'usr/src/kernel-patches/diffs/bootsplash/bootsplash-3.0.7-2.4.22-vanilla.diff.gz']
+
+nvidia-kernel-2.6.18-4-486 nvidia-kernel-legacy-2.6.18-4-486 ['lib/modules/2.6.18-4-486/nvidia/nvidia.ko', 'usr/share/lintian/overrides/nvidia-kernel-2.6.18-4-486']
+
+nvidia-kernel-2.6.18-4-k7 nvidia-kernel-legacy-2.6.18-4-k7 ['lib/modules/2.6.18-4-k7/nvidia/nvidia.ko', 'usr/share/lintian/overrides/nvidia-kernel-2.6.18-4-k7']
+
+libtrace-tools ltt-visualizer ['usr/bin/tracedump']
+
+sun-java5-fonts sun-java6-fonts ['usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterBold.ttf', 'usr/share/fonts/truetype/ttf-lucida/LucidaSansRegular.ttf', 'usr/share/fonts/truetype/ttf-lucida/LucidaBrightItalic.ttf', 'usr/share/fonts/truetype/ttf-lucida/LucidaSansDemiOblique.ttf', 'usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterOblique.ttf', 'usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterRegular.ttf', 'usr/share/fonts/truetype/ttf-lucida/LucidaSansOblique.ttf', 'usr/share/fonts/truetype/ttf-lucida/LucidaBrightDemiBold.ttf', 'usr/share/fonts/truetype/ttf-lucida/LucidaTypewriterBoldOblique.ttf', 'usr/share/fonts/truetype/ttf-lucida/LucidaBrightDemiItalic.ttf', 'usr/share/fonts/truetype/ttf-lucida/LucidaSansDemiBold.ttf', 'usr/share/fonts/truetype/ttf-lucida/LucidaBrightRegular.ttf']
+
+synce-kde vdccm ['usr/share/man/man1/vdccm.1.gz', 'usr/bin/vdccm']
+
+openmpi-dev pgapack ['usr/include/mpi.h', 'usr/include/mpif.h']
+
+synce-dccm dcc-milter ['usr/bin/dccm']
+
+nvidia-kernel-2.6.18-4-686 nvidia-kernel-legacy-2.6.18-4-686 ['usr/share/lintian/overrides/nvidia-kernel-2.6.18-4-686', 'lib/modules/2.6.18-4-686/nvidia/nvidia.ko']
+
Added: fileconflicts/unstable-whitelist
===================================================================
--- fileconflicts/unstable-whitelist 2007-03-15 18:09:45 UTC (rev 57)
+++ fileconflicts/unstable-whitelist 2007-03-16 00:13:23 UTC (rev 58)
@@ -0,0 +1,86 @@
+grub
+grub2
+bitchx
+bitchx-ssl
+unace
+unace-nonfree
+xmms
+xmms-mpg123-ja
+lesstif-doc
+libmotif-dev
+g++
+pentium-builder
+loop-aes-utils
+mount
+mesa-common-dev
+nvidia-glx-legacy-dev
+nvidia-glx-dev
+amd64-libs-dev
+lib64bz2-dev
+nvidia-glx-dev
+nvidia-glx-legacy-dev
+runit-run
+sysvinit
+amavis-ng-milter-helper
+amavisd-new-milter
+bnetd
+pvpgn
+festvox-rablpc16k
+festvox-rablpc8k
+lesstif-bin
+libmotif-dev
+nvidia-kernel-2.6.18-3-486
+nvidia-kernel-legacy-2.6.18-3-486
+nvidia-glx
+nvidia-glx-legacy
+exim4-daemon-heavy-dbg
+exim4-daemon-light-dbg
+ggz-game-servers
+ggzd
+x11proto-gl-dev
+nvidia-glx-legacy-dev
+cmap-adobe-cns1
+xpdf-chinese-traditional
+liblzo-dev
+liblzo2-dev
+finger
+finger-ldap
+libtk-filedialog-perl
+horae
+libalps-light1
+libalps1
+dtc
+dtc-postfix-courier
+dclock
+ivtools-bin
+crafty-books-medium
+crafty-books-small
+crafty-books-medtosmall
+cdecl
+cutils
+cmap-adobe-japan1
+xpdf-japanese
+amd64-libs
+lib64bz2-1.0
+nvidia-kernel-2.6.18-3-k7
+nvidia-kernel-legacy-2.6.18-3-k7
+gnome-applets-data
+trashapplet
+lesstif-bin
+motif-clients
+gnokii-smsd
+smstools
+pimppa
+parmetis-test
+dbmail-mysql
+dbmail-pgsql
+libsablevm-classlib1-java
+libsablevm-native1
+nvidia-kernel-2.6.18-3-686
+nvidia-kernel-legacy-2.6.18-3-686
+cmap-adobe-gb1
+xpdf-chinese-simplified
+openmpi-dev
+pgapack
+sun-java5-fonts
+sun-java6-fonts
More information about the Collab-qa-commits
mailing list