diff options
Diffstat (limited to 'scripts/Dpkg')
-rw-r--r-- | scripts/Dpkg/Changelog.pm | 8 | ||||
-rw-r--r-- | scripts/Dpkg/Control/FieldsCore.pm | 5 |
2 files changed, 12 insertions, 1 deletions
diff --git a/scripts/Dpkg/Changelog.pm b/scripts/Dpkg/Changelog.pm index 2065d429d..56b86c159 100644 --- a/scripts/Dpkg/Changelog.pm +++ b/scripts/Dpkg/Changelog.pm @@ -495,6 +495,7 @@ sub _format_dpkg { $f->{Distribution} = join(' ', $src->get_distributions()); $f->{Maintainer} = $src->get_maintainer() // ''; $f->{Date} = $src->get_timestamp() // ''; + $f->{Timestamp} = $src->get_timepiece->epoch // ''; $f->{Changes} = $src->get_dpkg_changes(); # handle optional fields @@ -550,6 +551,7 @@ sub _format_rfc822 { $f->{Distribution} = join(' ', $entry->get_distributions()); $f->{Maintainer} = $entry->get_maintainer() // ''; $f->{Date} = $entry->get_timestamp() // ''; + $f->{Timestamp} = $entry->get_timepiece->epoch // ''; $f->{Changes} = $entry->get_dpkg_changes(); # handle optional fields @@ -613,6 +615,10 @@ person that created the (selected) entry date of the (selected) entry +=item Timestamp + +date of the (selected) entry as a timestamp in seconds since the epoch + =item Closes bugs closed by the (selected) entry/entries, sorted by bug number @@ -766,6 +772,8 @@ New method: $c->format_range(). Deprecated methods: $c->dpkg(), $c->rfc822(). +New field Timestamp in output formats. + =head2 Version 1.00 (dpkg 1.15.6) Mark the module as public. diff --git a/scripts/Dpkg/Control/FieldsCore.pm b/scripts/Dpkg/Control/FieldsCore.pm index 85729a028..1f01ae0b0 100644 --- a/scripts/Dpkg/Control/FieldsCore.pm +++ b/scripts/Dpkg/Control/FieldsCore.pm @@ -332,6 +332,9 @@ our %FIELDS = ( allowed => ALL_SRC, separator => FIELD_SEP_COMMA, }, + 'Timestamp' => { + allowed => CTRL_CHANGELOG, + }, 'Triggers-Awaited' => { allowed => CTRL_FILE_STATUS, separator => FIELD_SEP_SPACE, @@ -425,7 +428,7 @@ our %FIELD_ORDER = ( ], CTRL_CHANGELOG() => [ qw(Source Binary-Only Version Distribution Urgency Maintainer - Date Closes Changes) + Timestamp Date Closes Changes) ], CTRL_FILE_STATUS() => [ # Same as fieldinfos in lib/dpkg/parse.c qw(Package Essential Status Priority Section Installed-Size Origin |