apt: handle inconsistent source repo state.

If deb-src lines aren't available for every deb line then
softwareproperties will report it as inconsistent, with
None. The apt backend tried to pass this directly as
the "enabled" parameter, which fails as it should be able to
be considered an integer. We instead substitute False.

Thanks to Baptiste Mille-Mathias for reporting and testing.
This commit is contained in:
James Westby 2008-09-10 19:30:23 +01:00
parent 9161d1593d
commit 163547429e

View File

@ -827,7 +827,7 @@ class PackageKitAptBackend(PackageKitBaseBackend):
# Emit distro's virtual source code repositoriy
if not FILTER_NOT_DEVELOPMENT in filter_list:
repo_id = "%s_source" % repos.distro.id
enabled = repos.get_source_code_state()
enabled = repos.get_source_code_state() or False
#FIXME: no translation :(
description = "%s %s - Source code" % (repos.distro.id,
repos.distro.release)