summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Heinlein <sebi@sebi-laptop>2006-11-29 23:30:44 +0100
committerSebastian Heinlein <sebi@sebi-laptop>2006-11-29 23:30:44 +0100
commit5a560798e3132b8b6a0836067eb3dc41c59c72c5 (patch)
tree8f8d296ac0fd27fb935eb1cd7f66e0a382de0a5a
parent4a03902d2f62bbcf74de14cd3712d74459044614 (diff)
downloadpython-apt-5a560798e3132b8b6a0836067eb3dc41c59c72c5.tar.gz
* also add new components to source repositories
-rw-r--r--AptSources/aptsources.py12
1 files changed, 7 insertions, 5 deletions
diff --git a/AptSources/aptsources.py b/AptSources/aptsources.py
index ffb882f9..7cfd56c2 100644
--- a/AptSources/aptsources.py
+++ b/AptSources/aptsources.py
@@ -593,12 +593,13 @@ class Distribution:
# store what comps are enabled already per distro (where distro is
# e.g. "dapper", "dapper-updates")
comps_per_dist = {}
+ comps_per_sdist = {}
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)
+ if s.type == "deb" and comps_per_dist.has_key(s.dist):
+ map(comps_per_dist[s.dist].add, s.comps)
+ elif s.type == "deb-src" and comps_per_dist.has_key(s.dist):
+ map(comps_per_sdist[s.dist].add, s.comps)
+
# check if there is a main source at all
if len(self.main_sources) < 1:
# create a new main source
@@ -607,6 +608,7 @@ class Distribution:
# add the comp to all main, child and source code sources
for source in sources:
add_component_only_once(source, comps_per_dist)
+ add_component_only_once(source, comps_per_sdist)
# now do the same for source dists
if self.get_source_code == True: