3 # This script must be executed with the following environment variables
6 # export FROZEN_DIR=<place to write conf files>
7 # export DISTRO=<distro being frozen>
10 # If not given or empty FROZEN_DIR defaults to the directory on BBPATH containing
13 # The output of the script consists of two files:
14 # $FROZEN_DIR/$DISTRO-bbfiles.conf
17 # $FROZEN_DIR/$DISTRO-packages.conf
20 # Check the arguments.
21 test -n "$DISTRO" || {
22 echo "FATAL: unfreeze: set \$DISTRO to the name of the distro to freeze" >&2
25 if test -n "$FROZEN_DIR" -a -d "$FROZEN_DIR"
27 : # ok, given a directory
32 for d in ${BBPATH//:/ }
34 if test -r "$d/conf/local.conf"
38 elif test -z "$FROZEN_DIR" -a -d "$d"
40 # default to the first existing directory on
46 if test -n "$FROZEN_DIR"
48 echo "NOTE: unfreeze: \$FROZEN_DIR=\"$FROZEN_DIR\"" >&2
49 echo "NOTE: (defaulted from \$BBPATH=\"$BBPATH\")" >&2
51 echo "FATAL: unfreeze: set \$FROZEN_DIR to the directory for the new .conf files" >&2
58 # the simple bb file list (package/bbfile.bb)
59 out="$FROZEN_DIR/$DISTRO-bbfiles.conf"
60 echo '# automatically generated by bitbake unfreeze' >"$out"
62 # the package directories list (package)
63 out="$FROZEN_DIR/$DISTRO-packages.conf"
64 echo '# automatically generated by bitbake unfreeze' >"$out"
65 echo 'BBFILES := "${PKGDIR}/packages/*/*.bb"' >>"$out"