summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2015-06-17 19:22:13 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2015-08-10 17:25:25 +0200
commitddb286525d196b53683533648425c5c8f5288839 (patch)
treeb705c2c37dd7e88e0fe35c508de8973e46e09039
parentc687384b7a53887ea455fd824824429615d94f7b (diff)
simplify Origin matchmaking for status files
The old check is overly complicated nowadays as we have a pretty defining difference between packages from a Packages files coming from with a Release file (even if the file itself doesn't exist) and packages coming from the dpkg.status or directly out of *.deb's as these have no associated Release file. Git-Dch: Ignore
-rw-r--r--apt-pkg/versionmatch.cc7
1 files changed, 2 insertions, 5 deletions
diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc
index c215f522c..2376ca8fd 100644
--- a/apt-pkg/versionmatch.cc
+++ b/apt-pkg/versionmatch.cc
@@ -281,12 +281,9 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File)
if (OrSite.empty() == false) {
if (File.Site() == NULL)
return false;
- } else // so we are talking about file:// or status file
- {
- pkgCache::RlsFileIterator const RlsFile = File.ReleaseFile();
- if (strcmp(File.Site(),"") == 0 && RlsFile->Archive != 0 && strcmp(RlsFile.Archive(),"now") == 0) // skip the status file
- return false;
}
+ else if (File->Release == 0)// only 'bad' files like dpkg.status file has no release file
+ return false;
return (ExpressionMatches(OrSite, File.Site())); /* both strings match */
}