-
Notifications
You must be signed in to change notification settings - Fork 12
Commands for declarative package state and configuration #26
Comments
I'm not sure I understand what you mean. Package configuration is outside the scope of system-packages.el. Or do you mean ensuring that certain packages are installed on the system? If so, you might want to take a look at use-package.el, which includes the :ensure-system-package keyword.
Alternatively, you could do something like:
(unless (executable-find "mu")
(system-packages-install "mu"))
…On Thu 05 Apr 2018 at 06:10, 胡雨軒 Петр ***@***.***> wrote:
Hi, thank you for this package, it's rather appealing!
This is more a question than an issue, which you can close if you find it too out of topic.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Yeah, sorry I have been unclear. To make it less confusing, let's say I use brew on my macOS to install programs or apps. Is there any way to tell |
Ah, gotcha. I was responding to the email and didn't see the edits you made to your first comment. I'd say checking for a particular package version isn't possible. Most ditros don't keep older package versions around on their mirrors, so once they've updated to foo-1.1, if we tried to install foo-1.0, we'd get an error. Nix and Guix are special in that they're specifically designed to be able to functionally describe the state of an entire system. Doing something like that just isn't possible with apt, brew, or pacman. I think the best we can do is to tell whether or not a particular package is currently installed, and even that is complicated because package names vary across distros (see also #24). I'll add a command soon that will make this a little easier than the |
Also an alias for system-packages-package-installed-p to executable-find. This is somewhat related to bug #26, since you can now do something clever with if statments: if pack-man=apt, then ensure blah, else if pack-man=pacman, ensure blah-foo. Obviously, there's still work to be done here.
Hi, thank you for this package, it's rather appealing!
This is more a question than an issue, which you can close if you find it too out of topic. Do you think it would be a good idea to add some commands to dump package system state (installed packages, repositories, versions) to some file? Then we could diff current state and expected state and execute commands to mute the current state and make it equal to expected one.
(well, actually this question is related to stateful package manager, like homebrew for macOS)
References:
The text was updated successfully, but these errors were encountered: