diff options
author | David Kalnischkies <kalnischkies@gmail.com> | 2012-09-02 18:31:07 +0200 |
---|---|---|
committer | David Kalnischkies <kalnischkies@gmail.com> | 2012-09-02 18:31:07 +0200 |
commit | d29a5330af408747363c944767f1af2212658bd1 (patch) | |
tree | 0e1b63388f4bd512d5449aca5e4437d137ea1b48 /apt-pkg/indexcopy.cc | |
parent | 3542911a5ede0368f8e6258ad89eb5b5771e1281 (diff) |
* apt-pkg/indexcopy.cc:
- do not create duplicated flat-archive cdrom sources for foreign
architectures on multi-arch cdroms
Diffstat (limited to 'apt-pkg/indexcopy.cc')
-rw-r--r-- | apt-pkg/indexcopy.cc | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/apt-pkg/indexcopy.cc b/apt-pkg/indexcopy.cc index c97445326..24defd82c 100644 --- a/apt-pkg/indexcopy.cc +++ b/apt-pkg/indexcopy.cc @@ -350,9 +350,6 @@ bool IndexCopy::ReconstructChop(unsigned long &Chop,string Dir,string File) */ void IndexCopy::ConvertToSourceList(string CD,string &Path) { - char S[300]; - snprintf(S,sizeof(S),"binary-%s",_config->Find("Apt::Architecture").c_str()); - // Strip the cdrom base path Path = string(Path,CD.length()); if (Path.empty() == true) @@ -388,7 +385,13 @@ void IndexCopy::ConvertToSourceList(string CD,string &Path) return; string Binary = string(Path,Slash+1,BinSlash - Slash-1); - if (Binary != S && Binary != "source") + if (strncmp(Binary.c_str(), "binary-", strlen("binary-")) == 0) + { + Binary.erase(0, strlen("binary-")); + if (APT::Configuration::checkArchitecture(Binary) == false) + continue; + } + else if (Binary != "source") continue; Path = Dist + ' ' + Comp; |