Browse Source

Introduce support for the Enhances field. (Closes: #137583)

debian/1.8.y
jak@debian.org 13 years ago
parent
commit
f8ae7e8b3c
  1. 2
      apt-pkg/deb/deblistparser.cc
  2. 4
      apt-pkg/pkgcache.cc
  3. 2
      apt-pkg/pkgcache.h
  4. 1
      debian/changelog

2
apt-pkg/deb/deblistparser.cc

@ -109,6 +109,8 @@ bool debListParser::NewVersion(pkgCache::VerIterator Ver)
return false;
if (ParseDepends(Ver,"Replaces",pkgCache::Dep::Replaces) == false)
return false;
if (ParseDepends(Ver,"Enhances",pkgCache::Dep::Enhances) == false)
return false;
// Obsolete.
if (ParseDepends(Ver,"Optional",pkgCache::Dep::Suggests) == false)

4
apt-pkg/pkgcache.cc

@ -49,7 +49,7 @@ pkgCache::Header::Header()
/* Whenever the structures change the major version should be bumped,
whenever the generator changes the minor version should be bumped. */
MajorVersion = 7;
MajorVersion = 8;
MinorVersion = 0;
Dirty = false;
@ -223,7 +223,7 @@ const char *pkgCache::DepType(unsigned char Type)
{
const char *Types[] = {"",_("Depends"),_("PreDepends"),_("Suggests"),
_("Recommends"),_("Conflicts"),_("Replaces"),
_("Obsoletes"),_("Breaks")};
_("Obsoletes"),_("Breaks"), _("Enhances")};
if (Type < sizeof(Types)/sizeof(*Types))
return Types[Type];
return "";

2
apt-pkg/pkgcache.h

@ -70,7 +70,7 @@ class pkgCache
struct Dep
{
enum DepType {Depends=1,PreDepends=2,Suggests=3,Recommends=4,
Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8};
Conflicts=5,Replaces=6,Obsoletes=7,DpkgBreaks=8,Enhances=9};
enum DepCompareOp {Or=0x10,NoOp=0,LessEq=0x1,GreaterEq=0x2,Less=0x3,
Greater=0x4,Equals=0x5,NotEquals=0x6};
};

1
debian/changelog

@ -24,6 +24,7 @@ apt (0.7.22) UNRELEASED; urgency=low
[ Julian Andres Klode ]
* apt-pkg/contrib/configuration.cc: Fix a small memory leak in
ReadConfigFile.
* Introduce support for the Enhances field. (Closes: #137583)
-- Christian Perrier <bubulle@debian.org> Wed, 22 Apr 2009 10:13:54 +0200

Loading…
Cancel
Save