// -*- mode: cpp; mode: fold -*-
// Description /*{{{*/
-// $Id: versionmatch.cc,v 1.7 2002/11/06 06:43:14 jgg Exp $
+// $Id: versionmatch.cc,v 1.9 2003/05/19 17:58:26 doogie Exp $
/* ######################################################################
Version Matching
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
-#ifdef __GNUG__
-#pragma implementation "apt-pkg/versionmatch.h"
-#endif
#include <apt-pkg/versionmatch.h>
#include <apt-pkg/strutl.h>
if (Type == Origin)
{
- if (OrSite.empty() == false)
- if (File->Site == 0 ||
- OrSite != File.Site())
+ if (OrSite.empty() == false) {
+ if (File->Site == 0 || OrSite != File.Site())
return false;
- return true;
+ } else // so we are talking about file:// or status file
+ if (strcmp(File.Site(),"") == 0 && File->Archive != 0) // skip the status file
+ return false;
+ return (OrSite == File.Site()); /* both strings match */
}
return false;