emacs-devel
[Top][All Lists]
Advanced

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

Re: feature/package-vc has been merged


From: Philip Kaludercic
Subject: Re: feature/package-vc has been merged
Date: Wed, 09 Nov 2022 21:33:41 +0000

Stefan Monnier <monnier@iro.umontreal.ca> writes:

>>> But for `package-vc` that's already the case since it has complete control
>>> over how the `<foo>-pkg.el` and the `<foo>-autoloads.el` are generated.
>>
>> ..., this is handled by `package-vc--unpack-1' which up until now did
>> not depend on a package specification, just a package description.  This
>> is so, so that it can be invoked by `package-vc-refresh' or
>> `package-vc-install-from-checkout' which all don't necessarily have
>> specifications.  It would be imaginable to store the specification in a
>> file like <PKG>-spec.eld, but there are too many files already so this
>> is just getting more and more messy.
>>
>> If you believe that this is not worth it or shortsighted on my part,
>> I'll implement the code necessary for what you suggest to work.
>
> Ah... so this is extra info stored in the `<pkg>-pkg.el` file but only
> for packages installed by `package-vc`.  So it's not expected to appear
> in `<pkg>-pkg.el` coming from ELPA repositories.  

Right.

>                                                   But then it should not
> be used in `package.el`, only in `package-vc-...` functions, right?

I have attached the entire patch below.  There are a few points where we
want to have regular package.el functions also respect :lisp-dir, but
these changes mostly consist of just replacing package-desc-dir with an
auxiliary function that returns the lisp directory.

> BTW, I'm beginning to sense that maybe instead of storing `:lisp-dir` in
> the package description (of package-vc-installed-packages), we
> should/could store there the whole package-spec.  This way
> `package-vc-refresh` can use the package-spec and throw away the rest of
> the package description.

That would also be possible, I'd have to think about it and try it out.

> For `package-vc-install-from-checkout`, we need to "invent" a package
> spec anyway, right?

Well no, because that function uses `package-vc--unpack-1' that is
invoked during the regular installation after all the information from
the specification has been made use of.  But even if that weren't the
case, we'd just use the "empty" specification in this case,  because the
argument to `package-vc-install-from-checkout' is a lisp directory to
begin with.

Attachment: 0001-Allow-specifying-a-lisp-dir-for-package-descriptions.patch
Description: Text Data


reply via email to

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