acpi-override-initramfs makes update-initramfs fail when /var/lib/acpi-override/ is empty

Bug #1892035 reported by Manfred Hampl
20
This bug affects 3 people
Affects Status Importance Assigned to Milestone
acpi-override (Debian)
New
Unknown
acpi-override (Ubuntu)
Confirmed
High
Unassigned

Bug Description

Ubuntu 20.04, but the same version is also in 20.10

user@system:~$ sudo apt install acpi-override-initramfs
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  acpi-override-initramfs
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/2.640 B of archives.
After this operation, 17,4 kB of additional disk space will be used.
Selecting previously unselected package acpi-override-initramfs.
(Reading database ... 206064 files and directories currently installed.)
Preparing to unpack .../acpi-override-initramfs_0.1+nmu1_all.deb ...
Unpacking acpi-override-initramfs (0.1+nmu1) ...
Setting up acpi-override-initramfs (0.1+nmu1) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.136ubuntu6.2) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-42-generic
cp: cannot stat '/var/lib/acpi-override/*': No such file or directory
E: /usr/share/initramfs-tools/hooks/acpi-override failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-42-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned
error exit status 1
Errors were encountered while processing:
 initramfs-tools
E: Sub-process /usr/bin/dpkg returned an error code (1)

I assume the problematic statement is in line 18 in /usr/share/initramfs-tools/hooks/acpi-override
cp -a /var/lib/acpi-override/* "$ACPI/kernel/firmware/acpi/" || exit 1

If there is no file in /var/lib/acpi-override/ (which is to be expected at initial installation of that package) the cp command gives return code 1 and dpkg ends with an error.

In my opinion the cp command should only be executed when files exist, so it probably has to be put into some kind of "if" clause (or needs an "ignore-if-empty" option).

Manfred Hampl (m-hampl)
summary: - acpi-override-initramfs makes update-initramsfs fail as long as
- /var/lib/acpi-override/* does not exist
+ acpi-override-initramfs makes update-initramsfs fail as long as
+ /var/lib/acpi-override/ is empty
Manfred Hampl (m-hampl)
summary: - acpi-override-initramfs makes update-initramsfs fail as long as
+ acpi-override-initramfs makes update-initramfs fail as long as
/var/lib/acpi-override/ is empty
summary: - acpi-override-initramfs makes update-initramfs fail as long as
- /var/lib/acpi-override/ is empty
+ acpi-override-initramfs makes update-initramfs fail when /var/lib/acpi-
+ override/ is empty
Changed in acpi-override (Debian):
status: Unknown → New
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in acpi-override (Ubuntu):
status: New → Confirmed
Benjamin Drung (bdrung)
Changed in acpi-override (Ubuntu):
importance: Undecided → High
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.