Uploaded image for project: 'XenServer Org'
  1. XenServer Org
  2. XSO-905

updating xenserver-plymouth-theme RPM will result in setting "text" theme

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • Major
    • 8.0
    • 7.6
    • Update / Upgrade
    • None
    • XSI-124

    Description

      Extract from spec file:

      %postun
      if grep -q "^Theme *= *xenserver *$" "%{plymouthconf}"; then
         /usr/sbin/plymouth-set-default-theme text
         %{regenerate_initrd_postun}
      fi

      => this is executed not only when the package is uninstalled, but also when it is upgraded.

       

      It should probably be:

      %postun
      if [ $1 -eq 0 ]; then
          if grep -q "^Theme *= *xenserver *$" "%{plymouthconf}"; then
              /usr/sbin/plymouth-set-default-theme text
              %{regenerate_initrd_postun}
          fi
      fi
      

       

       And since %{regenerate_initrd_postun} evaluates to

      if [ $1 -eq 0 ]; then
          dracut -f /boot/initrd-4.4.0+10.img 4.4.0+10
      else
          > /var/lib/rpm-state/regenerate-initrd-4.4.0+10
      fi
      

      one may consider extracting it from the if blocks so that either part of its own if block gets executed depending on the context.

      Attachments

        Activity

          People

            Unassigned Unassigned
            stormi Samuel Verschelde
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: