[PATCH] debugedit: Add -p, --preserve-dates
Mark Wielaard
mark@klomp.org
Thu Jul 3 10:51:26 GMT 2025
Hi all,
On Mon, 2025-06-30 at 16:26 +0200, Mark Wielaard wrote:
> On Mon, 2025-06-23 at 00:33 +0200, Mark Wielaard wrote:
> > When --preserve-dates is given to debugedit it will take the original
> > st_atim and st_mtim and put them back using utimensat after processing
> > the file (and setting back the original st_mode).
> >
> > Use it in find-debuginfo when processing ar archive entries so
> > timestamps in new archives are the same when put back.
> >
> > * tools/debugedit.c (preserve_dates): New bool.
> > (optionsTable): Add preserve-dates.
> > (optionsChars): Add p.
> > (helpText): Add -p|--preserve-dates.
> > (main): Handle 'p'. Use utimensat if preserve_dates true.
> > * scripts/find-debuginfo.in (do_ar_file): Use debugedit -p.
> > * tests/debugedit.at: Add new debugedit preserve timestamps test.
> > * tests/find-debuginfo.at: Select the modes, date and entry names
> > in the ar and compare them after find-debuginfo processing.
> >
> > https://sourceware.org/bugzilla/show_bug.cgi?id=33096
>
> After implementing it I don't know if it is strictly necessary, but it
> seems useful functionality and comes with testcases so we know if we
> accidentally break it. But please let me know if you rather not see
> this go in.
Since nobody complained I pushed this.
Cheers,
Mark
More information about the Debugedit
mailing list