summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorP. J. McDermott <pj@pehjota.net>2014-09-02 21:27:33 (EDT)
committer P. J. McDermott <pj@pehjota.net>2014-09-02 21:27:33 (EDT)
commit0a9cf0aeac01657cc6f55946b84ca8b61fe6353f (patch)
tree31930f5ac9dde240fb7323f96253cfd5c6b8720b /lib
parente1274045ece68af95e5a5991313aad1e90b99374 (diff)
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" <jrandom@example.com> # 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
Diffstat (limited to 'lib')
-rw-r--r--lib/cmd/build.sh5
1 files changed, 3 insertions, 2 deletions
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