]> git.ipfire.org Git - ipfire-3.x.git/commitdiff
Added some lines for dependency checking on build time.
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 22 Jan 2009 21:28:11 +0000 (22:28 +0100)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 22 Jan 2009 21:28:11 +0000 (22:28 +0100)
lfs/Config
tools/make-include
tools/make-packages

index 96d307ab35f6e33aa53c33253a0295fad9dce5c7..9d90a966e3875db57bc8f6588a9e3d86147fc375 100644 (file)
@@ -89,6 +89,7 @@ PYTHON_COMPILE = find /usr/lib/python*/ -name *.py | xargs /usr/bin/py-compile
 define DO_PKG_INFO
        @## ALPHABETICAL ORDER ##
        @echo "DEBUG=\"$(DEBUG)\""
+       @echo "DEPS=\"$(DEPS)\""
        @echo "DESC=\"$$(echo $(LONG_DESC))\""
        @echo "EXTRA=\"$(EXTRA)\""
        @echo "GROUP=\"$(GROUP)\""
index 0b87de129b77f4dcdee8d83fe63b4f2f0c6e2778..8a97cd731c490d631287c37ad5249d11ee6e3705 100644 (file)
@@ -188,6 +188,29 @@ lfsmakecommoncheck()
                        return 1
        fi
 
+       # Searching for dependencies
+       local found message
+       for dep in $(pkg_deps $1); do
+               found=0
+               for package in $PACKAGES_DONE; do
+                       if [ "$dep" = "$package" ]; then
+                               found=1
+                               break
+                       fi
+               done
+               [ "$found" = "0" ] && message="$message $dep"
+       done
+       if [ "$message" != "" ]; then
+               message="Deps are missing: $message"
+               if [ "$EXTRA" = "yes" ]; then
+                       echo -ne "${WARN}${message}${NORMAL}"
+                       beautify message SKIP
+                       return 1
+               else
+                       exiterror "$message"
+               fi
+       fi
+
        echo -e "$(date -u '+%b %e %T'): Building $* " >> $LOGFILE
 
        cd $BASEDIR/lfs && make -s -f $* MACHINE=$MACHINE LFS_BASEDIR=$BASEDIR MESSAGE="$1\t " download  >> $LOGFILE 2>&1
@@ -309,6 +332,7 @@ ipfire_make() {
                exiterror "Building $*"
        else
                beautify result DONE $[ $PKG_TIME_END - $PKG_TIME_START ] $1 $PKG_VER $STAGE_ORDER $STAGE
+               PACKAGES_DONE="$PACKAGES_DONE $1"
        fi
 
        return 0
index ffd76c32ce843acc75087be9176a404a92a3347d..163fa534a67233079efb24bd546209e9bc5bc2c0 100644 (file)
@@ -19,6 +19,9 @@
 #                                                                             #
 ###############################################################################
 
+# Save packages, that were already compiled in this variable:
+PACKAGES_DONE=
+
 pkg_list_groups() {
        grep ^GROUP $BASEDIR/lfs/* | awk '{ print $3 }' | sort | uniq
 }
@@ -84,3 +87,11 @@ pkg_info_wiki() {
                done
        )
 }
+
+pkg_deps() {
+       (
+               unset NAME VERSION
+               eval $(pkg_info ${1})
+               echo $DEPS
+       )
+}