diff options
| -rw-r--r-- | .gitignore | 3 | ||||
| -rw-r--r-- | meta/classes/image.bbclass | 2 | ||||
| -rw-r--r-- | meta/classes/rootfs_deb.bbclass | 14 | ||||
| -rw-r--r-- | meta/classes/rootfs_ipk.bbclass | 4 | ||||
| -rw-r--r-- | meta/classes/rootfs_rpm.bbclass | 4 | ||||
| -rwxr-xr-x | scripts/poky-env-internal | 68 |
6 files changed, 71 insertions, 24 deletions
diff --git a/.gitignore b/.gitignore index 0b13ee1f57..435bd0b01f 100644 --- a/.gitignore +++ b/.gitignore | |||
| @@ -1,6 +1,9 @@ | |||
| 1 | *.pyc | 1 | *.pyc |
| 2 | build/conf/local.conf | 2 | build/conf/local.conf |
| 3 | build/tmp/ | 3 | build/tmp/ |
| 4 | scripts/poky-git-proxy-socks | ||
| 4 | sources/ | 5 | sources/ |
| 5 | meta-moblin-internal | 6 | meta-moblin-internal |
| 6 | *.swp | 7 | *.swp |
| 8 | *.orig | ||
| 9 | *.rej | ||
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index 8407cdd567..35b7e12498 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass | |||
| @@ -9,6 +9,7 @@ INHIBIT_DEFAULT_DEPS = "1" | |||
| 9 | # "export IMAGE_BASENAME" not supported at this time | 9 | # "export IMAGE_BASENAME" not supported at this time |
| 10 | IMAGE_BASENAME[export] = "1" | 10 | IMAGE_BASENAME[export] = "1" |
| 11 | export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}" | 11 | export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}" |
| 12 | PACKAGE_INSTALL_ATTEMPTONLY ?= "" | ||
| 12 | 13 | ||
| 13 | # We need to recursively follow RDEPENDS and RRECOMMENDS for images | 14 | # We need to recursively follow RDEPENDS and RRECOMMENDS for images |
| 14 | do_rootfs[recrdeptask] += "do_deploy do_populate_staging" | 15 | do_rootfs[recrdeptask] += "do_deploy do_populate_staging" |
| @@ -36,6 +37,7 @@ python () { | |||
| 36 | bb.data.setVarFlag('do_rootfs', 'depends', deps, d) | 37 | bb.data.setVarFlag('do_rootfs', 'depends', deps, d) |
| 37 | 38 | ||
| 38 | runtime_mapping_rename("PACKAGE_INSTALL", d) | 39 | runtime_mapping_rename("PACKAGE_INSTALL", d) |
| 40 | runtime_mapping_rename("PACKAGE_INSTALL_ATTEMPTONLY", d) | ||
| 39 | } | 41 | } |
| 40 | 42 | ||
| 41 | # | 43 | # |
diff --git a/meta/classes/rootfs_deb.bbclass b/meta/classes/rootfs_deb.bbclass index 55d2b920b6..411a6c4e71 100644 --- a/meta/classes/rootfs_deb.bbclass +++ b/meta/classes/rootfs_deb.bbclass | |||
| @@ -81,12 +81,20 @@ fakeroot rootfs_deb_do_rootfs () { | |||
| 81 | if [ $? -ne 0 ]; then | 81 | if [ $? -ne 0 ]; then |
| 82 | exit 1 | 82 | exit 1 |
| 83 | fi | 83 | fi |
| 84 | find ${IMAGE_ROOTFS} -name \*.dpkg-new | for i in `cat`; do | ||
| 85 | mv $i `echo $i | sed -e's,\.dpkg-new$,,'` | ||
| 86 | done | ||
| 87 | done | 84 | done |
| 88 | fi | 85 | fi |
| 89 | 86 | ||
| 87 | rm ${WORKDIR}/temp/log.do_$target-attemptonly.${PID} | ||
| 88 | if [ ! -z "${PACKAGE_INSTALL_ATTEMPTONLY}" ]; then | ||
| 89 | for i in ${PACKAGE_INSTALL_ATTEMPTONLY}; do | ||
| 90 | apt-get install $i --force-yes --allow-unauthenticated >> ${WORKDIR}/temp/log.do_$target-attemptonly.${PID} || true | ||
| 91 | done | ||
| 92 | fi | ||
| 93 | |||
| 94 | find ${IMAGE_ROOTFS} -name \*.dpkg-new | for i in `cat`; do | ||
| 95 | mv $i `echo $i | sed -e's,\.dpkg-new$,,'` | ||
| 96 | done | ||
| 97 | |||
| 90 | install -d ${IMAGE_ROOTFS}/${sysconfdir} | 98 | install -d ${IMAGE_ROOTFS}/${sysconfdir} |
| 91 | echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version | 99 | echo ${BUILDNAME} > ${IMAGE_ROOTFS}/${sysconfdir}/version |
| 92 | 100 | ||
diff --git a/meta/classes/rootfs_ipk.bbclass b/meta/classes/rootfs_ipk.bbclass index ce6dd797ec..07f418adbd 100644 --- a/meta/classes/rootfs_ipk.bbclass +++ b/meta/classes/rootfs_ipk.bbclass | |||
| @@ -42,6 +42,10 @@ fakeroot rootfs_ipk_do_rootfs () { | |||
| 42 | opkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL} | 42 | opkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL} |
| 43 | fi | 43 | fi |
| 44 | 44 | ||
| 45 | if [ ! -z "${PACKAGE_INSTALL_ATTEMPTONLY}" ]; then | ||
| 46 | opkg-cl ${IPKG_ARGS} install ${PACKAGE_INSTALL_ATTEMPTONLY} > "${WORKDIR}/temp/log.do_rootfs_attemptonly.${PID}" || true | ||
| 47 | fi | ||
| 48 | |||
| 45 | export D=${IMAGE_ROOTFS} | 49 | export D=${IMAGE_ROOTFS} |
| 46 | export OFFLINE_ROOT=${IMAGE_ROOTFS} | 50 | export OFFLINE_ROOT=${IMAGE_ROOTFS} |
| 47 | export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} | 51 | export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} |
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass index e3697cb12c..dcdd37c8ee 100644 --- a/meta/classes/rootfs_rpm.bbclass +++ b/meta/classes/rootfs_rpm.bbclass | |||
| @@ -110,6 +110,10 @@ EOF | |||
| 110 | fakechroot yum ${YUMARGS} -y install ${PACKAGE_INSTALL} | 110 | fakechroot yum ${YUMARGS} -y install ${PACKAGE_INSTALL} |
| 111 | fi | 111 | fi |
| 112 | 112 | ||
| 113 | if [ ! -z "${PACKAGE_INSTALL_ATTEMPTONLY}" ]; then | ||
| 114 | fakechroot yum ${YUMARGS} -y install ${PACKAGE_INSTALL_ATTEMPTONLY} > ${WORKDIR}/temp/log.do_$target-attemptonly.${PID} || true | ||
| 115 | fi | ||
| 116 | |||
| 113 | # Add any recommended packages to the image | 117 | # Add any recommended packages to the image |
| 114 | # (added as an extra script since yum itself doesn't support this) | 118 | # (added as an extra script since yum itself doesn't support this) |
| 115 | yum-install-recommends.py ${IMAGE_ROOTFS} "fakechroot yum ${YUMARGS} -y install" | 119 | yum-install-recommends.py ${IMAGE_ROOTFS} "fakechroot yum ${YUMARGS} -y install" |
diff --git a/scripts/poky-env-internal b/scripts/poky-env-internal index 81b1425489..c5cab841e3 100755 --- a/scripts/poky-env-internal +++ b/scripts/poky-env-internal | |||
| @@ -30,48 +30,74 @@ if [ "x$BDIR" = "x" ]; then | |||
| 30 | BDIR="$1" | 30 | BDIR="$1" |
| 31 | fi | 31 | fi |
| 32 | fi | 32 | fi |
| 33 | |||
| 34 | BBDIR="$OEROOT/bitbake$BBEXTRA/" | ||
| 35 | PKGDIR="$OEROOT/meta/" | ||
| 36 | PKGDIR_MOBLIN="$OEROOT/meta-moblin/" | ||
| 37 | BUILDDIR="$OEROOT/$BDIR/" | 33 | BUILDDIR="$OEROOT/$BDIR/" |
| 38 | MSG='' | ||
| 39 | |||
| 40 | unset BDIR | 34 | unset BDIR |
| 35 | BITBAKEDIR="$OEROOT/bitbake$BBEXTRA/" | ||
| 36 | PKGDIR="$OEROOT/meta/" | ||
| 37 | BBPATH="$BITBAKEDIR $PKGDIR" | ||
| 38 | |||
| 39 | # | ||
| 40 | # Add in any extra meta-* repositories to BBPATH | ||
| 41 | # | ||
| 42 | METAREPOS=`cd $OEROOT; find . -maxdepth 1 -name 'meta-*' -type d| sed -e 's#./##g'` | ||
| 43 | for repo in $METAREPOS | ||
| 44 | do | ||
| 45 | # meta-openmoko is disabled by default - see local.conf.sample to enable it | ||
| 46 | if [ $repo = "meta-openmoko" ]; then | ||
| 47 | continue | ||
| 48 | fi | ||
| 49 | # meta-extras is disabled by default - see local.conf.sample to enable it | ||
| 50 | if [ $repo = "meta-extras" ]; then | ||
| 51 | continue | ||
| 52 | fi | ||
| 53 | if [ -e $OEROOT/$repo/poky-extra-environment ]; then | ||
| 54 | . $OEROOT/$repo/poky-extra-environment | ||
| 55 | fi | ||
| 56 | BBPATH=" $BBPATH $OEROOT/$repo" | ||
| 57 | done | ||
| 58 | |||
| 59 | BBPATH="$BBPATH $HOME/.oe $HOME/.poky $BUILDDIR" | ||
| 60 | |||
| 61 | # | ||
| 62 | # Remove any symlinks from BBPATH | ||
| 63 | # | ||
| 64 | NEWPATH="" | ||
| 65 | for p in $BBPATH | ||
| 66 | do | ||
| 67 | p2=`readlink -f "$p"` | ||
| 68 | NEWPATH="$p2:$NEWPATH" | ||
| 69 | done | ||
| 70 | BBPATH="$NEWPATH" | ||
| 71 | |||
| 72 | |||
| 73 | MSG='' | ||
| 41 | 74 | ||
| 42 | BUILD_ARCH=`uname -m` | 75 | BUILD_ARCH=`uname -m` |
| 43 | BUILD_OS=`uname | tr '[A-Z]' '[a-z]'` | 76 | BUILD_OS=`uname | tr '[A-Z]' '[a-z]'` |
| 44 | BUILD_SYS="$BUILD_ARCH-$BUILD_OS" | 77 | BUILD_SYS="$BUILD_ARCH-$BUILD_OS" |
| 45 | 78 | ||
| 46 | PATH="$BBDIR/bin/:$OEROOT/scripts:$PATH" | 79 | PATH="$BITBAKEDIR/bin/:$OEROOT/scripts:$PATH" |
| 47 | 80 | ||
| 48 | cd "$BUILDDIR" | 81 | cd "$BUILDDIR" |
| 49 | 82 | ||
| 50 | # Remove any symlinks from paths | 83 | # Remove any symlinks from paths |
| 51 | BBDIR=`readlink -f "$BBDIR"` | 84 | BITBAKEDIR=`readlink -f "$BITBAKEDIR"` |
| 52 | PKGDIR=`readlink -f "$PKGDIR"` | 85 | PKGDIR=`readlink -f "$PKGDIR"` |
| 53 | BUILDDIR=`readlink -f "$BUILDDIR"` | 86 | BUILDDIR=`readlink -f "$BUILDDIR"` |
| 54 | 87 | ||
| 55 | if ! (test -d "$BBDIR" && test -d "$PKGDIR" && test -d "$BUILDDIR"); then | 88 | if ! (test -d "$BITBAKEDIR" && test -d "$PKGDIR" && test -d "$BUILDDIR"); then |
| 56 | echo >&2 "Error: Not all directories exist! Did you run this script in poky directory?" | 89 | echo >&2 "Error: Not all directories exist! Did you run this script in poky directory?" |
| 57 | return | 90 | return |
| 58 | fi | 91 | fi |
| 59 | 92 | ||
| 60 | if ! (test -r "$BUILDDIR/conf/local.conf"); then | 93 | if [ "x" = "x$POKYLOCALCONF" ]; then |
| 61 | cp -f $BUILDDIR/conf/local.conf.sample $BUILDDIR/conf/local.conf | 94 | POKYLOCALCONF="$BUILDDIR/conf/local.conf.sample" |
| 62 | fi | 95 | fi |
| 63 | 96 | ||
| 64 | BBPATH=$BBDIR | 97 | if ! (test -r "$BUILDDIR/conf/local.conf"); then |
| 65 | if test x"$BBDIR" != x"$PKGDIR_MOBLIN"; then | 98 | cp -f $POKYLOCALCONF $BUILDDIR/conf/local.conf |
| 66 | BBPATH=$PKGDIR_MOBLIN:$BBPATH | ||
| 67 | fi | ||
| 68 | if test x"$BBDIR" != x"$PKGDIR"; then | ||
| 69 | BBPATH=$PKGDIR:$BBPATH | ||
| 70 | fi | ||
| 71 | BBPATH="`readlink -f $HOME/.oe`:`readlink -f $HOME/.poky`:$BBPATH" | ||
| 72 | if test x"$PKGDIR" != x"$BUILDDIR"; then | ||
| 73 | BBPATH=$BUILDDIR:$BBPATH | ||
| 74 | fi | 99 | fi |
| 100 | |||
| 75 | export BBPATH OEROOT BUILD_SYS BUILDDIR | 101 | export BBPATH OEROOT BUILD_SYS BUILDDIR |
| 76 | 102 | ||
| 77 | # Kill off the TERMINFO variable, as glibc will grab its contents in its 'make | 103 | # Kill off the TERMINFO variable, as glibc will grab its contents in its 'make |
