]> code.ossystems Code Review - openembedded-core.git/commitdiff
Add adt repo checking
authorJessica Zhang <jessica.zhang@intel.com>
Wed, 18 May 2011 04:23:17 +0000 (21:23 -0700)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Thu, 19 May 2011 22:33:41 +0000 (23:33 +0100)
Signed-off-by: Jessica Zhang <jessica.zhang@intel.com>
meta/recipes-devtools/installer/adt-installer/adt_installer
meta/recipes-devtools/installer/adt-installer/adt_installer.conf

index 9336b9ec68e600859918400dafb3355ae994ba3c..1dd07b7f346b5405cb2941b0539fcd381995e5ba 100755 (executable)
@@ -228,7 +228,7 @@ if [ -f "$LOCAL_DOWNLOAD/$filename" ]; then
   fi
 fi
 echo_info "Downloading file: $filename..."
-wget "$YOCTOADT_IPKG_REPO/$1" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
+wget "$YOCTOADT_REPO/rootfs/$1" -P $LOCAL_DOWNLOAD --progress=bar:force 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE" 
 }
 
 
@@ -339,6 +339,17 @@ user_inst_type="$?"
 
 validate_config
 check_result
+
+#check adt_repo exist
+wget $YOCTOADT_REPO 2>&1 | tee -a "$YOCTOADT_INSTALL_LOG_FILE"
+if grep -q "ERROR 404: Not Found" $YOCTOADT_INSTALL_LOG_FILE; then
+  echo -e "[ADT_INST] Error: YOCTOADT_REPO does not exist: $YOCTOADT_REPO"
+  echo -e "\n#############################################################################"
+  echo -e "# Meet error(s) when installing Yocto ADT! Please check log file for details. "
+  echo -e "#############################################################################\n"
+  exit -1
+fi
+
 #firstly we need to install opkg host
 install_opkg
 
index b518c5362a938611e67e0244b97d6feadb319bc3..0c93237ef18f0854886af866150ee77d602eef55 100644 (file)
@@ -23,7 +23,7 @@
 
 # Your yocto distro repository, this should include IPKG based packages and root filesystem files where the installation is based on
 
-YOCTOADT_IPKG_REPO="http://adtrepo.yoctoproject.org/$YOCTOADT_VERSION/rootfs"
+YOCTOADT_REPO="http://adtrepo.yoctoproject.org/$YOCTOADT_VERSION"
 
 # The following are for system wide setup
 # Target architectures that you want to setup host cross dev environment for