emacs-devel
[Top][All Lists]
Advanced

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

Re: feature/package+vc 04c4c578c7 3/4: Allow for packages to be installe


From: Philip Kaludercic
Subject: Re: feature/package+vc 04c4c578c7 3/4: Allow for packages to be installed directly from VCS
Date: Wed, 26 Oct 2022 18:22:25 +0000

Philip Kaludercic <philipk@posteo.net> writes:

>> But there is a general principle that it is better to get the external
>> interfaces right before installing something new.  Changing those
>> interfaces now won't require people to change habits; changing them
>> later could do so.
>>
>> The code for checking out the current-version repo of an ELPA package
>> should be very little different from the code for checking out the
>> upstream repo.  If the latter is already working, getting the former
>> to work equally well shouldn't take long.  Would you please do that?
>
> It can be done, but I believe it would be best to add those kinds of
> annotations to the server side (elpa-admin.el).  The issue is that
> figuring out what version was used to release a package is non-trivial
> using just vc.

I have pushed a commit to feature/package+vc that will use the release
revision (if it is known) when `package-vc-install' is invoked with a
prefix argument.

On the server side, all that has to be added for this to work is the
following:

diff --git a/elpa-admin.el b/elpa-admin.el
index 7ed78430d6..eb94afb512 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -770,6 +770,9 @@ of the current `process-environment'.  Return the modified 
copy."
     (prin1
      (mapcan
       (lambda (spec)
+        (let ((rel (ignore-errors (elpaa--get-last-release spec))))
+          (when rel
+            (nconc spec (list :release-rev (cdr rel)))))
         (pcase spec
           (`(,name :url nil . ,rest)
            `((,name :url ,(concat "https://git.sv.gnu.org/git/"; elpaa--gitrepo)

reply via email to

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