diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-09-26 23:04:41 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-09-26 23:04:41 +0200 |
| commit | 7e1ee3827be2a20fc4175315890be898123732fd (patch) | |
| tree | c58afca0231598d4e29a3980fd4447a8007abc5c | |
| parent | e709c67d58ddd99b11f8e6e466dca487a844a880 (diff) | |
| download | python-apt-7e1ee3827be2a20fc4175315890be898123732fd.tar.gz | |
* UpdateManager/Common/aptsources.py:
- bugfix in the enable_component() code
| -rw-r--r-- | UpdateManager/Common/aptsources.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/UpdateManager/Common/aptsources.py b/UpdateManager/Common/aptsources.py index 836b8fae..0d716231 100644 --- a/UpdateManager/Common/aptsources.py +++ b/UpdateManager/Common/aptsources.py @@ -619,6 +619,8 @@ class Distribution: # e.g. "dapper", "dapper-updates") comps_per_dist = {} for s in sources: + if s.type != "deb": + continue if not comps_per_dist.has_key(s.dist): comps_per_dist[s.dist] = set() map(comps_per_dist[s.dist].add, s.comps) @@ -631,10 +633,18 @@ class Distribution: for source in sources: add_component_only_once(source, comps_per_dist) + # now do the same for source dists if self.get_source_code == True: - for source in self.source_code_sources: - if comp not in source.comps: - add_component_only_once(source, comps_per_dist) + comps_per_dist = {} + for s in sources: + if s.type != "deb-src": + continue + if not comps_per_dist.has_key(s.dist): + comps_per_dist[s.dist] = set() + map(comps_per_dist[s.dist].add, s.comps) + for source in self.source_code_sources: + if comp not in source.comps: + add_component_only_once(source, comps_per_dist) def disable_component(self, sourceslist, comp): |
