diff options
Diffstat (limited to 'cmdline')
-rw-r--r-- | cmdline/apt-get.cc | 19 | ||||
-rw-r--r-- | cmdline/apt.cc | 9 |
2 files changed, 10 insertions, 18 deletions
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc index b288f1360..4ed56ef0d 100644 --- a/cmdline/apt-get.cc +++ b/cmdline/apt-get.cc @@ -59,6 +59,7 @@ #include <apt-private/private-update.h> #include <apt-private/private-cmndline.h> #include <apt-private/private-moo.h> +#include <apt-private/private-utils.h> #include <apt-private/acqprogress.h> @@ -1381,24 +1382,6 @@ bool DownloadChangelog(CacheFile &CacheFile, pkgAcquire &Fetcher, return _error->Error("changelog for this version is not (yet) available; try https://launchpad.net/ubuntu/+source/%s/+changelog", srcpkg.c_str()); } /*}}}*/ -// DisplayFileInPager - Display File with pager /*{{{*/ -void DisplayFileInPager(string filename) -{ - pid_t Process = ExecFork(); - if (Process == 0) - { - const char *Args[3]; - Args[0] = "/usr/bin/sensible-pager"; - Args[1] = filename.c_str(); - Args[2] = 0; - execvp(Args[0],(char **)Args); - exit(100); - } - - // Wait for the subprocess - ExecWait(Process, "sensible-pager", false); -} - /*}}}*/ // DoChangelog - Get changelog from the command line /*{{{*/ // --------------------------------------------------------------------- bool DoChangelog(CommandLine &CmdL) diff --git a/cmdline/apt.cc b/cmdline/apt.cc index e30967ec2..4bcae0aba 100644 --- a/cmdline/apt.cc +++ b/cmdline/apt.cc @@ -41,6 +41,7 @@ #include <apt-pkg/pkgsystem.h> #include <apt-pkg/indexfile.h> #include <apt-pkg/metaindex.h> +#include <apt-pkg/hashes.h> #include <apti18n.h> @@ -54,8 +55,12 @@ #include <apt-private/private-upgrade.h> #include <apt-private/private-show.h> #include <apt-private/private-main.h> +#include <apt-private/private-utils.h> +#include <apt-private/private-sources.h> /*}}}*/ + + bool ShowHelp(CommandLine &CmdL) { ioprintf(c1out,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION, @@ -74,6 +79,8 @@ bool ShowHelp(CommandLine &CmdL) " update - update list of available packages\n" " install - install packages\n" " upgrade - upgrade the systems packages\n" + "\n" + " edit-sources - edit the source information file\n" ); return true; @@ -89,6 +96,8 @@ int main(int argc, const char *argv[]) /*{{{*/ {"remove", &DoInstall}, {"update",&DoUpdate}, {"upgrade",&DoUpgradeWithAllowNewPackages}, + // misc + {"edit-sources",&EditSources}, // helper {"moo",&DoMoo}, {"help",&ShowHelp}, |