From: Philip Kaludercic <philipk@posteo.net>
To: emacs-devel@gnu.org
Subject: Request for Feedback: Adding VC support to package.el
Date: Mon, 14 Feb 2022 14:32:14 +0000 [thread overview]
Message-ID: <87ilthy0wh.fsf@posteo.net> (raw)
Hi,
I have just pushed a new branch (feature/package+vc) to emacs.git. It
implements a `package-fetch' commands, that was proposed and discussed
on the mailing list last December and last August[1]. The main
difference when compared to `package-install' is that it doesn't
download and extract a tar archive/single .el file, but clones a remote
repository directly into ~/.emacs.d/elpa/devel.
To avoid depending on a specific VC, I have added a vc-clone function to
vc.el, and implemented a Git back-end. There is certainly much that can
be discussed here, so I didn't want to waste too much time adding
implementations for other systems right now, but if this branch is to be
merged at some point, adding support for other applicable back-ends
should be done too.
Currently, you can pass `package-fetch' a URL, in which case it will try
to clone it directly, or you can pass it a package name, in which case
it will check if the package has a "VC" header, indicating the upstream
repository to clone. My suggestion would be to extend elpa-admin to
insert this metadata into the archive-contents, so that each package on
the ELPAs can be `package-fetch'ed.
In case there are missing dependencies, they will be installed using
`package-install'. The "source" package is then processed and activated
just as a regular package would be, with the minor difference that there
is no additional signature processing. Packages are deleted by
`package-delete', just like any other package.
The current state is still primitive and probably unstable. Missing
features might include:
- Checking if the user already has a regular install, that might be
modified, and attempting to apply these changes to the VCS checkout.
- The ability to send local changes as patches to the maintainer of a
package (I implemented a rough draft of how this could be use with the
command `package-contact-maintainer', but I didn't figure out if VC
allows for a generic way to prepare patches that could be attached to
a message).
- Managing upgrades of potentially diverging source packages, preferably
via the list-packages interface.
- Overloading `package-install to also allow installing source packages.
My idea was that if `package-install' gets an s-expression as a
package-name of the form (NAME :repo URL :rev REVISION), then it would
defer the request to `package-fetch'. The advantage here is that
it would make it easier for macros like use-package or setup.el to
handle both kinds of packages.
Either way, I would appreciate it if anyone who has the time could test
the code and see what works as expected and (more importantly) what
breaks it. Adding this kind of a functionality would be a significant
step towards improving the practical, shared software freedom of Emacs
users, by reducing the barrier towards contributing their improvements
and extensions upstream.
[0] https://mail.gnu.org/archive/html/emacs-devel/2021-12/msg02770.html
[1] https://lists.gnu.org/archive/html/emacs-devel/2021-08/msg00295.html
--
Philip Kaludercic
reply other threads:[~2022-02-14 14:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87ilthy0wh.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).