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

xenserver-hwdata RPM - small mistake in triggerin scriptlet

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • Minor
    • None
    • 8.2
    • Packaging
    • None

    Description

      The spec file for xenserver-hwdata contains a mistake in the following triggerin scriptlet:

      %triggerin -- hwdata
      if [ -f /usr/share/hwdata/pci.ids ]; then
        mv /usr/share/hwdata/pci.ids /usr/share/hwdata/pci.ids.rpmsave
      fi
      ln -sf pci.ids.d/pci.ids /usr/share/hwdata

      At initial system installation, the original pci.ids file from CentOS' hwdata RPM is moved to pci.ids.rpmsave, then replaced by a symlink.

      If, like happened in CU1, xenserver-hwdata is updated after this, then the symlink itself will be moved to pci.ids.rpmsave (thus overwriting the intially saved file), and a new symlink is created. The [ -f /usr/share/hwdata/pci.ids ] test returns true when the tested file is a symlink to a regular file. This case should be tested to avoid executing the mv part, and the unnecessary ln - sf could be avoided too in this case.

      Things will probably be different if it's the hwdata RPM which is updated and triggers the execution of the scriplet, so both cases need to be carefully tested.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: