projects
/
apt.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
debian/changelog: make the build-dep changelog entry match (debian) reality
[apt.git]
/
apt-pkg
/
pkgcache.cc
diff --git
a/apt-pkg/pkgcache.cc
b/apt-pkg/pkgcache.cc
index 162ab4f279f4e3e90d7f700389eb98befeb64ec7..8eb62089a8369af4c23f89b07045a71804ed5169 100644
(file)
--- a/
apt-pkg/pkgcache.cc
+++ b/
apt-pkg/pkgcache.cc
@@
-20,11
+20,6
@@
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
##################################################################### */
/*}}}*/
// Include Files /*{{{*/
-#ifdef __GNUG__
-#pragma implementation "apt-pkg/pkgcache.h"
-#pragma implementation "apt-pkg/cacheiterators.h"
-#endif
-
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/indexfile.h>
#include <apt-pkg/version.h>
#include <apt-pkg/pkgcache.h>
#include <apt-pkg/indexfile.h>
#include <apt-pkg/version.h>
@@
-54,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. */
/* Whenever the structures change the major version should be bumped,
whenever the generator changes the minor version should be bumped. */
- MajorVersion =
5
;
+ MajorVersion =
7
;
MinorVersion = 0;
Dirty = false;
MinorVersion = 0;
Dirty = false;
@@
-228,8
+223,8
@@
const char *pkgCache::DepType(unsigned char Type)
{
const char *Types[] = {"",_("Depends"),_("PreDepends"),_("Suggests"),
_("Recommends"),_("Conflicts"),_("Replaces"),
{
const char *Types[] = {"",_("Depends"),_("PreDepends"),_("Suggests"),
_("Recommends"),_("Conflicts"),_("Replaces"),
- _("Obsoletes")};
- if (Type <
8
)
+ _("Obsoletes")
,_("Breaks")
};
+ if (Type <
sizeof(Types)/sizeof(*Types)
)
return Types[Type];
return "";
}
return Types[Type];
return "";
}
@@
-279,7
+274,9
@@
pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const
return NeedsUnpack;
if (Pkg->CurrentState == pkgCache::State::UnPacked ||
return NeedsUnpack;
if (Pkg->CurrentState == pkgCache::State::UnPacked ||
- Pkg->CurrentState == pkgCache::State::HalfConfigured)
+ Pkg->CurrentState == pkgCache::State::HalfConfigured ||
+ Pkg->CurrentState == pkgCache::State::TriggersPending ||
+ Pkg->CurrentState == pkgCache::State::TriggersAwaited)
return NeedsConfigure;
if (Pkg->CurrentState == pkgCache::State::HalfInstalled ||
return NeedsConfigure;
if (Pkg->CurrentState == pkgCache::State::HalfInstalled ||
@@
-292,10
+289,11
@@
pkgCache::PkgIterator::OkState pkgCache::PkgIterator::State() const
// DepIterator::IsCritical - Returns true if the dep is important /*{{{*/
// ---------------------------------------------------------------------
/* Currently critical deps are defined as depends, predepends and
// DepIterator::IsCritical - Returns true if the dep is important /*{{{*/
// ---------------------------------------------------------------------
/* Currently critical deps are defined as depends, predepends and
- conflicts. */
+ conflicts
(including dpkg's Breaks fields)
. */
bool pkgCache::DepIterator::IsCritical()
{
if (Dep->Type == pkgCache::Dep::Conflicts ||
bool pkgCache::DepIterator::IsCritical()
{
if (Dep->Type == pkgCache::Dep::Conflicts ||
+ Dep->Type == pkgCache::Dep::DpkgBreaks ||
Dep->Type == pkgCache::Dep::Obsoletes ||
Dep->Type == pkgCache::Dep::Depends ||
Dep->Type == pkgCache::Dep::PreDepends)
Dep->Type == pkgCache::Dep::Obsoletes ||
Dep->Type == pkgCache::Dep::Depends ||
Dep->Type == pkgCache::Dep::PreDepends)
@@
-381,6
+379,7
@@
pkgCache::Version **pkgCache::DepIterator::AllTargets()
continue;
if ((Dep->Type == pkgCache::Dep::Conflicts ||
continue;
if ((Dep->Type == pkgCache::Dep::Conflicts ||
+ Dep->Type == pkgCache::Dep::DpkgBreaks ||
Dep->Type == pkgCache::Dep::Obsoletes) &&
ParentPkg() == I.ParentPkg())
continue;
Dep->Type == pkgCache::Dep::Obsoletes) &&
ParentPkg() == I.ParentPkg())
continue;
@@
-397,6
+396,7
@@
pkgCache::Version **pkgCache::DepIterator::AllTargets()
continue;
if ((Dep->Type == pkgCache::Dep::Conflicts ||
continue;
if ((Dep->Type == pkgCache::Dep::Conflicts ||
+ Dep->Type == pkgCache::Dep::DpkgBreaks ||
Dep->Type == pkgCache::Dep::Obsoletes) &&
ParentPkg() == I.OwnerPkg())
continue;
Dep->Type == pkgCache::Dep::Obsoletes) &&
ParentPkg() == I.OwnerPkg())
continue;
@@
-622,7
+622,8
@@
pkgCache::DescIterator pkgCache::VerIterator::TranslatedDescription() const
for (; Desc.end() == false; Desc++)
if (pkgIndexFile::LanguageCode() == Desc.LanguageCode())
break;
for (; Desc.end() == false; Desc++)
if (pkgIndexFile::LanguageCode() == Desc.LanguageCode())
break;
- if (Desc.end() == true) Desc = DescDefault;
+ if (Desc.end() == true)
+ Desc = DescDefault;
return Desc;
};
return Desc;
};