<div dir="ltr">Thanks for the additional details.<div><br></div><div>Given that the package’s only purpose is to populate /boot/firmware, may I ask why it’s being installed in your builds at all? I’d like to understand the use-case before adding code to deal with it.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Jan 15, 2018 at 12:42 PM, Raphael Hertzog <span dir="ltr"><<a href="mailto:hertzog@debian.org" target="_blank">hertzog@debian.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Sat, 13 Jan 2018, Michael Stapelberg wrote:<br>
> The only change that seems in any way related to me is<br>
> <a href="https://anonscm.debian.org/cgit/pkg-raspi/raspi3-firmware.git/commit/?id=c977f0210ab5c577b9d5296e4e4391225a7f85ca" rel="noreferrer" target="_blank">https://anonscm.debian.org/<wbr>cgit/pkg-raspi/raspi3-<wbr>firmware.git/commit/?id=<wbr>c977f0210ab5c577b9d5296e4e4391<wbr>225a7f85ca</a><br>
<br>
</span>This change is not the cause of the regression. The package fails at<br>
initial installation, not on upgrade. I have added "set -x" and I get<br>
this:<br>
<br>
# dpkg --configure raspi3-firmware<br>
<span class="">Setting up raspi3-firmware (1.20171201-2) ...<br>
</span>+ ischroot<br>
+ basename /usr/lib/raspi3-firmware/<wbr>bootcode.bin<br>
+ file=bootcode.bin<br>
+ cp /usr/lib/raspi3-firmware/<wbr>bootcode.bin /boot/firmware/bootcode.bin<br>
<span class="">cp: cannot create regular file '/boot/firmware/bootcode.bin': No such file or directory<br>
dpkg: error processing package raspi3-firmware (--configure):<br>
</span> installed raspi3-firmware package post-installation script subprocess returned error exit status 1<br>
Errors were encountered while processing:<br>
 raspi3-firmware<br>
<br>
I wonder how it worked before. Maybe the package shipped /boot/firmware or<br>
another package supplied that directory and it now fails because no<br>
package is creating it.<br>
<br>
In any case, you should probably not attempt to copy the files there if the<br>
directory is not existing.<br>
<br>
Something like this:<br>
<br>
--- /tmp/postinst       2018-01-15 11:35:43.223477268 +0000<br>
+++ /var/lib/dpkg/info/raspi3-<wbr>firmware.postinst 2018-01-15 11:40:31.818918341 +0000<br>
@@ -13,19 +13,23 @@<br>
       fi<br>
     fi<br>
<br>
-    for file in /usr/lib/raspi3-firmware/*<br>
-    do<br>
-      file=$( basename "$file" )<br>
-      cp "/usr/lib/raspi3-firmware/$<wbr>file" "/boot/firmware/$file"<br>
-      # sync might fail when running under qemu, which, as of version 2.7,<br>
-      # has not implemented the syncfs syscall.<br>
-      sync -f "/boot/firmware/$file" || true<br>
-    done<br>
+    if [ -d /boot/firmware ]; then<br>
+       for file in /usr/lib/raspi3-firmware/*<br>
+       do<br>
+         file=$( basename "$file" )<br>
+         cp "/usr/lib/raspi3-firmware/$<wbr>file" "/boot/firmware/$file"<br>
+         # sync might fail when running under qemu, which, as of version 2.7,<br>
+         # has not implemented the syncfs syscall.<br>
+         sync -f "/boot/firmware/$file" || true<br>
+       done<br>
<br>
-    # Manually trigger the kernel postinst hook when raspi3-firmware is first<br>
-    # installed (or upgraded), as the kernel package might already be installed<br>
-    # (or not upgraded) and hence the hook would not get triggered otherwise.<br>
-    DEB_MAINT_PARAMS="configure" /etc/kernel/postinst.d/raspi3-<wbr>firmware<br>
+       # Manually trigger the kernel postinst hook when raspi3-firmware is first<br>
+       # installed (or upgraded), as the kernel package might already be installed<br>
+       # (or not upgraded) and hence the hook would not get triggered otherwise.<br>
+       DEB_MAINT_PARAMS="configure" /etc/kernel/postinst.d/raspi3-<wbr>firmware<br>
+    else<br>
+       echo "Warning: not copying firmwares as /boot/firmware does not exist." >&2<br>
+    fi<br>
     ;;<br>
 esac<br>
<br>
Cheers,<br>
<span class="HOEnZb"><font color="#888888">--<br>
Raphaël Hertzog ◈ Debian Developer<br>
<br>
Support Debian LTS: <a href="https://www.freexian.com/services/debian-lts.html" rel="noreferrer" target="_blank">https://www.freexian.com/<wbr>services/debian-lts.html</a><br>
Learn to master Debian: <a href="https://debian-handbook.info/get/" rel="noreferrer" target="_blank">https://debian-handbook.info/<wbr>get/</a><br>
</font></span></blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature" data-smartmail="gmail_signature">Best regards,<br>Michael</div>
</div>