* `package.el' and built-in packages
@ 2016-02-18 20:06 Jiří Šebele
2016-04-12 0:30 ` alex
2016-04-12 0:52 ` Stefan Monnier
0 siblings, 2 replies; 8+ messages in thread
From: Jiří Šebele @ 2016-02-18 20:06 UTC (permalink / raw)
To: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 828 bytes --]
Hello,
I found out that `package-installed-p’ return non-nil values even for built-in packages, and that `package-install’ does nothing when trying to install a package that’s among those that are built-in. I’ve bumped into this when trying to set up my Emacs config to automatically pull in packages if they are not installed, which in turn failed to install a newer version of Org that the one shipped with Emacs.
To my knowledge the only way to install a newer Org now is to manually click `Install’ in `package-list-packages’, which interferes with my intent to automatically install packages that are not present when Emacs starts up.
I think that `package.el’ should be able to install packages even if they are built-in, since it install them to `~/.emacs.d/elpa’ anyways.
Regards,
– Jiří
[-- Attachment #2: Type: text/html, Size: 2434 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: `package.el' and built-in packages
2016-02-18 20:06 `package.el' and built-in packages Jiří Šebele
@ 2016-04-12 0:30 ` alex
2016-04-12 0:52 ` Stefan Monnier
1 sibling, 0 replies; 8+ messages in thread
From: alex @ 2016-04-12 0:30 UTC (permalink / raw)
To: Jiří Šebele; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 97 bytes --]
Any comment on this? It would be nice if using`package-pinned-packages' could somehow solve this.
[-- Attachment #2: Type: text/html, Size: 112 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: `package.el' and built-in packages
2016-02-18 20:06 `package.el' and built-in packages Jiří Šebele
2016-04-12 0:30 ` alex
@ 2016-04-12 0:52 ` Stefan Monnier
2016-04-12 2:10 ` alex
1 sibling, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2016-04-12 0:52 UTC (permalink / raw)
To: emacs-devel
> this when trying to set up my Emacs config to automatically pull in packages
> if they are not installed, which in turn failed to install a newer version
> of Org that the one shipped with Emacs.
`package-install` should install a newer version if one is available.
I can see two reasons why it failed for you:
- when you called `package-install` the package info from the archives
had not yet been refreshed/loaded. IOW, maybe you should have called
`package-refresh-contents` before.
- Org has a messed up package versioning scheme, so maybe that got in
the way (tho IIUC it should not be an issue here).
> I think that `package.el’ should be able to install packages even if they
> are built-in, since it install them to `~/.emacs.d/elpa’ anyways.
It is able to.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: `package.el' and built-in packages
2016-04-12 0:52 ` Stefan Monnier
@ 2016-04-12 2:10 ` alex
2016-04-12 2:19 ` Stefan Monnier
0 siblings, 1 reply; 8+ messages in thread
From: alex @ 2016-04-12 2:10 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 604 bytes --]
> IOW, maybe you should have called `package-refresh-contents`
I've tried that, but it doesn't work.
> Org has a messed up package versioning scheme, so maybe that
> got in the way (tho IIUC it should not be an issue here).
Could be. Though even if so, shouldn't adding (org . "gnu") to
`package-pinned-packages` demand that org be used from the gnu
repo even if it's built-in?
From a quick step through with the debugger it appears
that (package-install 'org) quits at `package-installed-p` in
`package-compute-transaction` without looking at the version,
which probably means I'm missing something.
[-- Attachment #2: Type: text/html, Size: 824 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: `package.el' and built-in packages
2016-04-12 2:10 ` alex
@ 2016-04-12 2:19 ` Stefan Monnier
2016-04-12 13:07 ` Artur Malabarba
0 siblings, 1 reply; 8+ messages in thread
From: Stefan Monnier @ 2016-04-12 2:19 UTC (permalink / raw)
To: emacs-devel
> From a quick step through with the debugger it appears
> that (package-install 'org) quits at `package-installed-p` in
> `package-compute-transaction` without looking at the version,
> which probably means I'm missing something.
Hmm...maybe you need to provide the exact package (with version).
In any case, I think you should M-x report-emacs-bug.
Stefan
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: `package.el' and built-in packages
2016-04-12 2:19 ` Stefan Monnier
@ 2016-04-12 13:07 ` Artur Malabarba
2016-04-12 13:17 ` Kaushal Modi
2016-04-14 0:31 ` alex
0 siblings, 2 replies; 8+ messages in thread
From: Artur Malabarba @ 2016-04-12 13:07 UTC (permalink / raw)
To: Stefan Monnier; +Cc: emacs-devel
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> From a quick step through with the debugger it appears
>> that (package-install 'org) quits at `package-installed-p` in
>> `package-compute-transaction` without looking at the version,
>> which probably means I'm missing something.
>
> Hmm...maybe you need to provide the exact package (with version).
> In any case, I think you should M-x report-emacs-bug.
>
Whatever we do, I beg that we don't make this the default behaviour of
package-install. There are probably plenty of people (me included) who
use it as way to ensure a package is installed (without worrying about
most recent version).
We can add a command `package-update', or add an extra optional argument
(something like `update-if-installed').
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: `package.el' and built-in packages
2016-04-12 13:07 ` Artur Malabarba
@ 2016-04-12 13:17 ` Kaushal Modi
2016-04-14 0:31 ` alex
1 sibling, 0 replies; 8+ messages in thread
From: Kaushal Modi @ 2016-04-12 13:17 UTC (permalink / raw)
To: Artur Malabarba, Stefan Monnier; +Cc: emacs-devel
[-- Attachment #1: Type: text/plain, Size: 392 bytes --]
>
> Whatever we do, I beg that we don't make this the default behaviour of
> package-install. There are probably plenty of people (me included) who
> use it as way to ensure a package is installed (without worrying about
> most recent version).
>
> We can add a command `package-update', or add an extra optional argument
> (something like `update-if-installed').
>
+1
--
--
Kaushal Modi
[-- Attachment #2: Type: text/html, Size: 659 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: `package.el' and built-in packages
2016-04-12 13:07 ` Artur Malabarba
2016-04-12 13:17 ` Kaushal Modi
@ 2016-04-14 0:31 ` alex
1 sibling, 0 replies; 8+ messages in thread
From: alex @ 2016-04-14 0:31 UTC (permalink / raw)
To: Artur Malabarba; +Cc: Stefan Monnier, emacs-devel
[-- Attachment #1: Type: text/plain, Size: 355 bytes --]
> We can add a command `package-update', or add an extra optional
> argument (something like `update-if-installed').
If adding an optional argument is an option, then is there a good
reason not to have an optional argument that would specify the exact
archive (from `package-archives') to install from? That seems to be
the most straightforward solution.
[-- Attachment #2: Type: text/html, Size: 475 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2016-04-14 0:31 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-18 20:06 `package.el' and built-in packages Jiří Šebele
2016-04-12 0:30 ` alex
2016-04-12 0:52 ` Stefan Monnier
2016-04-12 2:10 ` alex
2016-04-12 2:19 ` Stefan Monnier
2016-04-12 13:07 ` Artur Malabarba
2016-04-12 13:17 ` Kaushal Modi
2016-04-14 0:31 ` alex
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).