Commit 9919fdfb authored by Stefan Kisdaroczi's avatar Stefan Kisdaroczi Committed by Colin Watson

Add additional trace info

Some adjustments by Colin Watson on top of the original patch:

 * added "source" to the Architectures list if $do_source is true
 * added a Creator field
 * renamed Distributions to Suites
 * used a here-document to make the bulk of the trace printing feel less

Closes: #863194
parent 80cc1842
......@@ -2,6 +2,7 @@ debmirror (1:2.29) UNRELEASED; urgency=medium
[ Stefan Kisdaroczi ]
* Add version string and --version option.
* Add additional trace info (closes: #863194).
[ Colin Watson ]
* Automatically update $version at binary package build time.
......@@ -629,6 +629,8 @@ our $doing_meta=1;
our $ignore_missing_release=0;
our $ignore_release_gpg=0;
our $start_time = time;
our $start_date = `LC_ALL=C date -R`;
chomp $start_date;
our $dry_run=0;
our $do_dry_run=0;
our $rsync_options="-aIL --partial";
......@@ -1564,8 +1566,23 @@ if (! $omit_suite_symlinks && ! $do_dry_run) {
# Write out trace file.
if (! $do_dry_run) {
my $end_date = `LC_ALL=C date -R`;
chomp $end_date;
my $trace_dists = join(' ', @dists);
my $trace_arches = join(' ', @arches);
$trace_arches .= ' source' if $do_source;
open OUT, ">$tracefile" or die "$tracefile: $!";
print OUT `LC_ALL=C date -u`;
print OUT <<EOF;
Date: $end_date
Date-Started: $start_date
Used debmirror version: $version
Creator: debmirror $version
Running on host: $hostname
Suites: $trace_dists
Architectures: $trace_arches
Upstream-Mirror: $host
close OUT;
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment