Jump to content

Topic on Talk:MwExtUpgrader

Respect repository timestamps on local filesystem

6
Summary by 星耀晨曦

Resolved in d2fd566

Peculiar Investor (talkcontribs)

Great tool, thanks. I'm exactly your target audience, one of the many people update extensions one by one, such as by using ExtensionDistributor, without using git.

When I update my extensions one by one, I currently use wget from the command line in Linux and I end up with a .tar.gz file on my filesystem, which I extract. The timestamps on the .tar.gz file and all the corresponding extracted extension files match the 'commit' timestamp for the extension. This is useful to me to provide an audit trail of the updated extension back to the source repository.

In my testing of this tool I'm noticing that the timestamps in the extensions directory all match when the tool was run, not the source repository dates, so I don't have the same audit trail.

Could this tool be changed so the updated extensions (and skins BTW) have timestamps that match the source respository. The curl '--remote-time' option might be helpful.

星耀晨曦 (talkcontribs)

What you mean is to ensure that the modification time of the extension file upgraded through mwExtUpgrader is the same as the modification time manually upgraded through wget & tar?

Peculiar Investor (talkcontribs)

I've done some further testing today and the timestamps on the tar.gz files that come from Special:ExtensionDistributor are the timestamp at the time of the download.

However, when the tar file is extracted, the timestamps on the extracted files. For example, for downloading the Cite extension for 1.35, the tarball reveals:

tar -t -v --full-time -f Cite-REL1_35-52f3cf3.tar.gz
drwxr-xr-x extdist/extdist   0 2020-12-31 20:03:18 Cite/
drwxr-xr-x extdist/extdist   0 2020-12-31 20:03:18 Cite/src/
-rw-r--r-- extdist/extdist 2988 2020-12-31 20:03:18 Cite/src/FootnoteMarkFormatter.php
-rw-r--r-- extdist/extdist 3413 2020-12-31 20:03:18 Cite/src/ErrorReporter.php
-rw-r--r-- extdist/extdist 9498 2020-12-31 20:03:18 Cite/src/ReferencesFormatter.php
.
.
.

My "improvement" request is to have this tool leave the updated extension files to match the timestamps contained within the equivalent tar download.

Hopefully that further explains or clarifies what I'm asking about.

星耀晨曦 (talkcontribs)
星耀晨曦 (talkcontribs)

The new version has been released. The version can be resolve you needs.

Peculiar Investor (talkcontribs)

Tested the new version and appreciate the change. Very helpful. Thank you.