> 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)