class AptUrl(object):
" a class that contains the parsed data from a apt url "
def __init__(self): self.package = None
self.schema = None self.keyfile = None
self.minver = None self.repo_url = None self.refresh = None
self.dist = '/' self.section = []
And in apturl, change code starting from 266 to be:
# FIXME: ask before adding stuff to the sources.list
# check if we need to fiddle with the sources.list
if apturl.section and apturl.repo_url is None:
ret = enable_section(apturl, cache)
if ret != RESULT_OK: error(_("Enabling '%s' failed") % ",".join(apturl.section)) continue
cache = apt.Cache()
# FIXME2: this has security implications, not enabled
#elif apturl.repo_url is not None:
# if not enable_repo(apturl):
# error(_("Enabling '%s' failed") % apturl.repo_url)
# continue
# run_update(dia)
elif apturl.refresh is not None: run_update(dia)
Here's a patch.
In Parser.py, change the AptUrl class to be:
class AptUrl(object):
self.package = None
self.keyfile = None
self.repo_ url = None
self.refresh = None
self.section = []
" a class that contains the parsed data from a apt url "
def __init__(self):
self.schema = None
self.minver = None
self.dist = '/'
And in apturl, change code starting from 266 to be:
# FIXME: ask before adding stuff to the sources.list section( apturl, cache)
error( _("Enabling '%s' failed") % ",".join( apturl. section) )
continue repo(apturl) :
run_update( dia)
# check if we need to fiddle with the sources.list
if apturl.section and apturl.repo_url is None:
ret = enable_
if ret != RESULT_OK:
cache = apt.Cache()
# FIXME2: this has security implications, not enabled
#elif apturl.repo_url is not None:
# if not enable_
# error(_("Enabling '%s' failed") % apturl.repo_url)
# continue
# run_update(dia)
elif apturl.refresh is not None: