diff options
author | Mikael Magnusson <mikma@users.sourceforge.net> | 2018-11-30 01:14:11 +0000 |
---|---|---|
committer | Mikael Magnusson <mikma@users.sourceforge.net> | 2018-11-30 01:14:11 +0000 |
commit | 7885f3e34e6db561fe4ddbf9d748b5273d86a52d (patch) | |
tree | b26253f59ffa6a1da4dc318c5e0e594f7090f852 | |
parent | c2cb29e54c24d23d1ee9c3c6ae73c55384d38e95 (diff) |
Avoid using wrong procd package
-rwxr-xr-x | build.sh | 11 | ||||
-rwxr-xr-x | scripts/build_rootfs.sh | 3 |
2 files changed, 9 insertions, 5 deletions
@@ -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 |