Преглед на файлове

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.
Marek Marczykowski-Górecki преди 7 години
родител
ревизия
d6f305106c
променени са 1 файла, в които са добавени 1 реда и са изтрити 1 реда
  1. 1 1
      rpm_spec/core-vm.spec

+ 1 - 1
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