From 0a9cf0aeac01657cc6f55946b84ca8b61fe6353f Mon Sep 17 00:00:00 2001 From: P. J. McDermott Date: Tue, 02 Sep 2014 21:27:33 -0400 Subject: cmd/build: Don't make builddeps dirs if no B-D Removal of builddeps dirs only happens if there are no build dependencies. The same must be true of creation of builddeps dirs. Fixes issues like: pj@debian-x60t:~/proteanos/pkg/expat$ cat control Maintainer: "J. Random Hacker" # Build-Depends: opkhelper-3.0 Homepage: http://expat.sourceforge.net/ pj@debian-x60t:~/proteanos/pkg/expat$ sudo prokit build $root -b -c -T nop . opkbuild: Detecting architecture and platform... opkbuild: Making work area... opkbuild: Parsing package metadata... opkbuild: Build system: opkbuild: Architecture: i686-linux-glibc opkbuild: Platform: dev opkbuild: Host system: opkbuild: Architecture: i686-linux-glibc opkbuild: Platform: dev ob-checkbuilddeps: Checking build dependencies... ob-buildenv: Setting up build environment... ob-unpacksource: Extracting upstream source archive... ob-applypatches: No patches to be applied ob-installplatconf: No config files to be copied mv: cannot move `../root/prokit/build.1556949533/builddeps' to `./../builddeps': Directory not empty rmdir: failed to remove `../root/prokit/build.1556949533': Directory not empty --- (limited to 'lib') diff --git a/lib/cmd/build.sh b/lib/cmd/build.sh index 9c8cfb6..dca524d 100644 --- a/lib/cmd/build.sh +++ b/lib/cmd/build.sh @@ -102,8 +102,7 @@ cmd_build_main() rand dir="/prokit/build.${rand_x}" uname_s="$( (uname -s) 2>/dev/null)" || uname_s='unknown' - mkdir -p "${root}${dir}/pkg" "${root}${dir}/builddeps/control" \ - "${root}${dir}/builddeps/data" + mkdir -p "${root}${dir}/pkg" case "${uname_s}" in 'Linux') mount -o bind "${prev_arg}" "${root}${dir}/pkg" @@ -112,6 +111,8 @@ cmd_build_main() build_deps="$(package_get_build_deps "${arch}" "${plat}")" if [ "x${build_deps}" != 'x' ]; then + mkdir -p "${root}${dir}/builddeps/control" \ + "${root}${dir}/builddeps/data" cmd_build_make_deps_pkg "${root}${dir}" "${rand_x}" \ "${build_deps}" fi -- cgit v0.9.1