Fixes #39079 - Fix containerfile-install-command when no packages found#1021
Merged
Conversation
vsedmik
approved these changes
Feb 16, 2026
vsedmik
left a comment
There was a problem hiding this comment.
Functionally-wise looks good to me - the test passed detecting the expected result against a packit VM.
2026-02-16 11:37:57 - broker.hosts - DEBUG - sat.redhat.com executing command: LANG=en_US.UTF-8 hammer -v -u admin -p <pass> host package containerfile-install-command --host-id="2"
2026-02-16 11:37:57 - broker.hosts - DEBUG - Creating SSH session to sat.redhat.com
2026-02-16 11:37:57 - broker.session - DEBUG - Attempting to load SSH backend: hussh
2026-02-16 11:38:02 - broker.hosts - DEBUG - sat.redhat.com command result:
stdout:
stderr:
No transient packages found
status: 128
chris1984
approved these changes
Feb 16, 2026
Member
chris1984
left a comment
There was a problem hiding this comment.
ACK, code looks good to ME and tested it
ianballou
approved these changes
Feb 16, 2026
Member
ianballou
left a comment
There was a problem hiding this comment.
Works well, thanks!
[vagrant@centos9-hammer-devel hammer-cli-katello]$ hammer host package containerfile-install-command --host-id 13
No transient packages found
[vagrant@centos9-hammer-devel hammer-cli-katello]$ hammer host package containerfile-install-command --host-id 2
RUN dnf install -y acl-2.3.2-4.el10.x86_64
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The API was changed to return
packageCount: 0with HTTP 200 when no transient packages are found, instead of returning a message with HTTP 404. This caused the command to display nothing and exit with code 0.This PR adds an
executemethod override that checks thepackageCountfield and displays "No transient packages found" with a non-zero exit code when no packages are present.