Subject: Re: bug#75328: 31.0.50; use-package cannot override a built in package

From: Philip Kaludercic <[email-masked]>
Date: Sun, 05 Jan 2025 20:33:18 +0000

Eli Zaretskii <[email-masked]> writes:

>> From: Philip Kaludercic <[email-masked]>
>> Cc: "Mark A. Hershberger" <[email-masked]>,  [email-masked]
>> Date: Sat, 04 Jan 2025 21:57:18 +0000
>> 
>> Eli Zaretskii <[email-masked]> writes:
>> 
>> >> The following does not check out the transient repository into
>> >> ~/.emacs.d/elpa/:
>> >> 
>> >>     rm -rf ~/.emacs.d &&
>> >>     echo '(setq package-install-upgrade-built-in t)
>> >>     (use-package transient :vc (:url "https://github.com/magit/transient" :rev :newest) :ensure t)' > ~/.emacs &&
>> >>     ~/bin/emacs
>> >
>> > Philip, shouldn't package-install-upgrade-built-in allow upgrading a
>> > built-in package via use--package's :vc keyword?
>> 
>> Built-in packages are not supported by package-vc right now, as
>> emacs.git is not a emacs package the way ELPA intends it.  There is also
>> the annoyance that without custom code (which would be doable if we had
>> to) we would have a separate checkout of emacs.git for every built-in
>> package that one wishes to clone that way.  This would be a lot easier
>> if Git would support subtree or single-file checkouts...
>
> So we should convert this bug into a feature-request, and meanwhile
> document this restriction in the use-package manual?

If anything, we should document this in (emacs) Fetching Package
Sources, but one can mention that in the use-package manual as well.