It would be nice to have an additional option when updating repositories via layman, to use the file times of the commit, not of the checkout. For SVN this works by adding following commandline option: --config-option=config:miscellany:use-commit-times=yes For Git you need an extra script which can be found here: https://git.wiki.kernel.org/index.php/ExampleScripts#Setting_the_timestamps_of_the_files_to_the_commit_timestamp_of_the_commit_which_last_touched_them I have no investigated how other version control systems handle this. Reproducible: Always
The benefit of preserving commit mtimes is that you can generate metadata for overlays and that users can then use that metadata for their own checkouts of these overlays. Not all overlays provide metadata, and for many it would be very cumbersome or impossible because of limited access to post-push/-commit hooks and lacking Gentoo facilities on the repository server.
P.S: The usefulness of metadata for overlays lies in eix requiring it to sync/update reasonably fast.
Because it came up on IRC: If you do not want to add the option directly to layman, but rather want to implement post-sync commands, I suggest this (example): layman.cfg: --- postsync_command : my_git_script.sh --- my_git_script.sh: --- #!/bin/sh REPOS_TYPE=$1 REPOS_PATH=$2 [[ "$REPOS_TYPE" = "git" ]] || exit 0 ---
That way the user can also run the command only for overlays he needs it for, and you dont have to worry about all that. It also does not clutter the config file as much as a bunch of backend specific settings.
While I can agree with you that method is simple for you or a power user. I see it as a much higher potential for user error caused bugs and confusion. I think the individual postsync hooks will be less problematic and difficult to use for less experienced users. While there may be more code changes involved in the backends (they are very minor) it will be more solid solution as well make the backends a little more flexible for existing and future repo types. I'll make the change to the git type first and post it for you to test and peruse.
Ok, done: I've added per repo type config postsync options. commit: http://git.overlays.gentoo.org/gitweb/?p=proj/layman.git;a=commit;h=3eaca0340384122c5d83e0aa2d0a8b6dc1165487 While it is not capable of filtering to only run on certain repos of the type. A simple filter script can be placed in to run and perform necessary actions. For noobs, a simple premade, dropin script/command can be added easily. For power users they can add in custom scripts to do precise work. I think this is the best of both methods. At least it is the one I did ;) enjoy and test lots please.
I'd forgotten to mention that I have also added per repo type add, sync options which will be added to the defaults for running the svn, etc. commands. You should be able to do all you asked for now. Please report as to whether or not both new features does or does not work for you.
From the description it seems sufficient, but I did not test them in the wild yet. Assuming they work as advertised, I am closing this bug. Thanks for your support!