summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Kalnischkies <david@kalnischkies.de>2018-09-10 21:34:11 +0200
committerDavid Kalnischkies <david@kalnischkies.de>2018-09-11 13:08:58 +0200
commit329c8d5e149465003ea9007661a7af1099c75c43 (patch)
tree9bc1bf359dd2753cff063e3cb68b71ef88231ccd
parentf484906eff85c8c9eadc13ce817d8857abdd08e8 (diff)
Reorder progress report messages
We are seeing 'processing' messages from dpkg first, so it makes sense to translate them to "Preparing" messages instead of using "Installing" and co to override these shortly after with the "Preparing" messages. The difference isn't all to visible as later messages tend to linger far longer in the display than the ealier ones, but at least in a listing it seems more logical.
-rw-r--r--apt-pkg/deb/dpkgpm.cc18
-rwxr-xr-xtest/integration/test-apt-progress-fd36
-rwxr-xr-xtest/integration/test-apt-progress-fd-deb8228
3 files changed, 31 insertions, 31 deletions
diff --git a/apt-pkg/deb/dpkgpm.cc b/apt-pkg/deb/dpkgpm.cc
index da2d5e3ae..f83b368cd 100644
--- a/apt-pkg/deb/dpkgpm.cc
+++ b/apt-pkg/deb/dpkgpm.cc
@@ -142,12 +142,12 @@ namespace
// Maps the dpkg "processing" info to human readable names. Entry 0
// of each array is the key, entry 1 is the value.
const std::pair<const char *, const char *> PackageProcessingOps[] = {
- std::make_pair("install", N_("Installing %s")),
+ std::make_pair("install", N_("Preparing %s")),
// we don't care for the difference
- std::make_pair("upgrade", N_("Installing %s")),
- std::make_pair("configure", N_("Configuring %s")),
- std::make_pair("remove", N_("Removing %s")),
- std::make_pair("purge", N_("Completely removing %s")),
+ std::make_pair("upgrade", N_("Preparing %s")),
+ std::make_pair("configure", N_("Preparing to configure %s")),
+ std::make_pair("remove", N_("Preparing for removal of %s")),
+ std::make_pair("purge", N_("Preparing to completely remove %s")),
std::make_pair("disappear", N_("Noting disappearance of %s")),
std::make_pair("trigproc", N_("Running post-installation trigger %s"))
};
@@ -1157,8 +1157,8 @@ void pkgDPkgPM::BuildPackagesProgressMap()
static const std::array<std::array<DpkgState, 2>, 4> DpkgStatesOpMap = {{
// Install operation
{{
- {"half-installed", N_("Preparing %s")},
- {"unpacked", N_("Unpacking %s") },
+ {"half-installed", N_("Unpacking %s")},
+ {"unpacked", N_("Installing %s") },
}},
// Configure operation
{{
@@ -1167,12 +1167,12 @@ void pkgDPkgPM::BuildPackagesProgressMap()
}},
// Remove operation
{{
- {"half-configured", N_("Preparing for removal of %s")},
+ {"half-configured", N_("Removing %s")},
{"half-installed", N_("Removing %s")},
}},
// Purge operation
{{
- {"config-files", N_("Preparing to completely remove %s")},
+ {"config-files", N_("Completely removing %s")},
{"not-installed", N_("Completely removed %s")},
}},
}};
diff --git a/test/integration/test-apt-progress-fd b/test/integration/test-apt-progress-fd
index 2b9b6532a..4c19a7b00 100755
--- a/test/integration/test-apt-progress-fd
+++ b/test/integration/test-apt-progress-fd
@@ -18,11 +18,11 @@ testsuccess aptget install testing=0.1 -y -o APT::Status-Fd=3
testfileequal './apt-progress.log' 'dlstatus:1:0.0000:Retrieving file 1 of 1
dlstatus:1:100.0000:Retrieving file 1 of 1
pmstatus:dpkg-exec:0.0000:Running dpkg
-pmstatus:testing:0.0000:Installing testing (amd64)
-pmstatus:testing:20.0000:Preparing testing (amd64)
-pmstatus:testing:40.0000:Unpacking testing (amd64)
+pmstatus:testing:0.0000:Preparing testing (amd64)
+pmstatus:testing:20.0000:Unpacking testing (amd64)
+pmstatus:testing:40.0000:Installing testing (amd64)
pmstatus:dpkg-exec:40.0000:Running dpkg
-pmstatus:testing:40.0000:Configuring testing (amd64)
+pmstatus:testing:40.0000:Preparing to configure testing (amd64)
pmstatus:testing:60.0000:Configuring testing (amd64)
pmstatus:testing:80.0000:Installed testing (amd64)'
@@ -32,11 +32,11 @@ testsuccess aptget install testing=0.8.15 -y -o APT::Status-Fd=3
testfileequal './apt-progress.log' 'dlstatus:1:0.0000:Retrieving file 1 of 1
dlstatus:1:100.0000:Retrieving file 1 of 1
pmstatus:dpkg-exec:0.0000:Running dpkg
-pmstatus:testing:0.0000:Installing testing (amd64)
-pmstatus:testing:20.0000:Preparing testing (amd64)
-pmstatus:testing:40.0000:Unpacking testing (amd64)
+pmstatus:testing:0.0000:Preparing testing (amd64)
+pmstatus:testing:20.0000:Unpacking testing (amd64)
+pmstatus:testing:40.0000:Installing testing (amd64)
pmstatus:dpkg-exec:40.0000:Running dpkg
-pmstatus:testing:40.0000:Configuring testing (amd64)
+pmstatus:testing:40.0000:Preparing to configure testing (amd64)
pmstatus:testing:60.0000:Configuring testing (amd64)
pmstatus:testing:80.0000:Installed testing (amd64)'
@@ -46,11 +46,11 @@ testsuccess aptget install testing=0.8.15 --reinstall -y -o APT::Status-Fd=3
testfileequal './apt-progress.log' 'dlstatus:1:0.0000:Retrieving file 1 of 1
dlstatus:1:100.0000:Retrieving file 1 of 1
pmstatus:dpkg-exec:0.0000:Running dpkg
-pmstatus:testing:0.0000:Installing testing (amd64)
-pmstatus:testing:20.0000:Preparing testing (amd64)
-pmstatus:testing:40.0000:Unpacking testing (amd64)
+pmstatus:testing:0.0000:Preparing testing (amd64)
+pmstatus:testing:20.0000:Unpacking testing (amd64)
+pmstatus:testing:40.0000:Installing testing (amd64)
pmstatus:dpkg-exec:40.0000:Running dpkg
-pmstatus:testing:40.0000:Configuring testing (amd64)
+pmstatus:testing:40.0000:Preparing to configure testing (amd64)
pmstatus:testing:60.0000:Configuring testing (amd64)
pmstatus:testing:80.0000:Installed testing (amd64)'
@@ -58,8 +58,8 @@ pmstatus:testing:80.0000:Installed testing (amd64)'
exec 3> apt-progress.log
testsuccess aptget remove testing -y -o APT::Status-Fd=3
testfileequal './apt-progress.log' 'pmstatus:dpkg-exec:0.0000:Running dpkg
-pmstatus:testing:0.0000:Removing testing (amd64)
-pmstatus:testing:33.3333:Preparing for removal of testing (amd64)
+pmstatus:testing:0.0000:Preparing for removal of testing (amd64)
+pmstatus:testing:33.3333:Removing testing (amd64)
pmstatus:testing:66.6667:Removing testing (amd64)
pmstatus:dpkg-exec:66.6667:Running dpkg'
@@ -69,11 +69,11 @@ testsuccess aptget install testing2:i386 -y -o APT::Status-Fd=3
testfileequal './apt-progress.log' 'dlstatus:1:0.0000:Retrieving file 1 of 1
dlstatus:1:100.0000:Retrieving file 1 of 1
pmstatus:dpkg-exec:0.0000:Running dpkg
-pmstatus:testing2:0.0000:Installing testing2 (i386)
-pmstatus:testing2:20.0000:Preparing testing2 (i386)
-pmstatus:testing2:40.0000:Unpacking testing2 (i386)
+pmstatus:testing2:0.0000:Preparing testing2 (i386)
+pmstatus:testing2:20.0000:Unpacking testing2 (i386)
+pmstatus:testing2:40.0000:Installing testing2 (i386)
pmstatus:dpkg-exec:40.0000:Running dpkg
-pmstatus:testing2:40.0000:Configuring testing2 (i386)
+pmstatus:testing2:40.0000:Preparing to configure testing2 (i386)
pmstatus:testing2:60.0000:Configuring testing2 (i386)
pmstatus:testing2:80.0000:Installed testing2 (i386)'
diff --git a/test/integration/test-apt-progress-fd-deb822 b/test/integration/test-apt-progress-fd-deb822
index 0c6c525ae..dd66e28a9 100755
--- a/test/integration/test-apt-progress-fd-deb822
+++ b/test/integration/test-apt-progress-fd-deb822
@@ -23,17 +23,17 @@ Message: Running dpkg
Status: progress
Package: testing:amd64
Percent: 0.0000
-Message: Installing testing (amd64)
+Message: Preparing testing (amd64)
Status: progress
Package: testing:amd64
Percent: 20.0000
-Message: Preparing testing (amd64)
+Message: Unpacking testing (amd64)
Status: progress
Package: testing:amd64
Percent: 40.0000
-Message: Unpacking testing (amd64)
+Message: Installing testing (amd64)
Status: progress
Percent: 40.0000
@@ -42,7 +42,7 @@ Message: Running dpkg
Status: progress
Package: testing:amd64
Percent: 40.0000
-Message: Configuring testing (amd64)
+Message: Preparing to configure testing (amd64)
Status: progress
Package: testing:amd64