On 2023/02/08 11:26, Marc Espie wrote: > This proved surprisingly complicated. > This should fix fetching for > BUILD_DEPENDS = some/path:patch > situations (where the path actually doesn't get built) > > This could use a full bulk or two. > > (I expect to simplify the "new_path/new_fetch_path code later on, but for > now, this should do)
This has a change in effect in some corner cases. I don't think it's really much of a problem. If a port is updated on disk after the dpb run was started and the new distfile wasn't fetched yet, dpb now attempts building that port without the distfile, and because it sets FETCH_PACKAGES=No, assuming _pbuild has no network access, fetching fails. Example log - dpb started a test build with include-what-you-use-0.17, I then noticed I'd forgotten to apply a diff which bumped the version to include-what-you-use-0.19, and this happened: : i386.p; cat devel/include-what-you-use.log >>> Building on i386-2 under devel/include-what-you-use BDEPENDS = [devel/ninja;devel/llvm;devel/cmake] DIST = [devel/include-what-you-use:include-what-you-use-0.17.src.tar.gz] FULLPKGNAME = include-what-you-use-0.17p0 RDEPENDS = [devel/llvm;lang/python/3.10] (Junk lock obtained for i386-2 at 1676473503.80) >>> Running depends in devel/include-what-you-use at 1676473503.82 last junk was in math/py-bottleneck,python3 /usr/sbin/pkg_add -aI -Drepair llvm-15.0.7 was: /usr/sbin/pkg_add -aI -Drepair cmake-3.25.2v0 llvm-15.0.7 ninja-1.11.1 /usr/sbin/pkg_add -aI -Drepair llvm-15.0.7 >>> Running show-prepare-results in devel/include-what-you-use at 1676473507.45 ===> devel/include-what-you-use ===> include-what-you-use-0.19 depends on: llvm->=13.0.0 -> llvm-15.0.7 ===> include-what-you-use-0.19 depends on: cmake-* -> cmake-3.25.2v0 ===> include-what-you-use-0.19 depends on: ninja-* -> ninja-1.11.1 ===> Verifying specs: c++ c++abi pthread c clang-cpp m pthread ===> found c++.9.0 c++abi.6.0 pthread.27.0 c.97.0 clang-cpp.1.0 m.10.1 cmake-3.25.2v0 llvm-15.0.7 ninja-1.11.1 (Junk lock released for i386-2 at 1676473508.33) distfiles size=747285 >>> Running patch in devel/include-what-you-use at 1676473508.35 ===> devel/include-what-you-use ===> Checking files for include-what-you-use-0.19 install: /mnt/distfiles: Operation not permitted >> Fetch >> https://include-what-you-use.org/downloads/include-what-you-use-0.19.src.tar.gz ftp: include-what-you-use.org: no address associated with name >> Fetch >> https://ftp.openbsd.org/pub/OpenBSD/distfiles/include-what-you-use-0.19.src.tar.gz ftp: ftp.openbsd.org: no address associated with name >> Fetch >> https://ftp.usa.openbsd.org/pub/OpenBSD/distfiles/include-what-you-use-0.19.src.tar.gz ftp: ftp.usa.openbsd.org: no address associated with name >> Fetch >> https://ftp.fr.openbsd.org/pub/OpenBSD/distfiles/include-what-you-use-0.19.src.tar.gz ftp: ftp.fr.openbsd.org: no address associated with name *** Error 1 in devel/include-what-you-use (/usr/ports/infrastructure/mk/bsd.port.mk:3198 '/mnt/distfiles/include-what-you-use-0.19.src.tar.gz') *** Error 2 in devel/include-what-you-use (/usr/ports/infrastructure/mk/bsd.port.mk:2474 '_internal-fetch': @cd /usr/ports/devel/include-wha...) *** Error 2 in devel/include-what-you-use (/usr/ports/infrastructure/mk/bsd.port.mk:2694 '/pobj/include-what-you-use-0.19/.extract_done': @c...) *** Error 2 in devel/include-what-you-use (/usr/ports/infrastructure/mk/bsd.port.mk:2600 'patch': @lock=include-what-you-use-0.19; export _...) ===> Exiting devel/include-what-you-use with an error *** Error 1 in /usr/ports (infrastructure/mk/bsd.port.subdir.mk:137 'patch': @: ${echo_msg:=echo}; : ${target:=patch}; for i in ; do eval...) >>> Ended at 1676473508.65 max_stuck=0.00/depends=3.64/show-prepare-results=0.90/patch=0.31 Error: job failed with 512 on i386-2 at 1676473508