From 7885f3e34e6db561fe4ddbf9d748b5273d86a52d Mon Sep 17 00:00:00 2001 From: Mikael Magnusson Date: Fri, 30 Nov 2018 01:14:11 +0000 Subject: Avoid using wrong procd package --- build.sh | 11 ++++++++--- scripts/build_rootfs.sh | 3 +-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/build.sh b/build.sh index ed77846..31a1463 100755 --- a/build.sh +++ b/build.sh @@ -81,6 +81,7 @@ procd_extra_ver=lxd-3 tarball=bin/${dist}-${ver}-${arch}-${subarch}-${type}.tar.gz metadata=bin/metadata.yaml +pkgdir=bin/${ver}/packages/${arch}/${subarch} download_rootfs() { if test $ver = snapshot; then @@ -195,8 +196,8 @@ build_procd() { make package/lxd-procd/compile ) fi - test -e bin/packages/${arch}/${subarch} || mkdir -p bin/packages/${arch}/${subarch} - (cd bin/packages/${arch}/${subarch} && ln -sf ../../../../$ipk .) + test -e ${pkgdir} || mkdir -p ${pkgdir} + (cd ${pkgdir} && ln -sf ../../../../../$ipk .) } build_tarball() { @@ -208,7 +209,11 @@ build_tarball() { if test ${ver} != snapshot; then opts="$opts --upgrade" fi - fakeroot scripts/build_rootfs.sh $rootfs $opts -o $tarball --arch=${arch} --subarch=${subarch} --packages="${packages}" --files="${files}" + local allpkgs="${packages}" + for pkg in $pkgdir/*.ipk; do + allpkgs=" $pkg" + done + fakeroot scripts/build_rootfs.sh $rootfs $opts -o $tarball --arch=${arch} --subarch=${subarch} --packages="${allpkgs}" --files="${files}" } build_metadata() { diff --git a/scripts/build_rootfs.sh b/scripts/build_rootfs.sh index 10f3a93..b4f6ce9 100755 --- a/scripts/build_rootfs.sh +++ b/scripts/build_rootfs.sh @@ -139,7 +139,7 @@ install_packages() { local packages="$1" for pkg in $packages; do echo Install $pkg - $OPKG install $pkg + $OPKG install --force-downgrade $pkg done } @@ -149,7 +149,6 @@ if test -n "$metadata"; then add_file $metadata $metadata_dir $dir fi add_files templates/ $dir/templates/ -add_packages bin/packages/${arch}/${subarch} opkg_update if test -n "$upgrade"; then update_packages -- cgit v1.2.3