if (Dist.empty())
Dist = "/";
::URI Tmp(URI);
- if (Gen.SelectFile(PackageFile, *this, Target.Option(IndexTarget::COMPONENT)) == false)
+ if (Gen.SelectFile(PackageFile, *this, Target.Option(IndexTarget::ARCHITECTURE), Target.Option(IndexTarget::COMPONENT)) == false)
return _error->Error("Problem with SelectFile %s",PackageFile.c_str());
// Store the IMS information
if (Prog != NULL)
Prog->SubProgress(0, Target.Description);
- if (Gen.SelectFile(TranslationFile, *this, Target.Option(IndexTarget::COMPONENT), pkgCache::Flag::NotSource) == false)
+ if (Gen.SelectFile(TranslationFile, *this, "", Target.Option(IndexTarget::COMPONENT), pkgCache::Flag::NotSource) == false)
return _error->Error("Problem with SelectFile %s",TranslationFile.c_str());
// Store the IMS information
if (Prog != NULL)
Prog->SubProgress(0,File);
- if (Gen.SelectFile(File, *this, "now", pkgCache::Flag::NotSource) == false)
+ if (Gen.SelectFile(File, *this, "", "now", pkgCache::Flag::NotSource) == false)
return _error->Error("Problem with SelectFile %s",File.c_str());
// Store the IMS information
// and give it to the list parser
debDebFileParser Parser(DebControl, DebFile);
- if(Gen.SelectFile(DebFile, *this, "now", pkgCache::Flag::LocalSource) == false)
+ if(Gen.SelectFile(DebFile, *this, "", "now", pkgCache::Flag::LocalSource) == false)
return _error->Error("Problem with SelectFile %s", DebFile.c_str());
pkgCache::PkgFileIterator File = Gen.GetCurFile();
if (Prog != NULL)
Prog->SubProgress(0,File);
- if (Gen.SelectFile(File, *this, "edsp") == false)
+ if (Gen.SelectFile(File, *this, "", "edsp") == false)
return _error->Error("Problem with SelectFile %s",File.c_str());
// Store the IMS information
added versions. The caller is responsible for setting the IMS fields. */
bool pkgCacheGenerator::SelectFile(std::string const &File,
pkgIndexFile const &Index,
+ std::string const &Architecture,
std::string const &Component,
unsigned long const Flags)
{
if (unlikely(idxIndexType == 0))
return false;
CurrentFile->IndexType = idxIndexType;
+ if (Architecture.empty())
+ CurrentFile->Architecture = 0;
+ else
+ {
+ map_stringitem_t const arch = StoreString(pkgCacheGenerator::MIXED, Architecture);
+ if (unlikely(arch == 0))
+ return false;
+ CurrentFile->Architecture = arch;
+ }
map_stringitem_t const component = StoreString(pkgCacheGenerator::MIXED, Component);
if (unlikely(component == 0))
return false;
inline map_stringitem_t StoreString(enum StringType const type, const std::string &S) {return StoreString(type, S.c_str(),S.length());};
void DropProgress() {Progress = 0;};
- bool SelectFile(const std::string &File,pkgIndexFile const &Index, std::string const &Component, unsigned long Flags = 0);
+ bool SelectFile(const std::string &File,pkgIndexFile const &Index, std::string const &Architecture, std::string const &Component, unsigned long Flags = 0);
bool SelectReleaseFile(const std::string &File, const std::string &Site, unsigned long Flags = 0);
bool MergeList(ListParser &List,pkgCache::VerIterator *Ver = 0);
inline pkgCache &GetCache() {return Cache;};