diff options
Diffstat (limited to 'cmdline/apt-mark.cc')
-rw-r--r-- | cmdline/apt-mark.cc | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc index ef4331714..c5b7ca496 100644 --- a/cmdline/apt-mark.cc +++ b/cmdline/apt-mark.cc @@ -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()); } } @@ -360,14 +372,14 @@ bool ShowHold(CommandLine &CmdL) /* */ bool ShowHelp(CommandLine &CmdL) { - ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,VERSION, + ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, COMMON_ARCH,__DATE__,__TIME__); cout << _("Usage: apt-mark [options] {auto|manual} pkg1 [pkg2 ...]\n" "\n" "apt-mark is a simple command line interface for marking packages\n" - "as manual or automatical installed. It can also list marks.\n" + "as manually or automatically installed. It can also list marks.\n" "\n" "Commands:\n" " auto - Mark the given packages as automatically installed\n" |