From: Nils Kneuper Date: Thu, 13 Oct 2011 11:17:36 +0000 (+0200) Subject: Add some error log output in case some files (as currently happened with X-Git-Tag: sz_beta3~16 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=62ecabb810ffa427dcd6161cce53f5c48bfa1021;p=pandora-misc.git Add some error log output in case some files (as currently happened with HF6!) are not found on the webserver --- diff --git a/hotfix_updater/get_packages.sh b/hotfix_updater/get_packages.sh index 98f9c45..59bf384 100755 --- a/hotfix_updater/get_packages.sh +++ b/hotfix_updater/get_packages.sh @@ -13,14 +13,14 @@ PACKAGES_FOLDER=$WORKING_DIR/hotfix/packages # old and new list of packages seperated by newlines OLD_PACKAGES=$WORKING_DIR/installed-packages_fw1.txt -NEW_PACKAGES=$WORKING_DIR/installed-packages_hf5r.txt +NEW_PACKAGES=$WORKING_DIR/installed-packages_hf6r.txt # names of the output files TO_BE_REMOVED=$WORKING_DIR/to_be_removed.txt TO_BE_ADDED=$WORKING_DIR/to_be_added.txt REALLY_REMOVED=$WORKING_DIR/really_removed.txt REALLY_ADDED=$WORKING_DIR/really_added.txt - +ERRORS=$WORKING_DIR/errors.txt # some temp files @@ -83,6 +83,10 @@ rm -f $WORKING_DIR/Packages.stamps.all $WORKING_DIR/Packages.stamps.armv7a $WORK for i in `cat $TO_BE_ADDED`; do grep "$i" $TMP1 >> $TMP2; + if [ "$?" -ne "0" ] + then + echo "Could not find package '$i' in download list" >> $ERRORS + fi done # seperate into 'kernel' and 'other' (every packagename that starts with 'kernel' is only relevant for the kernel space @@ -126,6 +130,7 @@ echo " $TO_BE_REMOVED: files that are no longer included (at least not as this e echo " $TO_BE_ADDED: files that are to be installed (complete package name incl version number" echo " $REALLY_REMOVED: package names of those packages that are no longer installed (and should be removed using opkg!)" echo " $REALLY_ADDED: package names of packages that were added since the old version" +echo " $ERRORS: a list of packages that were not found on the given download server(s)" echo -e echo "Saved all ("`ls $PACKAGES_FOLDER/kernel/*ipk | wc -l`") kernel related ipks to:" echo " $PACKAGES_FOLDER/kernel" @@ -133,3 +138,9 @@ echo "Saved all ("`ls $PACKAGES_FOLDER/other/*ipk | wc -l`") 'other' ipks to:" echo " $PACKAGES_FOLDER/other" echo -e echo "You can now copy the folder $PACKAGES_FOLDER into the place where you create the pnd file." +if [ -s $ERRORS ] +then + echo -e + echo "Some packages were not found. Please have a look at $ERRORS and make sure that things actually work!" +fi +