Skip to content

Commit 81ed885

Browse files
authored
add skip_if_unavailable to repoquery commands (#332)
Explicitly passes setting to `repoquery` in case host system doesn't set this dnf option to true.
1 parent 439b984 commit 81ed885

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

internal/rpm/repoquery.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,14 @@ func (q *RQRepoQuerier) GetRPMLocation(ctx context.Context, packageName string,
162162
//
163163
// Also set quiet mode to suppress unnecessary output.
164164
//
165+
// --setopt=skip_if_unavailable=true: Skip repositories that are unavailable. The default
166+
// behavior is to fail if any repository is unavailable. AZL3 sets this to true in the
167+
// dnf config, but for example Fedora leaves it to the default false.
168+
//
165169
// --repofrompath: Set the repository path to the configured RPM repository.
166170
// --repo: Set the repository name to the configured RPM repository. This also ignores the default system repositories.
167171
func (q *RQRepoQuerier) addBasicArgs(inputArgs []string) []string {
168-
completeArgs := append([]string{"-yq"}, q.buildRepoArgs()...)
172+
completeArgs := append([]string{"-yq", "--setopt=skip_if_unavailable=true"}, q.buildRepoArgs()...)
169173

170174
if q.releaseVer != "" {
171175
completeArgs = append(completeArgs, "--releasever", q.releaseVer)

0 commit comments

Comments
 (0)