diff options
author | Amit Pundir <amit.pundir@linaro.org> | 2013-05-23 18:00:02 +0530 |
---|---|---|
committer | Amit Pundir <amit.pundir@linaro.org> | 2013-05-23 18:00:02 +0530 |
commit | 215efe04746759dff4d599aae1d98545547851e4 (patch) | |
tree | 893dcb23d346bef2a579d5ed2eaac1ba76fdd7c6 /build-scripts | |
parent | 67e94b70a18ac3e76fddb8cb6c2c89f4ac5ecb87 (diff) |
create-user-build-script: remove check missing dependencies part and do forceful repo sync to recover on broken/missing objects
Diffstat (limited to 'build-scripts')
-rwxr-xr-x | build-scripts/create-user-build-script | 58 |
1 files changed, 19 insertions, 39 deletions
diff --git a/build-scripts/create-user-build-script b/build-scripts/create-user-build-script index 0d95588..bfcc7a8 100755 --- a/build-scripts/create-user-build-script +++ b/build-scripts/create-user-build-script @@ -51,14 +51,6 @@ usage() exit 1 } -install_package() -{ - if [ \`dpkg-query -W -f='\${Status}\n' \${1} 2>&1 | grep '^install ok' | wc -l\` -eq 0 ]; then - echo "Installing \${1}..." - sudo apt-get install \${1} - fi -} - while getopts "${USAGE_OPTOVERLAY}d:l:ht" optn; do case \$optn in $USAGE_OPTHANDLER @@ -77,15 +69,14 @@ else echo "ERROR: Only 64bit Host(Build) machines are supported at the moment." exit 1 fi -echo if [[ \${UBUNTU} =~ "13." || \${UBUNTU} =~ "12.10" ]]; then #Install basic dev package missing in chrooted environments - install_package software-properties-common + sudo apt-get install software-properties-common sudo dpkg --add-architecture i386 PKGS+=' libstdc++6:i386 git-core' elif [[ \${UBUNTU} =~ "12.04" || \${UBUNTU} =~ "10.04" ]] ; then #Install basic dev package missing in chrooted environments - install_package python-software-properties + suod apt-get install python-software-properties if [[ \${UBUNTU} =~ "12.04" ]]; then PKGS+=' libstdc++6:i386 git-core' else @@ -97,34 +88,23 @@ else fi echo -echo "Checking missing dependencies if any..." -MISSING=\`dpkg-query -W -f='\${Status} \${PACKAGE}\n' \${PKGS} 2>&1 | grep -v '^install ok' | awk '{print \$NF}'\` -if [ -n "\$MISSING" ] ; then - echo -n "Missing required packages: " - for m in \$MISSING ; do - echo -n "\${m} " - done - echo - echo "Setting up Ubuntu software repositories..." - sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu \$(lsb_release -sc) main universe restricted multiverse" - sudo apt-get update +echo "Setting up Ubuntu software repositories..." +sudo add-apt-repository "deb http://archive.ubuntu.com/ubuntu \$(lsb_release -sc) main universe restricted multiverse" +sudo apt-get update +echo +echo "Installing missing dependencies if any..." +sudo apt-get install \${PKGS} +# Obsolete git version 1.7.04 in lucid official repositories +# repo need at least git v1.7.2 +if [[ \${UBUNTU} =~ "10.04" ]]; then echo - echo "Installing missing dependencies..." - sudo apt-get install \`echo \${MISSING} | sed 's/\.//g'\` - # Obsolete git version 1.7.04 in lucid official repositories - # repo need at least git v1.7.2 - if [[ \${UBUNTU} =~ "10.04" ]]; then - echo - echo "repo tool complains of obsolete git version 1.7.04 in lucid official repositories" - echo "Building git for lucid from precise sources .." - wget http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_1.7.9.5.orig.tar.gz - tar xzf git_1.7.9.5.orig.tar.gz - cd git-1.7.9.5/ - make prefix=/usr - sudo make prefix=/usr install - fi -else - echo "No missing package dependencies. Good to Go! " + echo "repo tool complains of obsolete git version 1.7.04 in lucid official repositories" + echo "Building git for lucid from precise sources .." + wget http://archive.ubuntu.com/ubuntu/pool/main/g/git/git_1.7.9.5.orig.tar.gz + tar xzf git_1.7.9.5.orig.tar.gz + cd git-1.7.9.5/ + make prefix=/usr + sudo make prefix=/usr install fi echo @@ -261,7 +241,7 @@ if [ \${PRI} -gt 0 ] ; then fi sed -i 's/\/\/.*-bot@/\/\/'"\${LINARO_ANDROID_ACCESS_ID}"'@/' .repo/manifests/\${MANIFEST_FILENAME} fi -./repo sync +./repo sync -f -j1 EOF |