Open TeddyAndrieux opened 2 years ago
This would be applicable to apt
systems too.
This would be applicable to
apt
systems too.
apt-mark manual <package>
but anything installed with apt-get
/aptitude
/apt
should automatically have these packages marked as manually installed. Have you observed the same behavior in apt
based systems? ref: https://github.com/saltstack/salt/blob/master/salt/modules/aptpkg.py#L821-L853
If a package is already auto installed, and you add an installed state for it, then it will do nothing and not mark it as manual, right?
On 15 Aug 2022, at 21:11, Kevin Landreth @.***> wrote:
This would be applicable to apt systems too.
apt-mark manual
but anything installed with apt-get/aptitude/apt should automatically have these packages marked as manually installed. Have you observed the same behavior in apt based systems? ref: https://github.com/saltstack/salt/blob/master/salt/modules/aptpkg.py#L821-L853
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you commented.
@OrangeDog thanks for that clarification, makes a ton of sense now. edit: also I am dumb
Description A clear and concise description of what the bug is.
On RHEL-8-based OS, using
pkg.installed
should mark the package as "installed by user" so that it do not get removed by dependencies.Setup (Please provide relevant configs and/or SLS files (be sure to remove sensitive info. There is no general set-up of Salt.)
Just a simple RockyLinux 8.6 OpenStack VM.
Steps to Reproduce the behavior (Include debug logs if possible and relevant)
Expected behavior A clear and concise description of what you expected to happen.
From previous example, I would expect the
lvm2-libs
to not be removed by thepkg.removed
, because thepkg.installed
would have run adnf mark install <pkg_name>
.Could be the default behavior of
pkg.installed
or at least have a boolean to "enforce package mark".Screenshots If applicable, add screenshots to help explain your problem.
Versions Report
salt --versions-report
(Provided by running salt --versions-report. Please also mention any differences in master/minion versions.) ```yaml Salt Version: Salt: 3004.2 Dependency Versions: cffi: 1.11.5 cherrypy: Not Installed dateutil: 2.6.1 docker-py: Not Installed gitdb: Not Installed gitpython: Not Installed Jinja2: 2.10.1 libgit2: Not Installed M2Crypto: 0.35.2 Mako: Not Installed msgpack: 0.6.2 msgpack-pure: Not Installed mysql-python: Not Installed pycparser: 2.14 pycrypto: Not Installed pycryptodome: Not Installed pygit2: Not Installed Python: 3.6.8 (default, Apr 12 2022, 06:55:39) python-gnupg: Not Installed PyYAML: 3.12 PyZMQ: 19.0.0 smmap: Not Installed timelib: Not Installed Tornado: 4.5.3 ZMQ: 4.3.4 System Versions: dist: rocky 8.6 Green Obsidian locale: UTF-8 machine: x86_64 release: 4.18.0-372.19.1.el8_6.x86_64 system: Linux version: Rocky Linux 8.6 Green Obsidian ```Additional context
Maybe, it's a feature but to me, it's kind of a bug according to the example I described