~ubuntu-branches/ubuntu/precise/apt/precise

« back to all changes in this revision

Viewing changes to apt-pkg/versionmatch.h

  • Committer: Package Import Robot
  • Author(s): Steve Langasek, Michael Vogt, Steve Langasek
  • Date: 2012-01-29 00:44:16 UTC
  • mfrom: (1.5.31 experimental)
  • Revision ID: package-import@ubuntu.com-20120129004416-bekzupfdxpecxdu0
Tags: 0.8.16~exp12ubuntu1
[ Michael Vogt ]
* merge from debian/experimental:
  - new ABI

[ Steve Langasek ]
* apt-pkg/algorithms.cc: iterate Breaks the same way as Conflicts, so that
  we resolve virtual package Breaks more effectively.  Thanks to Colin
  Watson for the patch.  Closes: #657695, LP: #922485.
* apt-pkg/algorithms.{cc,h}: use an int to represent resolver scores, not
  a signed short, because large upgrades can result in an overflow for
  core packages.  Thanks again to Colin Watson.  Closes: #657732,
  LP: #917173.
* Multi-Arch: none build-deps should be DEB_HOST_ARCH, not DEB_BUILD_ARCH.
  Closes: #646288.

Show diffs side-by-side

added added

removed removed

Lines of Context:
39
39
#include <string>
40
40
#include <apt-pkg/pkgcache.h>
41
41
 
 
42
#ifndef APT_8_CLEANER_HEADERS
42
43
using std::string;
 
44
#endif
43
45
 
44
46
class pkgVersionMatch
45
47
{   
46
48
   // Version Matching
47
 
   string VerStr;
 
49
   std::string VerStr;
48
50
   bool VerPrefixMatch;
49
51
 
50
52
   // Release Matching
51
 
   string RelVerStr;
 
53
   std::string RelVerStr;
52
54
   bool RelVerPrefixMatch;
53
 
   string RelOrigin;
54
 
   string RelRelease;
55
 
   string RelCodename;
56
 
   string RelArchive;
57
 
   string RelLabel;
58
 
   string RelComponent;
59
 
   string RelArchitecture;
 
55
   std::string RelOrigin;
 
56
   std::string RelRelease;
 
57
   std::string RelCodename;
 
58
   std::string RelArchive;
 
59
   std::string RelLabel;
 
60
   std::string RelComponent;
 
61
   std::string RelArchitecture;
60
62
   bool MatchAll;
61
63
   
62
64
   // Origin Matching
63
 
   string OrSite;
 
65
   std::string OrSite;
64
66
   
65
67
   public:
66
68
   
67
69
   enum MatchType {None = 0,Version,Release,Origin} Type;
68
70
   
69
 
   bool MatchVer(const char *A,string B,bool Prefix);
 
71
   bool MatchVer(const char *A,std::string B,bool Prefix);
70
72
   bool ExpressionMatches(const char *pattern, const char *string);
71
73
   bool ExpressionMatches(const std::string& pattern, const char *string);
72
74
   bool FileMatch(pkgCache::PkgFileIterator File);
73
75
   pkgCache::VerIterator Find(pkgCache::PkgIterator Pkg);
74
76
                               
75
 
   pkgVersionMatch(string Data,MatchType Type);
 
77
   pkgVersionMatch(std::string Data,MatchType Type);
76
78
};
77
79
 
78
80
#endif