dellcloudedge/crowbar — pull request #561 by kozhukalov (2012-04-19 12:13:31+00:00)
Title: fixed conflicting packages caching in ubuntu-common/build_lib.sh

If the packages barclamp need are already in cache, ISO will be built without any problems. BUT if the barclamp pkg cache is empty, then build script will try to fetch
required packages using apt package manager in chroot environment. Then fetched packages will be copied into barclamp cache. The problem is that if there is any problem while attempting to fetch (for example in the case of conflicting packages), the packages will not be installed into chroot and will not be copied into cache and build process will not be failed. It is because the command used to fetch is

apt-get -y --force-yes --allow-unauthenticated --download-only install package1 package2

and if package1 conflicts with package2, these packages both will not be installed in spite on --download-only option. It could be avoided just using two different commands instead of just common one.

apt-get -y --force-yes --allow-unauthenticated --download-only install package1
apt-get -y --force-yes --allow-unauthenticated --download-only install package2