# check-sources-list <sources.list file> <reprepro.config file> <log file>
# FIXME: Split this into checking sources.list itself and against reprepro and Release files
# FIXME: update apt repository checks against the format documentation
# https://wiki.debian.org/DebianRepository/Format
logging.warning('arch option in deb-src entry: %s', entry.text)
if entry.type == 'deb' and 'arch' in entry.options and entry.options['arch'] and [arch for arch in entry.options['arch'] if arch not in archs]:
# FIXME: highlight which architectures are new
logging.info('new architecture(s): %s', entry.text)
if entry.uri.scheme not in ('ftp', 'http', 'https'):
logging.warning('deb-src without matching deb entry: %s %s %s', uri, dist, ','.join(types['deb-src']))
elif 'deb-src' not in types:
# FIXME: print the component name instead of the architecture list
logging.warning('deb without matching deb-src entry: %s %s %s', uri, dist, ','.join(types['deb']))
elif set.union(*types['deb'].values()) != set.union(*types['deb-src'].values()):
# FIXME: ignore d-i subcomponents, their source is in the main component
logging.warning('mismatched deb/deb-src entries: %s %s %s != %s', uri, dist,
','.join(set.union(*types['deb'].values())), ','.join(set.union(*types['deb-src'].values())))
conf_url = os.path.join(derivative['RepoUrl'], 'conf/distributions')
if not any(name in repos[derivative['RepoUrl']] for name in names):
# FIXME: add a mechanism to ignore Ubuntu related suites
logging.warning('Distribution %s is missing from the sources.list but is present in the reprepro config %s',
pretty_name, conf_url)
rel = Release(f)
try:
# FIXME: check sources.list is using Suite rather than Codename
# FIXME: check for mismatch between Architectures and binary-*/ files
names, pretty_name = preparation_for_checking(rel)
miss_types = check_type(found_url, rel, links[found_url])
# FIXME: change the filename to a URL
print_warning(miss_types, pretty_name, fn, 'release file')
except:
# compare-source-package-list <sources.list> <apt dir> <files list> <patches list> <links list> <new package list> <log file>
# FIXME: write out some statistics and rrdtool graphs
# source package types per derivative
# number of source packages
# cache misses: md5, sha256, sha1, patch, changelog
# FIXME: comment the code to list assumptions and function purpose
# FIXME: add options to allow re-processing only specific packages
# FIXME: write something to clean up old files and patches
# FIXME: don't unpack or make a patch when we don't have all the parts
# FIXME: don't make a patch when we were not able to unpack the source package
# FIXME: cleanup files at start of run
# FIXME: extract new debian/patches/ patches
# FIXME: print out packages that are no longer in Debian
# FIXME: deal with really large patches:
# FIXME: kde-l10n-*: too few parts to be useful
# FIXME: divergence: too many changelog entries between versions to be useful
# FIXME: derivative is older than Debian
# FIXME: derivative renamed the source package
# FIXME: just a really big diff
# FIXME: when there are multiple dsc files in snapshots, prefer the debian/debian-archive one
# FIXME: when the source package is ancient and the dsc is missing, make a fake one to use
# FIXME: add an in-memory cache of hashes so that hashes in multiple releases hit the disk once
# FIXME: deal with rate-limited websites like alioth that do not like many requests
# FIXME: demote this to info for new files: snapshot database issue, no Debian files found
# FIXME: delete debian patch when it is identical to the general patch
# FIXME: replace lsdiff with PatchSet? (check speed)
# FIXME: catch psycopg2 errors and avoid sending them to subscribers
# FIXME: write a sources.missing file for broken 404 packages
import re