summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/generic/apt/matching/match.cc33
1 files changed, 21 insertions, 12 deletions
diff --git a/src/generic/apt/matching/match.cc b/src/generic/apt/matching/match.cc
index 9556aee0..44430ab7 100644
--- a/src/generic/apt/matching/match.cc
+++ b/src/generic/apt/matching/match.cc
@@ -907,8 +907,9 @@ namespace aptitude
{
pkgCache::VerIterator ver(target.get_version_iterator(cache));
- if(p->get_architecture_architecture() == ver.Arch())
- return match::make_atomic(p);
+ if(p->get_architecture_architecture().empty() == true ||
+ p->get_architecture_architecture() == ver.Arch())
+ return match::make_atomic(p, ver.Arch());
else
return NULL;
}
@@ -1163,12 +1164,16 @@ namespace aptitude
break;
case pattern::foreign_architecture:
- if(target.get_has_version() &&
- aptitude::apt::is_foreign_arch(target.get_version_iterator(cache)))
- return match::make_atomic(p);
- else
+ if(!target.get_has_version())
return NULL;
- break;
+
+ {
+ pkgCache::VerIterator ver(target.get_version_iterator(cache));
+ if(aptitude::apt::is_foreign_arch(ver))
+ return match::make_atomic(p, ver.Arch());
+ else
+ return NULL;
+ }
case pattern::garbage:
if(!target.get_has_version())
@@ -1250,12 +1255,16 @@ namespace aptitude
break;
case pattern::native_architecture:
- if(target.get_has_version() &&
- aptitude::apt::is_native_arch(target.get_version_iterator(cache)))
- return match::make_atomic(p);
- else
+ if(!target.get_has_version())
return NULL;
- break;
+
+ {
+ pkgCache::VerIterator ver(target.get_version_iterator(cache));
+ if(aptitude::apt::is_native_arch(ver))
+ return match::make_atomic(p, ver.Arch());
+ else
+ return NULL;
+ }
case pattern::new_tp:
if(!target.get_has_version())