<div dir="ltr">Hi everyone,<div><br></div><div>I found that current version of mk-basefile ( 4.7 and older) fails if variable<br>EXCLUDE_<DEBIANVERSION> is an empty value:<br><br><div>root@faiserver:~# /usr/share/doc/fai-doc/examples/simple/basefiles/mk-basefile -J BUSTER64</div><div>E: unrecognized or invalid option --exclude=</div><div>chroot: failed to run command ‘apt-get’: No such file or directory</div><div>/usr/share/doc/fai-doc/examples/simple/basefiles/mk-basefile: line 111: /tmp/basefiles.xMSHTqxy/etc/machine-id: No such file or directory</div><div><br>Below is a short patch for it:<br></div><div><br></div><div><div>@@ -174,6 +174,7 @@</div><div> </div><div>     dist=${DIST%%[0-9][0-9]}</div><div>     local exc="EXCLUDE_$dist"</div><div>+    [ -n "${!exc}" ] && exc="--exclude=${!exc}" || unset exc</div><div>     dist=${dist,,}</div><div> </div><div>     check</div><div>@@ -182,7 +183,7 @@</div><div>     fi</div><div> </div><div>     if [ -n "$arch" ]; then</div><div>-<span style="white-space:pre"> </span>qemu-debootstrap --arch $arch --exclude=${!exc} $inc $dist $xtmp $mirror</div><div>+<span style="white-space:pre">     </span>qemu-debootstrap --arch $arch ${exc} $inc $dist $xtmp $mirror</div><div> <span style="white-space:pre">       </span>target="${target}_${arch^^}"</div><div>     else</div><div> <span style="white-space:pre">   </span>if [[ $DIST =~ 64 ]]; then</div><div>@@ -190,7 +191,7 @@</div><div> <span style="white-space:pre">        </span>else</div><div>             arch=i386</div><div> <span style="white-space:pre">    </span>fi</div><div>-<span style="white-space:pre">   </span>debootstrap --arch $arch --exclude=${!exc} $inc $dist $xtmp $mirror</div><div>+<span style="white-space:pre">  </span>debootstrap --arch $arch ${exc} $inc $dist $xtmp $mirror</div><div>     fi</div><div>     cleanup-deb</div><div>     tarit</div><div><br></div><br></div><br></div></div>