~ubuntu-core-dev/apt/ubuntu

« back to all changes in this revision

Viewing changes to apt-pkg/pkgcache.cc

* merged the apt-breaks-iwj branch
* pulled in the other remaining ubuntu changes

Show diffs side-by-side

added added

removed removed

Lines of Context:
49
49
   
50
50
   /* Whenever the structures change the major version should be bumped,
51
51
      whenever the generator changes the minor version should be bumped. */
52
 
   MajorVersion = 5;
 
52
   MajorVersion = 6;
53
53
   MinorVersion = 0;
54
54
   Dirty = false;
55
55
   
223
223
{
224
224
   const char *Types[] = {"",_("Depends"),_("PreDepends"),_("Suggests"),
225
225
                          _("Recommends"),_("Conflicts"),_("Replaces"),
226
 
                          _("Obsoletes")};
227
 
   if (Type < 8)
 
226
                          _("Obsoletes"),_("Breaks")};
 
227
   if (Type < sizeof(Types)/sizeof(*Types))
228
228
      return Types[Type];
229
229
   return "";
230
230
}
287
287
// DepIterator::IsCritical - Returns true if the dep is important       /*{{{*/
288
288
// ---------------------------------------------------------------------
289
289
/* Currently critical deps are defined as depends, predepends and
290
 
   conflicts. */
 
290
   conflicts (including dpkg's Breaks fields). */
291
291
bool pkgCache::DepIterator::IsCritical()
292
292
{
293
293
   if (Dep->Type == pkgCache::Dep::Conflicts ||
 
294
       Dep->Type == pkgCache::Dep::DpkgBreaks ||
294
295
       Dep->Type == pkgCache::Dep::Obsoletes ||
295
296
       Dep->Type == pkgCache::Dep::Depends ||
296
297
       Dep->Type == pkgCache::Dep::PreDepends)
376
377
            continue;
377
378
 
378
379
         if ((Dep->Type == pkgCache::Dep::Conflicts ||
 
380
              Dep->Type == pkgCache::Dep::DpkgBreaks ||
379
381
              Dep->Type == pkgCache::Dep::Obsoletes) &&
380
382
             ParentPkg() == I.ParentPkg())
381
383
            continue;
392
394
            continue;
393
395
         
394
396
         if ((Dep->Type == pkgCache::Dep::Conflicts ||
 
397
              Dep->Type == pkgCache::Dep::DpkgBreaks ||
395
398
              Dep->Type == pkgCache::Dep::Obsoletes) &&
396
399
             ParentPkg() == I.OwnerPkg())
397
400
            continue;