Details
-
Bug
-
Resolution: Unresolved
-
Minor
-
None
-
8.2
-
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.