On Thu, 19 Jan 2023 at 15:52, Roberto A. Foglietta < roberto.foglietta@gmail.com> wrote: > > On Thu, 19 Jan 2023 at 08:36, Uladzimir Bely wrote: > >> >> I got time to get back to this patches and checked this moment. And it >> really >> does not work as I expected. >> >> Original patch includes the following: >> >> - --chroot-setup-commands="cp -n --no-preserve=owner >> ${ext_deb_dir}/ >> *.deb -t ${deb_dir}/ || :" \ >> + --chroot-setup-commands="ln -Pf ${ext_deb_dir}/*.deb -t >> ${deb_dir}/ >> 2>/dev/null || :" \ >> >> This results to to failing "ReproTest" in CI with the following error >> (for >> libhello, for example): >> >> sbuild-build-depends-dose3-dummy:armhf : Depends: dose-distcheck:amd64 >> but it >> is not installable >> E: Unable to correct problems, you have held broken packages. >> >> To debug it, I removed `2>/dev/null` and found, that hardlinks simply >> don't >> work and the following errors are now seen earlier: >> >> ln: failed to create hard link >> '/var/cache/apt/archives/adduser_3.118_all.deb' >> => '/home/builder/libhello/rootfs/var/cache/apt/archives/ >> adduser_3.118_all.deb': Invalid cross-device link >> ... #tons of similar errors... >> ln: failed to create hard link '/var/cache/apt/archives/ >> zlib1g_1%3a1.2.11.dfsg-2+deb11u2_mipsel.deb' => '/home/builder/libhello/ >> rootfs/var/cache/apt/archives/zlib1g_1%3a1.2.11.dfsg-2+deb11u2_mipsel.deb': >> >> Invalid cross-device link >> >> I: Finished running 'ln -Pf /home/builder/libhello/rootfs/var/cache/apt/ >> archives/*.deb -t /var/cache/apt/archives/ || :'. >> >> So, it works for network builds (when missing packages always can be >> downloaded by apt), but it fails for local builds from apt-cache (when, >> at >> first network build, sbuild dependencies are simply not exported to >> download >> directory due to non-working hardlinks, plus with hidden stderr) >> > Yes, I confirm that it is possible to do sbuild without using neither cp nor ln, using an elegant solution. So, whatever the problem was - it is not a problem anymore. Best, R-