I checked if there are any package in main depending on non-free/contrib
# Check first choice of | only
$ ./dep1.py |sort
RC: Package capi4hylafax recommends on isdnactivecards in contrib
RN: Package flexbackup recommends on afio in non-free
I filed serious bug report to them. Should be resolved soon.
# Check any choice of |
$ ./dep2.py |sort
DC: Package conky depends on conky-all in contrib
DC: Package libphp-jpgraph depends on ttf-mscorefonts-installer in contrib
DN: Package clam-networkeditor depends on fglrx-glx in non-free
DN: Package fuse-emulator-common depends on spectrum-roms in non-free
DN: Package glchess depends on crafty in non-free
DN: Package globs depends on fglrx-glx in non-free
DN: Package libclam-qtmonitors1.4 depends on fglrx-glx in non-free
DN: Package libglw1-mesa-dev depends on libmotif-dev in non-free
DN: Package ocrfeeder depends on cuneiform in non-free
DN: Package rt4-apache2 depends on libapache2-mod-fastcgi in non-free
DN: Package xmhtml1-dev depends on libmotif-dev in non-free
DN: Package yagf depends on cuneiform in non-free
RC: Package capi4hylafax recommends on isdnactivecards in contrib
RC: Package libreoffice recommends on ttf-mscorefonts-installer in contrib
RC: Package vavoom recommends on game-data-packager in contrib
RN: Package flexbackup recommends on afio in non-free
RN: Package gscan2pdf recommends on cuneiform in non-free
RN: Package yatex recommends on ptex-jtex in non-free
Although not popular, 16 more packages having week but
depends/recommends dependency. Hmmm....
Anyway, I keep this info here as reminder.
Osamu
PS: Anyway, arttached quick scripts were handy. (Need to make this
cleaner.)
#!/usr/bin/python3
# vim: set sts=4 expandtab:
"""
dependency.py - check main dependency to non-main
Copyright (C) 2012 Osamu Aoki, Public Domain
"""
import sys, os, re
VERSION = '1.0.0'
def main():
# initialize
pkg = {'main':set(), 'non-free':set(), 'contrib':set()}
pkgline = re.compile("^Package: *")
depline = re.compile("^Depends: *")
recline = re.compile("^Recommends: *")
sugline = re.compile("^Suggests: *")
# 1st pass: make package list: pkg
for area in 'main', 'non-free', 'contrib':
p = '' # initialize
for line in open('packages.'+area, 'r'):
if pkgline.match(line):
p = line[9:-1]
pkg[area].add(p)
# 2nd pass: make package list: pkg
p = '' # initialize
for line in open('packages.main', 'r'):
if pkgline.match(line):
p = line[9:-1]
if depline.match(line):
# list of packages
dep = map((lambda x: x.strip()),
map((lambda x: re.sub('\(.*\)', '', x)),
map((lambda x: re.sub('\|.*$', '', x)),
line[9:-1].split(',')
)))
# check package source
for q in dep:
if q in pkg['main']:
pass
elif q in pkg['contrib']:
print("DC: Package " + p +" depends on " + q + " in contrib")
elif q in pkg['non-free']:
print("DN: Package " + p +" depends on " + q + " in non-free")
else:
pass
#print("DX: Package " + p +" depends on " + q + " but missing")
if recline.match(line):
# list of packages
dep = map((lambda x: x.strip()),
map((lambda x: re.sub('\(.*\)', '', x)),
map((lambda x: re.sub('\|.*$', '', x)),
line[12:-1].split(',')
)))
# check package source
for q in dep:
if q in pkg['main']:
pass
elif q in pkg['contrib']:
print("RC: Package " + p +" recommends on " + q + " in contrib")
elif q in pkg['non-free']:
print("RN: Package " + p +" recommends on " + q + " in non-free")
else:
pass
#print("RX: Package " + p +" recommends on " + q + " but missing")
if sugline.match(line):
# list of packages
dep = map((lambda x: x.strip()),
map((lambda x: re.sub('\(.*\)', '', x)),
map((lambda x: re.sub('\|.*$', '', x)),
line[10:-1].split(',')
)))
# check package source
for q in dep:
if q in pkg['main']:
pass
elif q in pkg['contrib']:
pass
#print("SC: Package " + p +" suggests on " + q + " in contrib")
elif q in pkg['non-free']:
pass
#print("SN: Package " + p +" suggests on " + q + " in non-free")
else:
pass
#print("SX: Package " + p +" suggests on " + q + " but missing")
if __name__ == '__main__':
main()
#!/usr/bin/python3
# vim: set sts=4 expandtab:
"""
dependency.py - check main dependency to non-main
Copyright (C) 2012 Osamu Aoki, Public Domain
"""
import sys, os, re
VERSION = '1.0.0'
def main():
# initialize
pkg = {'main':set(), 'non-free':set(), 'contrib':set()}
pkgline = re.compile("^Package: *")
depline = re.compile("^Depends: *")
recline = re.compile("^Recommends: *")
sugline = re.compile("^Suggests: *")
# 1st pass: make package list: pkg
for area in 'main', 'non-free', 'contrib':
p = '' # initialize
for line in open('packages.'+area, 'r'):
if pkgline.match(line):
p = line[9:-1]
pkg[area].add(p)
# 2nd pass: make package list: pkg
p = '' # initialize
for line in open('packages.main', 'r'):
if pkgline.match(line):
p = line[9:-1]
if depline.match(line):
# list of packages
dep = map((lambda x: x.strip()),
map((lambda x: re.sub('\(.*\)', '', x)),
re.sub('\|',',',line[9:-1]).split(',')
))
# check package source
for q in dep:
if q in pkg['main']:
pass
elif q in pkg['contrib']:
print("DC: Package " + p +" depends on " + q + " in contrib")
elif q in pkg['non-free']:
print("DN: Package " + p +" depends on " + q + " in non-free")
else:
pass
#print("DX: Package " + p +" depends on " + q + " but missing")
if recline.match(line):
# list of packages
dep = map((lambda x: x.strip()),
map((lambda x: re.sub('\(.*\)', '', x)),
re.sub('\|',',',line[12:-1]).split(',')
))
# check package source
for q in dep:
if q in pkg['main']:
pass
elif q in pkg['contrib']:
print("RC: Package " + p +" recommends on " + q + " in contrib")
elif q in pkg['non-free']:
print("RN: Package " + p +" recommends on " + q + " in non-free")
else:
pass
#print("RX: Package " + p +" recommends on " + q + " but missing")
if sugline.match(line):
# list of packages
dep = map((lambda x: x.strip()),
map((lambda x: re.sub('\(.*\)', '', x)),
re.sub('\|',',',line[10:-1]).split(',')
))
# check package source
for q in dep:
if q in pkg['main']:
pass
elif q in pkg['contrib']:
pass
#print("SC: Package " + p +" suggests on " + q + " in contrib")
elif q in pkg['non-free']:
pass
#print("SN: Package " + p +" suggests on " + q + " in non-free")
else:
pass
#print("SX: Package " + p +" suggests on " + q + " but missing")
if __name__ == '__main__':
main()
#######################################################################
# Check package dependency of main to non-free/contrib
# vim: set ts=8:
# Debian packge archive URL
#DEBM := http://ftp.us.debian.org/debian/dists
DEBM := http://ftp.jp.debian.org/debian/dists
CODE := sid
ARCH := amd64
UDEBA := $(DEBM)/$(CODE)
FILES := packages.main packages.non-free packages.contrib
#######################################################################
.PHONY: all
all: $(FILES)
#######################################################################
.PHONY: clean distclean
clean:
-rm -f $(FILES)
distclean: clean
packages.%:
wget -O - $(UDEBA)/$*/binary-$(ARCH)/Packages.bz2 | bzcat - |\
grep-dctrl -e -sPackage,Depends,Recommends,Suggests -P "." >
packages.$*