summaryrefslogtreecommitdiff
path: root/apt-pkg
diff options
context:
space:
mode:
authorDavid Kalnischkies <kalnischkies@gmail.com>2012-09-02 21:32:40 +0200
committerDavid Kalnischkies <kalnischkies@gmail.com>2012-09-02 21:32:40 +0200
commit8628c2f7a6a8769a6250280d62791a8429aa71ba (patch)
tree03e7e24e7ed7b2478cf7a14c7832f11d0c1896f2 /apt-pkg
parentd29a5330af408747363c944767f1af2212658bd1 (diff)
* apt-pkg/cdrom.cc:
- handle Components in the reduction for the source.list as multi-arch cds otherwise create duplicated source entries (e.g. "wheezy main main")
Diffstat (limited to 'apt-pkg')
-rw-r--r--apt-pkg/cdrom.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/apt-pkg/cdrom.cc b/apt-pkg/cdrom.cc
index 699f66fb3..8e746ee30 100644
--- a/apt-pkg/cdrom.cc
+++ b/apt-pkg/cdrom.cc
@@ -363,6 +363,7 @@ void pkgCdrom::ReduceSourcelist(string CD,vector<string> &List)
string Word1 = string(*I,Space,SSpace-Space);
string Prefix = string(*I,0,Space);
+ string Component = string(*I,SSpace);
for (vector<string>::iterator J = List.begin(); J != I; ++J)
{
// Find a space..
@@ -377,9 +378,11 @@ void pkgCdrom::ReduceSourcelist(string CD,vector<string> &List)
continue;
if (string(*J,Space2,SSpace2-Space2) != Word1)
continue;
-
- *J += string(*I,SSpace);
- *I = string();
+
+ string Component2 = string(*J, SSpace2) + " ";
+ if (Component2.find(Component + " ") == std::string::npos)
+ *J += Component;
+ I->clear();
}
}