#1094930 emacs: emacs: archive priorities not respected with Debian elpa packages

#1094930#5
Date:
2025-02-01 14:51:46 UTC
From:
To:
Dear Maintainer,

With the following configuration I would expect Emacs not to attempt
upgrading packages installed from Debian to a newer version from MELPA.

(add-to-list 'package-archives
	     '("melpa-stable" . "https://stable.melpa.org/packages/") t)
(add-to-list 'package-archives
	     '("melpa" . "https://melpa.org/packages/") t)
(set-default 'package-archive-priorities
	     '(("gnu" . 9)
	       ("nongnu" . 8)
	       ("melpa-stable" . 3)))

With elpa-debian-el version 37.18, the upgrade functionality (U x) in
package-list-packages menu wants to upgrade to version 20250108.2119
from MELPA. I can't find from any documentation if this is the expected
behaviour of Emacs for "external" packages, but it does not feel right
to me. I think they should be treated in the same way as built-in
packages.

Thanks.

#1094930#10
Date:
2025-02-02 12:23:52 UTC
From:
To:
I guess what you are trying to suggest is that there should be a feature to automatically pin packages installed via apt / dpkg to whichever version you got from there, and not attempt to update those via the Emacs package manager unless explicitly selected by the user?
#1094930#15
Date:
2025-02-02 13:07:20 UTC
From:
To:
Yes, but I have not idea how it could be implemented.

Debian ELPA packages share similarities with built-in packages,
leading users to potentially overlook automatic upgrades. If a user
chooses to manually upgrade these packages, the 'describe-packages'
cmmand should perhaps indicate that they are "shadowing an external
package", similar to the behavior displayed for upgraded built-in
packages.

The function '(package--user-installed-p 'debian-el)' returns nil,
indicating that, according to Emacs' perspective, Debian ELPA packages
are not considered user-installed packages, and I don't think they
should be upgraded without not respecting 'package-archive-priorities'.