# HG changeset patch # User Christopher Rogers # Date 1350401525 0 # Node ID f78d194e7f1307b48eecc7137f6f6e54cdce790f # Parent ad9af7bfcc780d9f8d13e89eb94cf33e1da846b3 libcookorder.sh: Add more comments for explaining functions. diff -r ad9af7bfcc78 -r f78d194e7f13 lib/libcookorder.sh --- a/lib/libcookorder.sh Tue Oct 16 15:02:10 2012 +0000 +++ b/lib/libcookorder.sh Tue Oct 16 15:32:05 2012 +0000 @@ -446,6 +446,7 @@ fi } +# update wanted.txt database update_wan_db() { local PACKAGE=$PACKAGE @@ -517,6 +518,8 @@ tac $tmp/fullco >> $fullco } +# check for missing $PACKAGE in wok +# used in scan function only check_for_missing() { local PACKAGE=$PACKAGE @@ -537,6 +540,8 @@ done } +# look to see if package is missing in +# $INCOMING/packages.txt and $PKGS/packages.txt look_for_missing_pkg() { for pkg in $(cat $1); do @@ -847,6 +852,7 @@ fi } +# check recook reverse depends check_recook_rdeps() { # Recook of reverse-depends if package was broken. @@ -865,6 +871,7 @@ sed "/^$PACKAGE$/d" -i $cooklist } +# remove source folder remove_src() { [ "$WANTED" ] && return @@ -884,6 +891,7 @@ [ -d $WOK/$PACKAGE/source ] && rm -rf $WOK/$PACKAGE/source } +# check for varable modification check_for_var_modification() { for var in $@; do @@ -897,6 +905,7 @@ echo -n "" } +# clean $WOK/$PACKAGE folder clean() { cd $WOK/$PACKAGE @@ -920,6 +929,7 @@ done } +# put $PACKAGE in $broken file if not already there set_pkg_broken() { grep -q ^$PACKAGE$ $broken || echo $PACKAGE >> $broken @@ -943,6 +953,7 @@ cook_code=1 } +# start package database packages_db_start() { if [ ! -s packages.txt ]; then @@ -966,6 +977,7 @@ fi } +# erase previous package info erase_package_info() { cd $pkg_repository @@ -982,6 +994,7 @@ $erase_package_info_extracmd } +# make the end of the package database packages_db_end() { cd $pkg_repository @@ -1005,6 +1018,7 @@ [ -f packages.equiv ] || touch packages.equiv } +# get packages info get_packages_info() { # If there's no taz folder in the wok, extract info from the @@ -1061,6 +1075,7 @@ $get_packages_info_extracmd } +# gen packages database gen_packages_db() { [ "$pkg_repository" ] || pkg_repository=$PKGS @@ -1091,6 +1106,7 @@ packages_db_end } +# update package database update_packages_db() { [ "$pkg_repository" ] || pkg_repository=$PKGS @@ -1161,6 +1177,8 @@ packages_db_end } +# make package database +# $1 = incoming/packages or the folder of the package repo pkgdb() { case "$1" in @@ -1212,6 +1230,7 @@ echo "" && rm -f $command } +# clean chroot clean_chroot() { # Remove packages which was not in the chroot at creation time. @@ -1237,6 +1256,7 @@ fi } +# update library database file update_lib_db() { # Update lib_db @@ -1272,6 +1292,7 @@ fi } +# get $PACKAGE wanted and depends info into wanted.txt and depends.txt files get_packages_info_main() { erase_package_info_main @@ -1279,6 +1300,7 @@ echo -e "$PACKAGE\t "$DEPENDS" \t "$BUILD_DEPENDS" " >> depends.txt } +# erase $PACKAGE line in wanted.txt and depends.txt erase_package_info_main() { for i in wanted.txt depends.txt; do