From: Johan Andersson <johan.rejeep@gmail.com>
To: Dmitry Gutov <dgutov@yandex.ru>
Cc: 16762@debbugs.gnu.org
Subject: bug#16762: Installed packages are not considered part of the archive contents
Date: Mon, 24 Mar 2014 09:10:42 +0100 [thread overview]
Message-ID: <CAB6RKMtTVu0QrtOgy=YDHsw406sOo1LbE3vzikud5X-h20KpzA@mail.gmail.com> (raw)
In-Reply-To: <532FCEC0.4020304@yandex.ru>
[-- Attachment #1: Type: text/plain, Size: 2710 bytes --]
> Johan?
I actually found a way around the issue because I had no time waiting for
it to get fixed.
But I still think that this should be fixed for the reason I mention that
other packages, such as Epl depends on the (non) package API. This specific
issue will break for example this function:
https://github.com/cask/epl/blob/master/epl.el#L447-L452
On Mon, Mar 24, 2014 at 7:20 AM, Dmitry Gutov <dgutov@yandex.ru> wrote:
> On 24.03.2014 02:55, Stefan wrote:
>
> Does it affect the output of M-x package-list RET?
>>
>
> It's identical (checked with diff).
>
> What about the package-menu-mark-upgrades?
>>
>
> It works. Don't see any problems.
>
>
> If we can keep the already installed packages, couldn't we also keep the
>> already built-in packages?
>>
>
> Yes, seems so. I hadn't tried this before because the previous behavior
> was to omit them (I think), but the patch below seems to work fine WRT the
> questions above.
>
>
> === modified file 'lisp/emacs-lisp/package.el'
> --- lisp/emacs-lisp/package.el 2014-03-23 08:35:56 +0000
> +++ lisp/emacs-lisp/package.el 2014-03-24 06:11:52 +0000
> @@ -1047,14 +1047,9 @@
>
> (existing-packages (assq name package-archive-contents))
> (pinned-to-archive (assoc name package-pinned-packages)))
> (cond
> - ;; Skip entirely if pinned to another archive or already installed.
> - ((or (and pinned-to-archive
> - (not (equal (cdr pinned-to-archive) archive)))
> - (let ((bi (assq name package--builtin-versions)))
>
> - (and bi (version-list-= version (cdr bi))))
> - (let ((ins (cdr (assq name package-alist))))
> - (and ins (version-list-= version
> - (package-desc-version (car ins))))))
> + ;; Skip entirely if pinned to another archive.
> + ((and pinned-to-archive
> + (not (equal (cdr pinned-to-archive) archive)))
>
> nil)
> ((not existing-packages)
> (push (list name pkg-desc) package-archive-contents))
> @@ -1090,8 +1085,11 @@
>
> (package-refresh-contents))
> (list (intern (completing-read
> "Install package: "
> - (mapcar (lambda (elt) (symbol-name (car elt)))
> - package-archive-contents)
> + (delq nil
> + (mapcar (lambda (elt)
> + (unless (package-installed-p (car
> elt))
> + (symbol-name (car elt))))
> + package-archive-contents))
> nil t)))))
> (package-download-transaction
> (if (package-desc-p pkg)
>
>
>
[-- Attachment #2: Type: text/html, Size: 3917 bytes --]
next prev parent reply other threads:[~2014-03-24 8:10 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-15 16:06 bug#16762: Installed packages are not considered part of the archive contents Johan Andersson
2014-03-21 6:47 ` Dmitry Gutov
2014-03-21 15:33 ` Stefan Monnier
2014-03-21 23:07 ` Dmitry Gutov
2014-03-22 2:46 ` Stefan Monnier
2014-03-23 8:16 ` Dmitry Gutov
2014-03-24 0:55 ` Stefan
2014-03-24 6:20 ` Dmitry Gutov
2014-03-24 8:10 ` Johan Andersson [this message]
2014-03-24 13:07 ` Stefan
2014-03-24 14:32 ` Dmitry Gutov
2014-03-24 18:17 ` Stefan
2014-03-24 22:39 ` Dmitry Gutov
2014-03-28 7:22 ` Johan Andersson
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
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAB6RKMtTVu0QrtOgy=YDHsw406sOo1LbE3vzikud5X-h20KpzA@mail.gmail.com' \
--to=johan.rejeep@gmail.com \
--cc=16762@debbugs.gnu.org \
--cc=dgutov@yandex.ru \
/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 external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.