This is mainly visible in the policy, so that you can now pin by b= and
let it only effect Packages files of this architecture and hence the
packages coming from it (which do not need to be from this architecture,
but very likely are in a normal repository setup).
If you should pin by architecture in this way is a different question…
Closes: 687255
if (Dist.empty())
Dist = "/";
::URI Tmp(URI);
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
return _error->Error("Problem with SelectFile %s",PackageFile.c_str());
// Store the IMS information
if (Prog != NULL)
Prog->SubProgress(0, Target.Description);
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
return _error->Error("Problem with SelectFile %s",TranslationFile.c_str());
// Store the IMS information
if (Prog != NULL)
Prog->SubProgress(0,File);
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
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);
// 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();
return _error->Error("Problem with SelectFile %s", DebFile.c_str());
pkgCache::PkgFileIterator File = Gen.GetCurFile();
if (Prog != NULL)
Prog->SubProgress(0,File);
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
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,
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)
{
std::string const &Component,
unsigned long const Flags)
{
if (unlikely(idxIndexType == 0))
return false;
CurrentFile->IndexType = idxIndexType;
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;
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;};
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;};
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;};