Skip to content

Add upgrade command for package management in containers - #1843

Open
silverhadch wants to merge 3 commits into
containers:mainfrom
silverhadch:upgrade
Open

silverhadch wants to merge 3 commits into
containers:mainfrom
silverhadch:upgrade

Conversation

@silverhadch

Copy link
Copy Markdown

Continuation of #1683

Signed-off-by: Hadi Chokr hadichokr@icloud.com

Toolbx doesn't try to detect the package manager. The image says how its
packages are meant to be updated through a label, and Toolbx runs that
command inside the container. This way, an image that Toolbx has never
heard of can support the command without requiring changes to, and a new
release of, Toolbx itself:
  com.github.containers.toolbx.package-manager.update

Since the command comes from the image, and not from Toolbx, it's always
shown before it's run, and, unless --assumeyes was used, the user is
asked for confirmation.

There is a second, optional, label with the variant of the
command that doesn't ask any questions. It's only used with --assumeyes,
so that there's never more than one prompt, and never a prompt that
can't be answered:
  com.github.containers.toolbx.package-manager.update.assumeyes

Images that can't be updated without user interaction leave the second
label unset, and images that don't want to support the command at all
leave both unset.

Note that this is not the same as rebasing a container over an image for
a newer operating system version.

Signed-off-by: Hadi Chokr <hadichokr@icloud.com>
Signed-off-by: Hadi Chokr <hadichokr@icloud.com>
Signed-off-by: Hadi Chokr <hadichokr@icloud.com>
@centosinfra-prod-github-app

Copy link
Copy Markdown

Build succeeded.
https://gateway-cloud-softwarefactory.apps.ocp.cloud.ci.centos.org/zuul/t/local/buildset/df74bc955fbe4554b77b348c95665fa8

✔️ unit-test SUCCESS in 2m 22s
✔️ unit-test-migration-path-for-coreos-toolbox SUCCESS in 3m 17s
✔️ unit-test-restricted SUCCESS in 2m 15s
✔️ system-test-fedora-rawhide-commands-options SUCCESS in 38m 33s
✔️ system-test-fedora-rawhide-runtime-environment-arch-fedora SUCCESS in 26m 01s
✔️ system-test-fedora-rawhide-runtime-environment-ubuntu SUCCESS in 6m 25s
✔️ system-test-fedora-44-commands-options SUCCESS in 40m 06s
✔️ system-test-fedora-44-runtime-environment-arch-fedora SUCCESS in 28m 02s
✔️ system-test-fedora-44-runtime-environment-ubuntu SUCCESS in 7m 14s
✔️ system-test-fedora-43-commands-options SUCCESS in 46m 42s
✔️ system-test-fedora-43-runtime-environment-arch-fedora SUCCESS in 34m 28s
✔️ system-test-fedora-43-runtime-environment-ubuntu SUCCESS in 7m 09s
✔️ system-test-fedora-42-commands-options SUCCESS in 36m 03s
✔️ system-test-fedora-42-runtime-environment-arch-fedora SUCCESS in 24m 23s
✔️ system-test-fedora-42-runtime-environment-ubuntu SUCCESS in 7m 26s
✔️ system-test-fedora-coreos-next-commands-options SUCCESS in 48m 29s
✔️ system-test-fedora-coreos-next-runtime-environment-arch-fedora SUCCESS in 37m 22s
✔️ system-test-fedora-coreos-next-runtime-environment-ubuntu SUCCESS in 10m 53s
✔️ system-test-fedora-coreos-stable-commands-options SUCCESS in 49m 03s
✔️ system-test-fedora-coreos-stable-runtime-environment-arch-fedora SUCCESS in 37m 27s
✔️ system-test-fedora-coreos-stable-runtime-environment-ubuntu SUCCESS in 10m 57s
✔️ system-test-fedora-coreos-testing-commands-options SUCCESS in 48m 32s
✔️ system-test-fedora-coreos-testing-runtime-environment-arch-fedora SUCCESS in 37m 21s
✔️ system-test-fedora-coreos-testing-runtime-environment-ubuntu SUCCESS in 11m 05s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant