]> git.saurik.com Git - apt.git/blobdiff - apt-pkg/edsp.cc
do not discard new manual-bits while applying EDSP solutions
[apt.git] / apt-pkg / edsp.cc
index 5c53581fef2f27617cf21bb8489963f7f441ae3a..90f20472e255100caf2063ed77010fb076da4983 100644 (file)
@@ -7,31 +7,25 @@
 // Include Files                                                       /*{{{*/
 #include <config.h>
 
 // Include Files                                                       /*{{{*/
 #include <config.h>
 
-#include <apt-pkg/edsp.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/cacheset.h>
 #include <apt-pkg/error.h>
 #include <apt-pkg/cacheset.h>
-#include <apt-pkg/configuration.h>
-#include <apt-pkg/tagfile.h>
-#include <apt-pkg/fileutl.h>
-#include <apt-pkg/progress.h>
 #include <apt-pkg/depcache.h>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/cacheiterators.h>
 #include <apt-pkg/depcache.h>
 #include <apt-pkg/pkgcache.h>
 #include <apt-pkg/cacheiterators.h>
+#include <apt-pkg/progress.h>
+#include <apt-pkg/fileutl.h>
+#include <apt-pkg/edsp.h>
+#include <apt-pkg/tagfile.h>
 #include <apt-pkg/strutl.h>
 #include <apt-pkg/strutl.h>
-#include <apt-pkg/pkgrecords.h>
 
 #include <ctype.h>
 #include <stddef.h>
 #include <string.h>
 
 #include <ctype.h>
 #include <stddef.h>
 #include <string.h>
-#include <time.h>
 #include <unistd.h>
 #include <stdio.h>
 #include <unistd.h>
 #include <stdio.h>
-#include <algorithm>
 #include <iostream>
 #include <iostream>
-#include <vector>
 #include <limits>
 #include <string>
 #include <limits>
 #include <string>
-#include <list>
 
 #include <apti18n.h>
                                                                        /*}}}*/
 
 #include <apti18n.h>
                                                                        /*}}}*/
@@ -54,6 +48,7 @@ static void WriteScenarioVersion(pkgDepCache &Cache, FILE* output, pkgCache::Pkg
    fprintf(output, "Source: %s\n", Ver.SourcePkgName());
    fprintf(output, "Architecture: %s\n", Ver.Arch());
    fprintf(output, "Version: %s\n", Ver.VerStr());
    fprintf(output, "Source: %s\n", Ver.SourcePkgName());
    fprintf(output, "Architecture: %s\n", Ver.Arch());
    fprintf(output, "Version: %s\n", Ver.VerStr());
+   fprintf(output, "Source-Version: %s\n", Ver.SourceVerStr());
    if (Pkg.CurrentVer() == Ver)
       fprintf(output, "Installed: yes\n");
    if (Pkg->SelectedState == pkgCache::State::Hold ||
    if (Pkg.CurrentVer() == Ver)
       fprintf(output, "Installed: yes\n");
    if (Pkg->SelectedState == pkgCache::State::Hold ||
@@ -102,7 +97,7 @@ static void WriteScenarioDependency( FILE* output, pkgCache::VerIterator const &
    bool orGroup = false;
    for (pkgCache::DepIterator Dep = Ver.DependsList(); Dep.end() == false; ++Dep)
    {
    bool orGroup = false;
    for (pkgCache::DepIterator Dep = Ver.DependsList(); Dep.end() == false; ++Dep)
    {
-      if (Dep.IsMultiArchImplicit() == true)
+      if (Dep.IsImplicit() == true)
         continue;
       if (orGroup == false)
         dependencies[Dep->Type].append(", ");
         continue;
       if (orGroup == false)
         dependencies[Dep->Type].append(", ");
@@ -140,7 +135,7 @@ static void WriteScenarioLimitedDependency(FILE* output,
    bool orGroup = false;
    for (pkgCache::DepIterator Dep = Ver.DependsList(); Dep.end() == false; ++Dep)
    {
    bool orGroup = false;
    for (pkgCache::DepIterator Dep = Ver.DependsList(); Dep.end() == false; ++Dep)
    {
-      if (Dep.IsMultiArchImplicit() == true)
+      if (Dep.IsImplicit() == true)
         continue;
       if (orGroup == false)
       {
         continue;
       if (orGroup == false)
       {
@@ -348,7 +343,11 @@ bool EDSP::ReadResponse(int const input, pkgDepCache &Cache, OpProgress *Progres
                pkgCache::VerIterator Ver(Cache.GetCache(), Cache.GetCache().VerP + VerIdx[id]);
                Cache.SetCandidateVersion(Ver);
                if (type == "Install")
                pkgCache::VerIterator Ver(Cache.GetCache(), Cache.GetCache().VerP + VerIdx[id]);
                Cache.SetCandidateVersion(Ver);
                if (type == "Install")
-                       Cache.MarkInstall(Ver.ParentPkg(), false, 0, false);
+               {
+                       pkgCache::PkgIterator const P = Ver.ParentPkg();
+                       if (Cache[P].Mode != pkgDepCache::ModeInstall)
+                               Cache.MarkInstall(P, false, 0, false);
+               }
                else if (type == "Remove")
                        Cache.MarkDelete(Ver.ParentPkg(), false);
                else if (type == "Autoremove") {
                else if (type == "Remove")
                        Cache.MarkDelete(Ver.ParentPkg(), false);
                else if (type == "Autoremove") {