[dpkg] 22/200: libdpkg, scripts: Change default color behavior to auto
Ximin Luo
infinity0 at debian.org
Wed Apr 5 15:17:09 UTC 2017
This is an automated email from the git hooks/post-receive script.
infinity0 pushed a commit to branch master
in repository dpkg.
commit a50ea56e8a040e305b0cf4f9248262a60ff1b3e5
Author: Guillem Jover <guillem at debian.org>
Date: Fri Nov 11 00:39:52 2016 +0100
libdpkg, scripts: Change default color behavior to auto
Our test run with the setting activated by apt, has not shown any signs
of pitch forks nor angry mobs. Let's switch this by default to auto, so
that the more clear but still hopefully unobtrusive colors can help
people deal with interesting messages, warnings or error conditions.
---
debian/changelog | 1 +
lib/dpkg/color.c | 2 +-
man/dpkg-buildpackage.man | 4 ++--
man/dpkg.man | 4 ++--
scripts/Dpkg/ErrorHandling.pm | 2 +-
5 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/debian/changelog b/debian/changelog
index 3169791..5052b32 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -11,6 +11,7 @@ dpkg (1.18.14) UNRELEASED; urgency=medium
had already been freed as part of the database memory pool, causing in
some cases segfaults when reporting the error summary at the end.
Regression introduced in dpkg 1.18.11. Closes: #843874
+ * Change default color behavior to auto.
* Test suite:
- Do not fail tests on missing fakeroot, just skip them.
* Build system:
diff --git a/lib/dpkg/color.c b/lib/dpkg/color.c
index 21b8044..b8af67b 100644
--- a/lib/dpkg/color.c
+++ b/lib/dpkg/color.c
@@ -59,7 +59,7 @@ color_enabled(void)
mode = getenv("DPKG_COLORS");
if (mode == NULL)
- mode = "never";
+ mode = "auto";
return color_set_mode(mode);
}
diff --git a/man/dpkg-buildpackage.man b/man/dpkg-buildpackage.man
index c140e53..915a825 100644
--- a/man/dpkg-buildpackage.man
+++ b/man/dpkg-buildpackage.man
@@ -482,8 +482,8 @@ Overridden by the \fB\-P\fP option.
.TP
.B DPKG_COLORS
Sets the color mode (since dpkg 1.18.5).
-The currently accepted values are: \fBauto\fP, \fBalways\fP and
-\fBnever\fP (default).
+The currently accepted values are: \fBauto\fP (default), \fBalways\fP and
+\fBnever\fP.
.SS Internal environment
Even if \fBdpkg\-buildpackage\fP exports some variables, \fBdebian/rules\fP
diff --git a/man/dpkg.man b/man/dpkg.man
index ffc31a0..80e7363 100644
--- a/man/dpkg.man
+++ b/man/dpkg.man
@@ -866,8 +866,8 @@ Currently only used by \fB\-\-list\fP.
.TP
.B DPKG_COLORS
Sets the color mode (since dpkg 1.18.5).
-The currently accepted values are: \fBauto\fP, \fBalways\fP and
-\fBnever\fP (default).
+The currently accepted values are: \fBauto\fP (default), \fBalways\fP and
+\fBnever\fP.
.SS Internal environment
.TP
.B DPKG_ROOT
diff --git a/scripts/Dpkg/ErrorHandling.pm b/scripts/Dpkg/ErrorHandling.pm
index cdf3c5a..122b645 100644
--- a/scripts/Dpkg/ErrorHandling.pm
+++ b/scripts/Dpkg/ErrorHandling.pm
@@ -54,7 +54,7 @@ my $use_color = 0;
sub setup_color
{
- my $mode = $ENV{'DPKG_COLORS'} // 'never';
+ my $mode = $ENV{'DPKG_COLORS'} // 'auto';
if ($mode eq 'auto') {
## no critic (InputOutput::ProhibitInteractiveTest)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/dpkg.git
More information about the Reproducible-commits
mailing list