summaryrefslogtreecommitdiff
path: root/apt-pkg/versionmatch.cc
diff options
context:
space:
mode:
authorMichael Vogt <michael.vogt@ubuntu.com>2010-08-30 11:57:14 +0200
committerMichael Vogt <michael.vogt@ubuntu.com>2010-08-30 11:57:14 +0200
commit4cb0cd1648e4a2623cb00a11b2db2649e286706d (patch)
treef629993a945f63f26629affba9feac011e594eb3 /apt-pkg/versionmatch.cc
parent61110beb5f398b7f83fa8135bd4e04294ea408b4 (diff)
parentba91b1518a1208fecc1ca076fd9cfbd28344b5b3 (diff)
merged lp:~donkult/apt/sid
Diffstat (limited to 'apt-pkg/versionmatch.cc')
-rw-r--r--apt-pkg/versionmatch.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/apt-pkg/versionmatch.cc b/apt-pkg/versionmatch.cc
index 093180f9b..17a54bc4c 100644
--- a/apt-pkg/versionmatch.cc
+++ b/apt-pkg/versionmatch.cc
@@ -118,7 +118,10 @@ pkgVersionMatch::pkgVersionMatch(string Data,MatchType Type) : Type(Type)
if (Type == Origin)
{
- OrSite = Data;
+ if (Data[0] == '"' && Data.end()[-1] == '"')
+ OrSite = Data.substr(1, Data.length() - 2);
+ else
+ OrSite = Data;
return;
}
}
@@ -259,10 +262,10 @@ bool pkgVersionMatch::FileMatch(pkgCache::PkgFileIterator File)
if (Type == Origin)
{
if (OrSite.empty() == false) {
- if (File->Site == 0 || !ExpressionMatches(OrSite, File.Site()))
+ if (File->Site == 0)
return false;
} else // so we are talking about file:// or status file
- if (strcmp(File.Site(),"") == 0 && File->Archive != 0) // skip the status file
+ if (strcmp(File.Site(),"") == 0 && File->Archive != 0 && strcmp(File.Archive(),"now") == 0) // skip the status file
return false;
return (ExpressionMatches(OrSite, File.Site())); /* both strings match */
}