Hello Joey,
thank you for your reply.

On 7. Juli 2014 18:39:18 MESZ, Joey Hess <jo...@debian.org> wrote:
>Gabriel Niebler wrote:
>> The package would have to figure out which VCS to use, which should
>be
>> easy if there's only one, and set $VCS accordingly in etckeeper.conf
>> before using it.
>
>This is problimatic because the VCS used would then be essentially
>non-deteministic.

I don't think it would be.
My suggestion is to iterate over a preference list of supported VCSs and to use
the first one found on the system at install time, e.g. if  git is installed, 
use git.
Otherwise, if mercurial is installed, use hg. Otherwise...
The outcome is completely deterministic for any installed combination of VCSs.

One can argue about the order of the list, of course. git should be first. I 
like mercurial,
so I put it second. YMMV.

>Instead, I think etckeeper should continue defaulting to git, and its
>apt hook should notice if git got installed and it has not been
>initted,
>and automatically init it then.

That doesn't seem to fix the issue, it only gets rid of the output that says the
repo wasn't initialised (which the user ought to know in any case).

The above procedure would still default to git, because it's first on the list, 
but
still does something useful if git is simply not there.

It would have to be done in postinst and I can try my hand at implementing it.

Reply via email to