]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/pkgcache.cc
apt-pkg/pkgcache.cc: fix typo
[apt.git] / apt-pkg / pkgcache.cc
index 7e3b9d78c9a5a58ebbb8913d69a5b421dc5f821f..4fbf42c4bb6c4f82dd919ad8fbe2647eb58df06d 100644 (file)
@@ -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. */
    
    /* Whenever the structures change the major version should be bumped,
       whenever the generator changes the minor version should be bumped. */
-   MajorVersion = 6;
+   MajorVersion = 7;
    MinorVersion = 0;
    Dirty = false;
    
    MinorVersion = 0;
    Dirty = false;
    
@@ -274,7 +274,13 @@ 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 ||
+      //we don't need to care for triggers awaiting packages
+      //dpkg will deal with them automatically when the 
+      //trigger pending action is run (those packages are usually
+      //in half-configured or triggers-pending state)
+      //Pkg->CurrentState == pkgCache::State::TriggersAwaited
+       Pkg->CurrentState == pkgCache::State::TriggersPending)
       return NeedsConfigure;
    
    if (Pkg->CurrentState == pkgCache::State::HalfInstalled ||
       return NeedsConfigure;
    
    if (Pkg->CurrentState == pkgCache::State::HalfInstalled ||
@@ -620,7 +626,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;
 };