How to debug empty sources.list

Symptom

There are unspecific errors in your /etc/apt/sources.list.d/* or these lists are empty. Then you can try to debug the problem with the following script:

Resolution

You can use this script:

#!/usr/bin/python
import sys
import traceback
import logging
import univention.debug as ud
from univention.updater import UniventionUpdater
updater = UniventionUpdater()
s=logging.StreamHandler()
updater.log.addHandler(s)
updater.log.setLevel("DEBUG")
print updater.print_version_repositories()
print updater.online_repository
print updater.server

ud.init('stderr', 0, 0)
ud.set_level(ud.NETWORK, ud.ALL)
import univention.updater.tools as uut
u = uut.UniventionUpdater()
start = uut.UCS_Version('4.1-0')
end = None
u.print_version_repositories( clean = True, dists = False, start = start, end = end )
u.print_component_repositories( clean=True, start=start, end=end, for_mirror_list=False )

Run itlike this: python sources-list-debug.py 2>&1 |tee sources-list-debug.log

You will find the complete output in the sources-list-debug.log and probably also helpful hints on the error.

1 Like