Skip to content

Commit

Permalink
Installing base system first, upgrade and then upgrade packages
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Apr 11, 2018
1 parent ee7b8e0 commit d420e70
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/general.sh
Expand Up @@ -582,23 +582,23 @@ prepare_host()
echo "deb http://repo.aptly.info/ squeeze main" > /etc/apt/sources.list.d/aptly.list
fi

if [[ ${#deps[@]} -gt 0 ]]; then
display_alert "Installing build dependencies"
apt -q update
apt -y upgrade
apt -q -y --no-install-recommends install "${deps[@]}" | tee -a $DEST/debug/hostdeps.log
update-ccache-symlinks
fi

# add bionic repository and install more recent qemu and debootstrap
if [[ ! -f /etc/apt/sources.list.d/bionic.list && $codename == "xenial" ]]; then
echo "deb http://us.archive.ubuntu.com/ubuntu/ bionic main restricted universe" > /etc/apt/sources.list.d/bionic.list
echo "Package: *" > /etc/apt/preferences.d/bionic.pref
echo "Pin: release n=bionic" >> /etc/apt/preferences.d/bionic.pref
echo "Pin-Priority: -10" >> /etc/apt/preferences.d/bionic.pref
apt -q update
apt upgrade
apt -t bionic -y --no-install-recommends install qemu-user-static debootstrap
fi

if [[ ${#deps[@]} -gt 0 ]]; then
display_alert "Installing build dependencies"
apt -q update
apt upgrade
apt -q -y --no-install-recommends install "${deps[@]}" | tee -a $DEST/debug/hostdeps.log
update-ccache-symlinks
apt -y upgrade
apt -t bionic -y --no-install-recommends install qemu-user-static debootstrap binfmt-support
fi

# sync clock
Expand Down

5 comments on commit d420e70

@zador-blood-stained
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I hope this mess (the last dozen of commits related to host dependencies) will not be merged to master and we will simply require Bionic host to build Bionic targets (once it is officially released and tested by us).

@igorpecovnik
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:) after this commit chroot-buildpackages procedores finally works.

@xlazom00
Copy link
Contributor

@xlazom00 xlazom00 commented on d420e70 Apr 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@zador-blood-stained
I don't see any problem as fallback solution with user's permission
And now in current state you still need BETA="yes" EXPERT="yes" to make it work :)

@igorpecovnik
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/armbian/build/blob/development/lib/general.sh#L593-L602 This part is installed by default which means we use those three packages in any case, not just for building Ubuntu Bionic. I made many tests and it seems previously noticed problems are gone.

@zador-blood-stained
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see any problem as fallback solution with user's permission

I see a problem of adding extra code to random places when/if it can be avoided. And altering host dependencies with pin priorities is not something 100% stable and reliable in a long term IMO.

Please sign in to comment.