GNU bug report logs -
#78844
30.1; feature request: public interface for querying builtin packages and versions
Previous Next
Full log
Message #17 received at 78844 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Eli Zaretskii <eliz <at> gnu.org> writes:
>> Cc: 78844 <at> debbugs.gnu.org
>> From: Xiyue Deng <manphiz <at> gmail.com>
>> Date: Fri, 20 Jun 2025 21:43:09 -0700
>>
>> Hi Sean,
>>
>> Sean Whitton <spwhitton <at> spwhitton.name> writes:
>>
>> > Hello,
>> >
>> > It would be great to stabilise this interface. We would like to add
>> > package system metadata to the Emacs packages in Debian to track all the
>> > built-in packages. We could do various useful things with that.
>> >
>> > Thanks to Xiyue for working on this, both here and over in the Debian
>> > BTS. The sample interface looks good to me.
>> >
>>
>> Thanks for pre-approving! I have attached a draft patch for adding
>> those functions. A slight change is to query `package--builtins' for
>> builtin package names as it contains a larger list of builtin packages
>> that may not have a version defined in `package--builtin-versions'. I
>> also dropped "get" from the function names as it seems not to have been
>> used in the current code base.
>>
>> Also, for completeness, I actually find there is a `package-built-in-p'
>> function for checking built-in packages. But there is no way to get a
>> complete list of builtin packages, so package-builtin-packages is still
>> needed. I also don't check whether a package is builtin in the added
>> `package-builtin-package-version' function and return nil for both
>> non-builtin packages and builtin packages without a version, as we can
>> use `package-built-in-p' to check the former.
>
> Thanks, I added the relevant individuals to this discussion.
Thanks Eli!
One thing I noticed when testing was that `package--builtins' was not
populated on startup. According to the doc, the value is initialized
when `finder-inf' is loaded. Locally I just use `(require 'finder-inf)'
before using `package--builtins' as a workaround. Is there a better
way?
--
Regards,
Xiyue Deng
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 27 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.