** Description changed:
[Impact]
- * People who use update-pciids more than once are unable to run it a
+ * People who use update-pciids more than once are unable to run it a
second time without errors due to a missing "-f" in the "ln" line being
called as the symlink already exists. This was identified upstream and
fixed in later versions, but was not implemented in Focal. The patch in
question is fixed in a new upload and attached patch.
[Test Plan]
- * Install pciutils
- * Run 'sudo update-pciids'
- * Run 'sudo update-pciids' a second time.
- * "ln" will return an error explaining the hardlink already exists.
+ * Install pciutils
+ * Run 'sudo update-pciids'
+ * Run 'sudo update-pciids' a second time.
+ * "ln" will return an error explaining the hardlink already exists.
[Where problems could occur]
- * If this patch is in error, then the entire command will cause the
+ * If this patch is in error, then the entire command will cause the
same problem or the link of the '.old' file will be erased entirely.
This is highly unlikely.
[Other Info]
-
- * Corrected patch is attached to this bug, also part of the new upload.
+
+ * Corrected patch is attached to this bug.
------
Original bug report:
-
- Running on Ubuntu 20.04 LTS, the `.old` file does not seem to be cleaned up
properly.
+ Running on Ubuntu 20.04 LTS, the `.old` file does not seem to be cleaned
+ up properly.
It seems someone forgot to add the "-f" from the respective upstream
commit:
https://github.com/pciutils/pciutils/commit/b6a0091e4a17dcc01c84dfe233e861fe6e82b1c4
First run:
```
$ sudo sh -x /usr/sbin/update-pciids
+ set -e
+ SRC=https://pci-ids.ucw.cz/v2.2/pci.ids
+ DEST=/usr/share/misc/pci.ids
+ PCI_COMPRESSED_IDS=
+ GREP=grep
+ [ = -q ]
+ quiet=false
+ touch /usr/share/misc/pci.ids
+ [ = 1 ]
+ which bzip2
+ DECOMP=bzip2 -d
+ SRC=https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
+ which curl
+ DL=curl -o /usr/share/misc/pci.ids.new
https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
+ false
+ curl -o /usr/share/misc/pci.ids.new https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left Speed
100 265k 100 265k 0 0 634k 0 --:--:-- --:--:-- --:--:-- 635k
+ bzip2 -d
+ grep ^C /usr/share/misc/pci.ids.neww
+ [ -f /usr/share/misc/pci.ids ]
+ ln /usr/share/misc/pci.ids /usr/share/misc/pci.ids.old
+ chmod -f --reference=/usr/share/misc/pci.ids.old
/usr/share/misc/pci.ids.neww
+ mv /usr/share/misc/pci.ids.neww /usr/share/misc/pci.ids
+ rm /usr/share/misc/pci.ids.new
+ [ /usr/share/misc/pci.ids != /usr/share/misc/pci.ids ]
+ false
+ echo Done.
Done.
```
Second run:
```
$ sudo sh -x /usr/sbin/update-pciids
+ set -e
+ SRC=https://pci-ids.ucw.cz/v2.2/pci.ids
+ DEST=/usr/share/misc/pci.ids
+ PCI_COMPRESSED_IDS=
+ GREP=grep
+ [ = -q ]
+ quiet=false
+ touch /usr/share/misc/pci.ids
+ [ = 1 ]
+ which bzip2
+ DECOMP=bzip2 -d
+ SRC=https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
+ which curl
+ DL=curl -o /usr/share/misc/pci.ids.new
https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
+ false
+ curl -o /usr/share/misc/pci.ids.new https://pci-ids.ucw.cz/v2.2/pci.ids.bz2
% Total % Received % Xferd Average Speed Time Time Time
Current
Dload Upload Total Spent Left Speed
100 265k 100 265k 0 0 420k 0 --:--:-- --:--:-- --:--:-- 419k
+ bzip2 -d
+ grep ^C /usr/share/misc/pci.ids.neww
+ [ -f /usr/share/misc/pci.ids ]
+ ln /usr/share/misc/pci.ids /usr/share/misc/pci.ids.old
ln: failed to create hard link '/usr/share/misc/pci.ids.old': File exists
```
** Summary changed:
- update-pciids in pciutils fails to create hard link
+ [SRU] update-pciids in pciutils fails to create hard link
** Changed in: pciutils (Ubuntu Focal)
Status: Triaged => In Progress
** Changed in: pciutils (Ubuntu Focal)
Assignee: (unassigned) => Erich Eickmeyer (eeickmeyer)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1915923
Title:
[SRU] update-pciids in pciutils fails to create hard link
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pciutils/+bug/1915923/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs