]> git.saurik.com Git - apt.git/commitdiff
parse correctly the Hold: lines into Pkg->SelectedState = Hold
authorDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 2 May 2011 16:08:13 +0000 (18:08 +0200)
committerDavid Kalnischkies <kalnischkies@gmail.com>
Mon, 2 May 2011 16:08:13 +0000 (18:08 +0200)
apt-pkg/edsp/edsplistparser.cc

index 913455efa1b6aede40f71290ed807a5246315683..3349e8cce3c7482f5b5f674c82f02bf47a3fcdf0 100644 (file)
@@ -63,10 +63,13 @@ unsigned short edspListParser::VersionHash()
 bool edspListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
                                pkgCache::VerIterator &Ver)
 {
 bool edspListParser::ParseStatus(pkgCache::PkgIterator &Pkg,
                                pkgCache::VerIterator &Ver)
 {
-   if (Section.FindFlag("Hold",Pkg->Flags,pkgCache::State::Installed) == false)
+   unsigned long state = 0;
+   if (Section.FindFlag("Hold",state,pkgCache::State::Hold) == false)
       return false;
       return false;
+   if (state != 0)
+      Pkg->SelectedState = pkgCache::State::Hold;
 
 
-   unsigned long state = 0;
+   state = 0;
    if (Section.FindFlag("Installed",state,pkgCache::State::Installed) == false)
       return false;
    if (state != 0)
    if (Section.FindFlag("Installed",state,pkgCache::State::Installed) == false)
       return false;
    if (state != 0)