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

Deprecate __package_update_index and __package_upgrade_all #7

Closed
sideeffect42 opened this issue Dec 29, 2021 · 3 comments · Fixed by #5
Closed

Deprecate __package_update_index and __package_upgrade_all #7

sideeffect42 opened this issue Dec 29, 2021 · 3 comments · Fixed by #5
Assignees

Comments

@sideeffect42
Copy link
Member

sideeffect42 commented Dec 29, 2021

This is a follow-up to #5.

After giving it some thought, I think we should move __package_update_index and __package_upgrade_all to -museum, or at least -extra.
Both types only support a subset (APT, APK, Pacman, YUM) of package managers supported by cdist types.

These types don't really fit well with the design of cdist.
cdist's job is managing configuration, updating local caches or packages isn't configuration.
Moreover, since cdist is agent-less, it can be run infrequently, possibly leaving systems in an unupgraded state for a long time.

Keeping a system up-to-date should be solved via some other means (e.g. unattended-upgrades on Debian, apk-cron on Alpine, a cron job).

As far as __package_update_index is concerned, it might be necessary to update local package indexes prior to installing new packages:

  • __package_apt: implements the refreshing logic itself.
  • __package_apk: requires refreshing the local cache.
    This could be handled in the type by adding --cache-max-age to the option list.
  • __package_pacman: requires refreshing the local cache.
    This could be handled in the type by adding --refresh to the option list.
    Then pacman will ask the mirror if it has a newer version of the file, and if so download it prior to installing the package.
    The process is fairly quick.
  • __package_yum: noop.
@4nd3r
Copy link
Member

4nd3r commented Dec 29, 2021

__package_upgrade_all - I agree, upgrading packages isn't configuration and there are better tools for that. To the museum.

__package_update_index - We agreed on that already, to the museum.

So, in the light of this idea that every __package_* type should deal with cache updating itself, if possible, so __apt_update_index too?

@4nd3r 4nd3r linked a pull request Dec 29, 2021 that will close this issue
@sideeffect42
Copy link
Member Author

sideeffect42 commented Dec 29, 2021

__package_upgrade_all - I agree, upgrading packages isn't configuration and there are better tools for that. To the museum.

__package_update_index - We agreed on that already, to the museum.

I updated #2.

So, in the light of this idea that every __package_* type should deal with cache updating itself, if possible, so __apt_update_index too?

One could argue that updating the local index and installing packages are separate processes and should thus be separate types.

In any case, I think that it should be handled consistently for all package managers.
I'll make a new issue for this (#8).

@4nd3r 4nd3r closed this as completed in #5 Dec 30, 2021
@4nd3r 4nd3r reopened this Dec 30, 2021
@sideeffect42 sideeffect42 self-assigned this Dec 30, 2021
@sideeffect42
Copy link
Member Author

Both types have been moved to cdist-museum (skonfig/museum#1).

sideeffect42 pushed a commit to riiengineering/skonfig-base that referenced this issue Feb 28, 2024
[__jitsi_meet_user] adds user validation and directory creation

Closes skonfig#7

See merge request ungleich-public/cdist-contrib!35
sideeffect42 added a commit to riiengineering/skonfig-base that referenced this issue Feb 28, 2024
…aster_explorer

__find_exec: make explorer faster
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging a pull request may close this issue.

2 participants