Public bug reported:

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).

** Affects: acpi-override (Ubuntu)
     Importance: Undecided
         Status: New

** Summary changed:

-  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

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1892035

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

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/acpi-override/+bug/1892035/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to