Browse Source

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
tags/debian/1.1.exp9
Jérémy Bobbio David Kalnischkies 6 years ago
parent
commit
249aec3b73
13 changed files with 19 additions and 30 deletions
  1. +2
    -3
      cmdline/apt-cache.cc
  2. +2
    -2
      cmdline/apt-cdrom.cc
  3. +2
    -3
      cmdline/apt-config.cc
  4. +1
    -2
      cmdline/apt-dump-solver.cc
  5. +1
    -2
      cmdline/apt-extracttemplates.cc
  6. +4
    -5
      cmdline/apt-get.cc
  7. +1
    -2
      cmdline/apt-helper.cc
  8. +1
    -2
      cmdline/apt-internal-solver.cc
  9. +1
    -2
      cmdline/apt-mark.cc
  10. +1
    -2
      cmdline/apt-sortpkgs.cc
  11. +1
    -2
      cmdline/apt.cc
  12. +1
    -2
      ftparchive/apt-ftparchive.cc
  13. +1
    -1
      test/integration/test-00-commands-have-help

+ 2
- 3
cmdline/apt-cache.cc View File

@@ -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;



+ 2
- 2
cmdline/apt-cdrom.cc View File

@@ -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;


+ 2
- 3
cmdline/apt-config.cc View File

@@ -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"


+ 1
- 2
cmdline/apt-dump-solver.cc View File

@@ -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"


+ 1
- 2
cmdline/apt-extracttemplates.cc View File

@@ -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;


+ 4
- 5
cmdline/apt-get.cc View File

@@ -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++)


+ 1
- 2
cmdline/apt-helper.cc View File

@@ -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;


+ 1
- 2
cmdline/apt-internal-solver.cc View File

@@ -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"


+ 1
- 2
cmdline/apt-mark.cc View File

@@ -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"


+ 1
- 2
cmdline/apt-sortpkgs.cc View File

@@ -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;


+ 1
- 2
cmdline/apt.cc View File

@@ -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 <<


+ 1
- 2
ftparchive/apt-ftparchive.cc View File

@@ -616,8 +616,7 @@ static void LoadBinDir(vector<PackageMap> &PkgList,Configuration &Setup)
/* */
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;



+ 1
- 1
test/integration/test-00-commands-have-help View File

@@ -13,7 +13,7 @@ configarchitecture 'amd64'
export LD_BIND_NOW=1

checkversionmessage() {
testsuccess grep '^apt .* compiled on ' ${1}-help.output
testsuccess grep '^apt .* (' ${1}-help.output
}

checkhelpmessage() {


Loading…
Cancel
Save