From d6f305106c59d16a7c7ef29ce505324451a0b7a6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Mon, 15 May 2017 03:09:45 +0200 Subject: [PATCH] rpm: don't "append" to not existing /etc/yum.conf When /etc/yum.conf is not present (yum-deprecated not installed), don't try to append to it. It would result in invalid configuration file - without any section header, and break yum when installed later. --- rpm_spec/core-vm.spec | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index a16730e..6e24d36 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -261,7 +261,7 @@ if [ -L /lib/firmware/updates ]; then rm -f /lib/firmware/updates fi -if ! grep -q '/etc/yum\.conf\.d/qubes-proxy\.conf' /etc/yum.conf; then +if test -f /etc/yum.conf && ! grep -q '/etc/yum\.conf\.d/qubes-proxy\.conf' /etc/yum.conf; then echo >> /etc/yum.conf echo '# Yum does not support inclusion of config dir...' >> /etc/yum.conf echo 'include=file:///etc/yum.conf.d/qubes-proxy.conf' >> /etc/yum.conf