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
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 */
}