CBL-Mariner/SPECS/tdnf/tdnf-default-azurelinux-rel...

50 строки
1.9 KiB
Diff

From: Sam Meluch <sammeluch@microsoft.com>
Date: Tue, 11 Apr 2023 17:44:54 +0000
Subject: [PATCH] Fix the default distroverpkg
fix default distroverpkg to prevent error:
Error(1022) : distroverpkg config entry is set to a package that is not installed. Check /etc/tdnf/tdnf.conf
Fixes: Bug 24144834: TDNF does not support $basearch and $releasever in .repo files - distroverpkg error
By default, determine $ basearch and $ releasever from this package:
mariner_user@mariner-aks [ /etc/tdnf ]$ sudo tdnf --refresh list installed | grep mariner
azurelinux-release.noarch 1.0-1.azl3 @System
Workaround: add the following to /etc/tdnf/tdnf.conf
distroverpkg=azurelinux-release
---
client/defines.h | 2 +-
common/config.h | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/client/defines.h b/client/defines.h
index 602b249..59b058e 100644
--- a/client/defines.h
+++ b/client/defines.h
@@ -137,7 +137,7 @@ typedef enum
and configurable with "persistdir" at run time */
#define TDNF_DEFAULT_DB_LOCATION HISTORY_DB_DIR
-#define TDNF_DEFAULT_DISTROVERPKG "system-release"
+#define TDNF_DEFAULT_DISTROVERPKG "azurelinux-release"
#define TDNF_DEFAULT_DISTROARCHPKG "x86_64"
#define TDNF_RPM_CACHE_DIR_NAME "rpms"
#define TDNF_REPODATA_DIR_NAME "repodata"
diff --git a/common/config.h b/common/config.h
index 222a448..b01e2ea 100644
--- a/common/config.h
+++ b/common/config.h
@@ -83,7 +83,7 @@
// repo defaults
#define TDNF_DEFAULT_REPO_LOCATION "/etc/yum.repos.d"
#define TDNF_DEFAULT_CACHE_LOCATION "/var/cache/tdnf"
-#define TDNF_DEFAULT_DISTROVERPKG "system-release"
+#define TDNF_DEFAULT_DISTROVERPKG "azurelinux-release"
#define TDNF_DEFAULT_DISTROARCHPKG "x86_64"
#define TDNF_RPM_CACHE_DIR_NAME "rpms"
#define TDNF_REPODATA_DIR_NAME "repodata"
--
2.33.6