[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: package-vc support for :files keyword

From: Tony Zorman
Subject: Re: package-vc support for :files keyword
Date: Mon, 18 Sep 2023 16:43:26 +0200

On Mon, Sep 18 2023 09:10, Philip Kaludercic wrote:
> Tony Zorman <tonyzorman@mailbox.org> writes:
>> here's an idea: why not create e.g. a variable to decide when
>> :shell-command is executed? Moving the execution to right after cloning
>> the repository, instead of before building documentation, would enable
>> one to easily emulate :files directives, as well as other keywords that
>> need to be executed before things actually get built.
>> Alternatively one could have a second :shell-command like keyword.
> My issue with the first idea would be that this would create a greater
> discrepancy between what elpa-admin and package-vc do.  So if anything,
> I think only the second option, e.g. :early-shell-command, would be
> viable.

Fair enough.

> In both cases, what would you imagine that the command would do?  If it
> just calls "rm foo.el bar.el ...", then we have an issue when upgrading,
> because there would at least be a merge conflict any time the other
> files are modified upstream.  Upgrading isn't easy the way it is, but
> raising the necessity for manual intervention every time is something
> I'd like to avoid.

I think that

  $ rm foo.el
  $ git update-index --assume-unchanged foo.el

should work. It should merge cleanly (I've tried this out just now, and
it worked, but I may have overlooked something). If it's part of the
package description, then updating should work out of the box, since
package-vc-upgrade also calls package-vc--unpack-1, which would execute
the respective :early-shell-command again.

> Also, what would a :early-shell-command be used for
> on the ELPA build server?

That I don't know, I've never consciously looked at the ELPA build

Tony Zorman | https://tony-zorman.com/

reply via email to

[Prev in Thread] Current Thread [Next in Thread]