9a7e6c0
From 30e6260c41a011241ed5659d2d85e72661807351 Mon Sep 17 00:00:00 2001
9a7e6c0
From: Neal Gompa <ngompa13@gmail.com>
9a7e6c0
Date: Sat, 24 Nov 2018 14:58:00 -0500
9a7e6c0
Subject: [PATCH] imgcreate/dnfinst: Force latest packages from only specified
9a7e6c0
 repos
9a7e6c0
9a7e6c0
To ensure that the latest versions of things are picked for images,
9a7e6c0
we'll set 'best=1' and 'obsoletes=1', just as Mock does.
9a7e6c0
9a7e6c0
And to make sure we don't have host system repos leak in, we'll set
9a7e6c0
'reposdir=/dev/null', too.
9a7e6c0
---
9a7e6c0
 imgcreate/dnfinst.py | 4 +++-
9a7e6c0
 1 file changed, 3 insertions(+), 1 deletion(-)
9a7e6c0
9a7e6c0
diff --git a/imgcreate/dnfinst.py b/imgcreate/dnfinst.py
9a7e6c0
index 720dd7d..06a5b24 100644
9a7e6c0
--- a/imgcreate/dnfinst.py
9a7e6c0
+++ b/imgcreate/dnfinst.py
9a7e6c0
@@ -73,9 +73,11 @@ class DnfLiveCD(dnf.Base):
9a7e6c0
             conf += "plugins=1\n"
9a7e6c0
         else:
9a7e6c0
             conf += "plugins=0\n"
9a7e6c0
-        conf += "reposdir=\n"
9a7e6c0
+        conf += "reposdir=/dev/null\n"
9a7e6c0
         conf += "failovermethod=priority\n"
9a7e6c0
         conf += "keepcache=1\n"
9a7e6c0
+        conf += "obsoletes=1\n"
9a7e6c0
+        conf += "best=1\n"
9a7e6c0
         conf += "tsflags=nocontexts\n"
9a7e6c0
 
9a7e6c0
         f = open(confpath, "w+")
9a7e6c0
-- 
9a7e6c0
2.17.2
9a7e6c0