summaryrefslogtreecommitdiff
path: root/cmdline
diff options
context:
space:
mode:
authorJérémy Bobbio <lunar@debian.org>2015-03-10 10:09:44 +0100
committerDavid Kalnischkies <david@kalnischkies.de>2015-03-16 18:02:08 +0100
commit249aec3b7397662a678ea0014f94392085477b09 (patch)
treec72cbab6791b4de68a23fc496df3a62a0c3810bf /cmdline
parent40bd06bdb5e6b90aa24762300567d0650dbda751 (diff)
stop displaying time of build in online help
As part of the “reproducible builds” effort [1], we have noticed that apt could not be built reproducibly. One issue is that it uses the __DATE__ and __TIME__ macros of the C preprocessor to display the time of build in the online help. We believe this information not to be really useful to users as they can always look at the package data and metadata to figure it out. The attached patch simply removes this information. All non-documentation packages can then be built reproducibly with our current experimental framework. [David: changed the string slightly to be untranslateable as well] Closes: 774342
Diffstat (limited to 'cmdline')
-rw-r--r--cmdline/apt-cache.cc5
-rw-r--r--cmdline/apt-cdrom.cc4
-rw-r--r--cmdline/apt-config.cc5
-rw-r--r--cmdline/apt-dump-solver.cc3
-rw-r--r--cmdline/apt-extracttemplates.cc3
-rw-r--r--cmdline/apt-get.cc9
-rw-r--r--cmdline/apt-helper.cc3
-rw-r--r--cmdline/apt-internal-solver.cc3
-rw-r--r--cmdline/apt-mark.cc3
-rw-r--r--cmdline/apt-sortpkgs.cc3
-rw-r--r--cmdline/apt.cc3
11 files changed, 17 insertions, 27 deletions
diff --git a/cmdline/apt-cache.cc b/cmdline/apt-cache.cc
index a5024c581..e2cf7e8b7 100644
--- a/cmdline/apt-cache.cc
+++ b/cmdline/apt-cache.cc
@@ -1824,9 +1824,8 @@ static bool GenCaches(CommandLine &)
/* */
static bool ShowHelp(CommandLine &)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
-
+ ioprintf(cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
+
if (_config->FindB("version") == true)
return true;
diff --git a/cmdline/apt-cdrom.cc b/cmdline/apt-cdrom.cc
index 327039e00..d95c169cd 100644
--- a/cmdline/apt-cdrom.cc
+++ b/cmdline/apt-cdrom.cc
@@ -205,8 +205,8 @@ static bool DoIdent(CommandLine &)
// ShowHelp - Show the help screen /*{{{*/
static bool ShowHelp(CommandLine &)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
+ ioprintf(cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
+
if (_config->FindB("version") == true)
return true;
diff --git a/cmdline/apt-config.cc b/cmdline/apt-config.cc
index e0b8a624e..4479b84a7 100644
--- a/cmdline/apt-config.cc
+++ b/cmdline/apt-config.cc
@@ -80,11 +80,10 @@ static bool DoDump(CommandLine &CmdL)
/* */
static bool ShowHelp(CommandLine &)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
+ ioprintf(cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
if (_config->FindB("version") == true)
return true;
-
+
cout <<
_("Usage: apt-config [options] command\n"
"\n"
diff --git a/cmdline/apt-dump-solver.cc b/cmdline/apt-dump-solver.cc
index f765234c5..4729eac55 100644
--- a/cmdline/apt-dump-solver.cc
+++ b/cmdline/apt-dump-solver.cc
@@ -21,9 +21,8 @@
// ---------------------------------------------------------------------
/* */
static bool ShowHelp() {
-
+ ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
std::cout <<
- PACKAGE " " PACKAGE_VERSION " for " COMMON_ARCH " compiled on " __DATE__ " " __TIME__ << std::endl <<
"Usage: apt-dump-resolver\n"
"\n"
"apt-dump-resolver is a dummy solver who just dumps its input to the\n"
diff --git a/cmdline/apt-extracttemplates.cc b/cmdline/apt-extracttemplates.cc
index 5211ee027..3e4f89286 100644
--- a/cmdline/apt-extracttemplates.cc
+++ b/cmdline/apt-extracttemplates.cc
@@ -219,8 +219,7 @@ bool DebFile::ParseInfo()
/* */
static bool ShowHelp(CommandLine &)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
+ ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
if (_config->FindB("version") == true)
return true;
diff --git a/cmdline/apt-get.cc b/cmdline/apt-get.cc
index 33bbdd861..a0d78257c 100644
--- a/cmdline/apt-get.cc
+++ b/cmdline/apt-get.cc
@@ -1607,13 +1607,12 @@ static bool DoChangelog(CommandLine &CmdL)
/* */
static bool ShowHelp(CommandLine &)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
-
+ ioprintf(cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
+
if (_config->FindB("version") == true)
{
cout << _("Supported modules:") << endl;
-
+
for (unsigned I = 0; I != pkgVersioningSystem::GlobalListLen; I++)
{
pkgVersioningSystem *VS = pkgVersioningSystem::GlobalList[I];
@@ -1622,7 +1621,7 @@ static bool ShowHelp(CommandLine &)
else
cout << ' ';
cout << "Ver: " << VS->Label << endl;
-
+
/* Print out all the packaging systems that will work with
this VS */
for (unsigned J = 0; J != pkgSystem::GlobalListLen; J++)
diff --git a/cmdline/apt-helper.cc b/cmdline/apt-helper.cc
index a05ae90a2..65db857ad 100644
--- a/cmdline/apt-helper.cc
+++ b/cmdline/apt-helper.cc
@@ -83,8 +83,7 @@ static bool DoDownloadFile(CommandLine &CmdL)
static bool ShowHelp(CommandLine &)
{
- ioprintf(std::cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
+ ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
if (_config->FindB("version") == true)
return true;
diff --git a/cmdline/apt-internal-solver.cc b/cmdline/apt-internal-solver.cc
index 4fabeb02f..939061b93 100644
--- a/cmdline/apt-internal-solver.cc
+++ b/cmdline/apt-internal-solver.cc
@@ -44,8 +44,7 @@
// ---------------------------------------------------------------------
/* */
static bool ShowHelp(CommandLine &) {
- ioprintf(std::cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
+ ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
std::cout <<
_("Usage: apt-internal-solver\n"
diff --git a/cmdline/apt-mark.cc b/cmdline/apt-mark.cc
index 47777009b..de1c80309 100644
--- a/cmdline/apt-mark.cc
+++ b/cmdline/apt-mark.cc
@@ -443,8 +443,7 @@ static bool ShowHold(CommandLine &CmdL)
/* */
static bool ShowHelp(CommandLine &)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
+ ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
cout <<
_("Usage: apt-mark [options] {auto|manual} pkg1 [pkg2 ...]\n"
diff --git a/cmdline/apt-sortpkgs.cc b/cmdline/apt-sortpkgs.cc
index 9b66ad4db..971900e4f 100644
--- a/cmdline/apt-sortpkgs.cc
+++ b/cmdline/apt-sortpkgs.cc
@@ -146,8 +146,7 @@ static bool DoIt(string InFile)
/* */
static bool ShowHelp(CommandLine &)
{
- ioprintf(cout,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
+ ioprintf(std::cout, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
if (_config->FindB("version") == true)
return true;
diff --git a/cmdline/apt.cc b/cmdline/apt.cc
index 056cd213f..2f7eddb61 100644
--- a/cmdline/apt.cc
+++ b/cmdline/apt.cc
@@ -39,8 +39,7 @@
static bool ShowHelp(CommandLine &)
{
- ioprintf(c1out,_("%s %s for %s compiled on %s %s\n"),PACKAGE,PACKAGE_VERSION,
- COMMON_ARCH,__DATE__,__TIME__);
+ ioprintf(c1out, "%s %s (%s)\n", PACKAGE, PACKAGE_VERSION, COMMON_ARCH);
// FIXME: generate from CommandLine
c1out <<