From 440351d1600fdb629e96f3bd8be29d00951f110b Mon Sep 17 00:00:00 2001 From: Pawel Winogrodzki Date: Thu, 31 Mar 2022 20:40:31 -0700 Subject: [PATCH] [main] Adding `--assumeyes` for TDNF calls. (#2641) (#2642) --- toolkit/tools/imagegen/installutils/installutils.go | 2 +- .../packagerepo/repocloner/rpmrepocloner/rpmrepocloner.go | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/toolkit/tools/imagegen/installutils/installutils.go b/toolkit/tools/imagegen/installutils/installutils.go index cd66ef87aed..01dfba33862 100644 --- a/toolkit/tools/imagegen/installutils/installutils.go +++ b/toolkit/tools/imagegen/installutils/installutils.go @@ -580,7 +580,7 @@ func initializeTdnfConfiguration(installRoot string) (err error) { logger.Log.Debugf("Downloading '%s' package to a clean RPM root under '%s'.", releasePackage, installRoot) - err = shell.ExecuteLive(squashErrors, "tdnf", "download", "--alldeps", "--destdir", installRoot, releasePackage) + err = shell.ExecuteLive(squashErrors, "tdnf", "download", "--assumeyes", "--alldeps", "--destdir", installRoot, releasePackage) if err != nil { logger.Log.Errorf("Failed to prepare the RPM database on downloading the 'mariner-release' package: %v", err) return diff --git a/toolkit/tools/internal/packagerepo/repocloner/rpmrepocloner/rpmrepocloner.go b/toolkit/tools/internal/packagerepo/repocloner/rpmrepocloner/rpmrepocloner.go index bad733feae5..cee83021acc 100644 --- a/toolkit/tools/internal/packagerepo/repocloner/rpmrepocloner/rpmrepocloner.go +++ b/toolkit/tools/internal/packagerepo/repocloner/rpmrepocloner/rpmrepocloner.go @@ -269,6 +269,7 @@ func (r *RpmRepoCloner) Clone(cloneDeps bool, packagesToClone ...*pkgjson.Packag logger.Log.Debugf("Cloning: %s", pkgName) args := []string{ + "--assumeyes", "--destdir", chrootDownloadDir, pkgName, @@ -301,6 +302,7 @@ func (r *RpmRepoCloner) WhatProvides(pkgVer *pkgjson.PackageVer) (packageNames [ baseArgs := []string{ "provides", provideQuery, + "--assumeyes", fmt.Sprintf("--disablerepo=%s", allRepoIDs), } @@ -423,6 +425,7 @@ func (r *RpmRepoCloner) ClonedRepoContents() (repoContents *repocloner.RepoConte tdnfArgs := []string{ "list", "ALL", + "--assumeyes", fmt.Sprintf("--disablerepo=%s", allRepoIDs), fmt.Sprintf("--enablerepo=%s", checkedRepoID), }