Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkg.installed should mark already installed packages as manually installed #65528

Closed
4D617276696E opened this issue Nov 9, 2023 · 3 comments
Closed
Labels
Duplicate Duplicate of another issue or PR - will be closed Feature new functionality including changes to functionality and code refactors, etc. needs-triage

Comments

@4D617276696E
Copy link

Is your feature request related to a problem? Please describe.
Say state1 install pkg1 which depend on pkg2. Both packages are going to be installed.
Now if state2 ask for pkg2 installation and the state is fired after state1, nothing is going to be done; pkg2 is already installed and it is not going to be "marked" as "manually installed".
On Debian system if pkg1 is installed and followed by apt install pkg2, the package pkg2 is going to be "marked" as manually installed.
pkg2 is going to be "autoremoved" if pkg1 is removed.

Describe the solution you'd like
pkg.installed should provide a "platform-specific argument" to allow user to choose to "apt-mark manual" the package.

Describe alternatives you've considered
Something like :

state2-pkg2-install:
  pkg.installed:
    - name: pkg2
{% if grains['os_family'] == 'Debian' %}
pkg2-apt-mark-manual:
  cmd.run:
    - name: "apt-mark manual pkg2"
    - require:
      - pkg: state2-pkg2-install
{% endif %}
@4D617276696E 4D617276696E added Feature new functionality including changes to functionality and code refactors, etc. needs-triage labels Nov 9, 2023
Copy link

welcome bot commented Nov 9, 2023

Hi there! Welcome to the Salt Community! Thank you for making your first contribution. We have a lengthy process for issues and PRs. Someone from the Core Team will follow up as soon as possible. In the meantime, here’s some information that may help as you continue your Salt journey.
Please be sure to review our Code of Conduct. Also, check out some of our community resources including:

There are lots of ways to get involved in our community. Every month, there are around a dozen opportunities to meet with other contributors and the Salt Core team and collaborate in real time. The best way to keep track is by subscribing to the Salt Community Events Calendar.
If you have additional questions, email us at [email protected]. We’re glad you’ve joined our community and look forward to doing awesome things with you!

@OrangeDog
Copy link
Contributor

Duplicate of #62441

@OrangeDog OrangeDog marked this as a duplicate of #62441 Nov 10, 2023
@OrangeDog OrangeDog added the Duplicate Duplicate of another issue or PR - will be closed label Nov 10, 2023
@4D617276696E
Copy link
Author

Ok, its a duplicate. Sorry for that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Duplicate Duplicate of another issue or PR - will be closed Feature new functionality including changes to functionality and code refactors, etc. needs-triage
Projects
None yet
Development

No branches or pull requests

2 participants