Closed TLINDEN closed 1 year ago
I solved it myself.
I had a custom package-user-dir
set before executing (package-initialize)
(not shown in the config snippet above). So, package.el looked into the default directory for packages - which is empty - and installed every package.
Putting (package-initialize)
after the customization fixed it, that is:
(require 'package)
;; needs to be set before init
(setq package-user-dir
(expand-file-name (format "elpa-%s.%s" emacs-major-version emacs-minor-version)
tvd-config-dir))
(add-to-list 'package-archives '("gnu" . "https://elpa.gnu.org/packages/"))
(add-to-list 'package-archives '("melpa" . "https://melpa.org/packages/"))
(package-initialize)
So, this had noting to do with use-package, which works as expected.
I'm trying to switch to use-package and package.el, but it fails miserably for now. When I have
:ensure
enabled anywhere (or globally), packages are being re-installed every time I start emacs.Here's the relevant part of my config:
This is being logged (every time I start emacs):
And the files in the folder
elpa/persistent-scratch-20230225.1439/
are indeed being overwritten each time.What's also interesting, after everyting has been loaded, I can use the mode
default-text-scale
but package.el seems to think it's not being installed:So, how can I disable this behavior? What I want is, that a package is being installed if it is not currently being installed, but otherwise kept as is. I want to update myself manually.