From 75ef8f14174f83a5f876a0d7414f4e6064a7d3e0 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Tue, 9 Aug 2005 08:38:26 +0000 Subject: * merged from main Patches applied: * apt@packages.debian.org/apt--main--0--patch-106 Restore lost changelog entries * apt@packages.debian.org/apt--main--0--patch-107 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-108 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-109 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * apt@packages.debian.org/apt--main--0--patch-110 Merge michael.vogt@ubuntu.com--2005/apt--progress-reporting--0 * michael.vogt@ubuntu.com--2005/apt--fixes--0--patch-5 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--base-0 tag of apt@packages.debian.org/apt--main--0--patch-85 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-1 * inital proof of concept code, understands what dpkg tells it already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-2 * progress reporting works now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-3 * added "APT::Status-Fd" variable * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-4 * do i18n now too * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-5 * define N_(x) if it is not defined already * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-6 * PackageManager::DoInstall(int status_fd) added (does not break the ABI) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-7 * merged with apt--fixes--0 to make it build again * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-8 * added support for "error" and "conffile-prompt" messages from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-9 merge with main * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-10 * use sizeof() for all snprintf() uses; fix a potential line break problem in the status reading code; changed the N_() to _() calls * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-11 * added APT::KeepFDs configuration list for file descriptors that apt should leave open (needed for various frontends like debconf, synaptic) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-12 * fixed a API breakage * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-13 * doc added, should be releasable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-14 * merged with apt--main--0 * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-15 * more source comments, added Debug::DpkgPM debug code to inspect the dpkg<->apt communication, broke the abi (ok with matt) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-16 * the progress reporting has it's own "Debug::pkgDPkgProgressReporting" debug variable now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-17 * merged PackageOps and TranslatedPackageOps into a single Map with the new DpkgState struct * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-18 * clear the APT::Keep-Fds configuration when it's no longer needed * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-19 * rewrote the reading from dpkg so that it never blocks * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-20 * merged the two status arrays into one * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-21 * added support for download progress reporting too (for Kamion and base-config) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-22 * ABI break; added Configuration::Clear(string List, {int,string} value) added (to remove a single Value from a list); test/conf_clear.cc added * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-23 * remvoed a debug string * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-24 * soname changed, fixed a bug in the parsing code when dpkg send the same state more than once (at the end) * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-25 * merged with apt@packages.debian.org/apt--main--0, added changelog entry for the 0.6.40.1 upload * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-26 * fix a bug when out-of-order states are send from dpkg * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-27 * changelog update * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-28 * a real changelog entry now * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-29 * changelog finalized * michael.vogt@ubuntu.com--2005/apt--progress-reporting--0--patch-30 * propper (and sane) support for pmerror and pmconffile added --- README.progress-reporting | 62 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 README.progress-reporting (limited to 'README.progress-reporting') diff --git a/README.progress-reporting b/README.progress-reporting new file mode 100644 index 000000000..73fbd8c08 --- /dev/null +++ b/README.progress-reporting @@ -0,0 +1,62 @@ +Install-progress reporting +-------------------------- + +If the apt options: "APT::Status-Fd" is set, apt will send status +reports to that fd. The status information is seperated with a ':', +there are the following status conditions: + +status = {"pmstatus", "dlstatus", "conffile-prompt", "error" } + +The reason for using a fd instead of a OpProgress class is that many +apt frontend fork a (vte) terminal for the actual installation. + +The reason to do the mapping and l10n of the dpkg states to human +readable (and translatable) strings is that this way the translation +needs to be done only once for all frontends. + + +pmstatus +-------- +Status of the package manager (dpkg). This is send when packages +are installed/removed. +pmstatus:pkgname:TotalPercentage:action-description + +PkgName = the name of the package +TotalPercentage = the total progress between [0..100] +description = a i18ned human readable decription of the current action + + +Example: +# ./apt-get install -o APT::Status-Fd=2 3dchess >/dev/null +pmstatus:3dchess:20:Preparing 3dchess +pmstatus:3dchess:40:Unpacking 3dchess +pmstatus:3dchess:60:Preparing to configure 3dchess +pmstatus:3dchess:80:Configuring 3dchess +pmstatus:3dchess:100:Installed 3dchess + +pmerror +------- +pmerror:deb:TotalPercentage:error string + +Example: +pmerror: /var/cache/apt/archives/krecipes_0.8.1-0ubuntu1_i386.deb : 75% : trying to overwrite `/usr/share/doc/kde/HTML/en/krecipes/krectip.png', which is also in package krecipes-data + + +pmconffile +---------- +pmconffile:conffile:percent:'current-conffile' 'new-conffile' useredited distedited + + + +dlstatus +-------- +dlstatus:AlreadDownloaded:TotalPercentage:action-description + +AlreadyDownloaded = the number of already downloaded packages +TotalPercentage = the total progress between [0..100] +description = a i18ned human readable decription of the current action + +Example: +dlstatus:1:9.05654:Downloading file 1 of 3 (4m40s remaining) +dlstatus:1:9.46357:Downloading file 1 of 3 (4m39s remaining) +dlstatus:1:9.61022:Downloading file 1 of 3 (4m38s remaining) \ No newline at end of file -- cgit v1.2.3 From 80a26ed1fb36c6cdc07a4dc08ed46a405065b949 Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 31 Aug 2005 14:56:28 +0000 Subject: * meda-change message is send over status-fd now --- README.progress-reporting | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'README.progress-reporting') diff --git a/README.progress-reporting b/README.progress-reporting index 73fbd8c08..285ca6190 100644 --- a/README.progress-reporting +++ b/README.progress-reporting @@ -5,7 +5,7 @@ If the apt options: "APT::Status-Fd" is set, apt will send status reports to that fd. The status information is seperated with a ':', there are the following status conditions: -status = {"pmstatus", "dlstatus", "conffile-prompt", "error" } +status = {"pmstatus", "dlstatus", "conffile-prompt", "error", "media-change" } The reason for using a fd instead of a OpProgress class is that many apt frontend fork a (vte) terminal for the actual installation. @@ -47,6 +47,13 @@ pmconffile pmconffile:conffile:percent:'current-conffile' 'new-conffile' useredited distedited +media-change +------------ +media-change:medium:drive + +example: +media-change: Ubuntu 5.10 _Breezy Badger_ - Alpha i386 (20050830):/cdrom/ + dlstatus -------- -- cgit v1.2.3 From 1a82c63ec114f123def943e16e8ec5ceaf8ed85a Mon Sep 17 00:00:00 2001 From: Michael Vogt Date: Wed, 31 Aug 2005 16:06:27 +0000 Subject: * include a human readable string for the MediaChange status-fd message as well --- README.progress-reporting | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'README.progress-reporting') diff --git a/README.progress-reporting b/README.progress-reporting index 285ca6190..b575e7879 100644 --- a/README.progress-reporting +++ b/README.progress-reporting @@ -49,10 +49,10 @@ pmconffile:conffile:percent:'current-conffile' 'new-conffile' useredited distedi media-change ------------ -media-change:medium:drive +media-change:medium:drive:human-readable string example: -media-change: Ubuntu 5.10 _Breezy Badger_ - Alpha i386 (20050830):/cdrom/ +media-change: Ubuntu 5.10 _Breezy Badger_ - Alpha i386 (20050830):/cdrom/:Please insert the disc labeled: 'Ubuntu 5.10 _Breezy Badger_ - Alpha i386 (20050830)' in the drive '/cdrom/' and press enter. dlstatus -- cgit v1.2.3