]> git.saurik.com Git - apt.git/blobdiff - cmdline/apt-mark.cc
add missing changelog
[apt.git] / cmdline / apt-mark.cc
index 2a093c55a3b1384fd0da169189355965719cdc67..c5b7ca4962f87dfed3a18699d3f2eebfac248433 100644 (file)
@@ -291,14 +291,26 @@ bool DoHold(CommandLine &CmdL)
    FILE* dpkg = fdopen(external[1], "w");
    for (APT::PackageList::iterator Pkg = pkgset.begin(); Pkg != pkgset.end(); ++Pkg)
    {
+      if (dpkgMultiArch == false)
+        fprintf(dpkg, "%s", Pkg.FullName(true).c_str());
+      else
+      {
+        if (Pkg->CurrentVer != 0)
+           fprintf(dpkg, "%s:%s", Pkg.Name(), Pkg.CurrentVer().Arch());
+        else if (Pkg.VersionList().end() == false)
+           fprintf(dpkg, "%s:%s", Pkg.Name(), Pkg.VersionList().Arch());
+        else
+           fprintf(dpkg, "%s", Pkg.FullName(false).c_str());
+      }
+
       if (MarkHold == true)
       {
-        fprintf(dpkg, "%s hold\n", Pkg.FullName(!dpkgMultiArch).c_str());
+        fprintf(dpkg, " hold\n");
         ioprintf(c1out,_("%s set on hold.\n"), Pkg.FullName(true).c_str());
       }
       else
       {
-        fprintf(dpkg, "%s install\n", Pkg.FullName(!dpkgMultiArch).c_str());
+        fprintf(dpkg, " install\n");
         ioprintf(c1out,_("Canceled hold on %s.\n"), Pkg.FullName(true).c_str());
       }
    }