diff options
Diffstat (limited to 'classes')
-rw-r--r-- | classes/base.bbclass | 4 | ||||
-rw-r--r-- | classes/binconfig.bbclass | 8 | ||||
-rw-r--r-- | classes/cross.bbclass | 2 | ||||
-rw-r--r-- | classes/distutils.bbclass | 6 | ||||
-rw-r--r-- | classes/image.bbclass | 8 | ||||
-rw-r--r-- | classes/mozilla.bbclass | 2 | ||||
-rw-r--r-- | classes/pkgconfig.bbclass | 4 | ||||
-rw-r--r-- | classes/rootfs_deb.bbclass | 18 | ||||
-rw-r--r-- | classes/sdk.bbclass | 28 | ||||
-rw-r--r-- | classes/seppuku.bbclass | 24 | ||||
-rw-r--r-- | classes/tmake.bbclass | 2 | ||||
-rw-r--r-- | classes/xlibs.bbclass | 4 |
12 files changed, 77 insertions, 33 deletions
diff --git a/classes/base.bbclass b/classes/base.bbclass index c504f78283..06a49814d2 100644 --- a/classes/base.bbclass +++ b/classes/base.bbclass @@ -684,8 +684,8 @@ base_do_stage () { : } -do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/bin ${STAGING_DIR_TARGET}/lib \ - ${STAGING_DIR_TARGET}/include \ +do_populate_staging[dirs] = "${STAGING_DIR_TARGET}/${layout_bindir} ${STAGING_DIR_TARGET}/${layout_libdir} \ + ${STAGING_DIR_TARGET}/${layout_includedir} \ ${STAGING_BINDIR_NATIVE} ${STAGING_LIBDIR_NATIVE} \ ${STAGING_INCDIR_NATIVE} \ ${STAGING_DATADIR} \ diff --git a/classes/binconfig.bbclass b/classes/binconfig.bbclass index 497b78f454..4e425a76d6 100644 --- a/classes/binconfig.bbclass +++ b/classes/binconfig.bbclass @@ -16,8 +16,8 @@ def get_binconfig_mangle(d): s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'" s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'" s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'" - s += " -e 's:OEPREFIX:${STAGING_LIBDIR}/..:'" - s += " -e 's:OEEXECPREFIX:${STAGING_LIBDIR}/..:'" + s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${layout_prefix}:'" + s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${layout_exec_prefix}:'" s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'" s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'" return s @@ -33,7 +33,7 @@ do_install_append() { -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ -e 's:${STAGING_INCDIR}:${includedir}:g;' \ -e 's:${STAGING_DATADIR}:${datadir}:' \ - -e 's:${STAGING_LIBDIR}/..:${prefix}:' > ${D}${bindir}/`basename $config` + -e 's:${STAGING_DIR_HOST}${layout_prefix}:${prefix}:' > ${D}${bindir}/`basename $config` done fi @@ -42,7 +42,7 @@ do_install_append() { -e 's:${STAGING_LIBDIR}:${libdir}:g;' \ -e 's:${STAGING_INCDIR}:${includedir}:g;' \ -e 's:${STAGING_DATADIR}:${datadir}:' \ - -e 's:${STAGING_LIBDIR}/..:${prefix}:' \ + -e 's:${STAGING_DIR_HOST}${layout_prefix}:${prefix}:' \ $lafile done } diff --git a/classes/cross.bbclass b/classes/cross.bbclass index a6b000cb6a..6e5480a2a0 100644 --- a/classes/cross.bbclass +++ b/classes/cross.bbclass @@ -18,7 +18,7 @@ CPPFLAGS = "${BUILD_CPPFLAGS}" CFLAGS = "${BUILD_CFLAGS}" CXXFLAGS = "${BUILD_CFLAGS}" LDFLAGS = "${BUILD_LDFLAGS}" -LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE} " +LDFLAGS_build-darwin = "-L${STAGING_LIBDIR_NATIVE}" # Overrides for paths diff --git a/classes/distutils.bbclass b/classes/distutils.bbclass index c07a9911cd..7a18e71c04 100644 --- a/classes/distutils.bbclass +++ b/classes/distutils.bbclass @@ -13,10 +13,10 @@ distutils_stage_headers() { } distutils_stage_all() { - install -d ${STAGING_INCDIR}/../${PYTHON_DIR}/site-packages - PYTHONPATH=${STAGING_INCDIR}/../${PYTHON_DIR}/site-packages \ + install -d ${STAGING_DIR_HOST}${layout_prefix}/${PYTHON_DIR}/site-packages + PYTHONPATH=${STAGING_DIR_HOST}${layout_prefix}/${PYTHON_DIR}/site-packages \ BUILD_SYS=${BUILD_SYS} HOST_SYS=${HOST_SYS} \ - ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${STAGING_INCDIR}/.. --install-data=${STAGING_INCDIR}/../share || \ + ${STAGING_BINDIR_NATIVE}/python setup.py install --prefix=${STAGING_DIR_HOST}${layout_prefix} --install-data=${STAGING_DATADIR} || \ oefatal "python setup.py install (stage) execution failed." } diff --git a/classes/image.bbclass b/classes/image.bbclass index 3420e3f53a..312307c831 100644 --- a/classes/image.bbclass +++ b/classes/image.bbclass @@ -4,6 +4,7 @@ LICENSE = "MIT" PACKAGES = "" RDEPENDS += "${IMAGE_INSTALL}" +# "export IMAGE_BASENAME" not supported at this time IMAGE_BASENAME[export] = "1" export PACKAGE_INSTALL ?= "${IMAGE_INSTALL}" @@ -179,8 +180,13 @@ set_image_autologin () { sed -i 's%^AUTOLOGIN=\"false"%AUTOLOGIN="true"%g' ${IMAGE_ROOTFS}/etc/sysconfig/gpelogin } +# Can be use to create /etc/timestamp during image construction to give a reasonably +# sane default time setting +rootfs_update_timestamp () { + date "+%m%d%H%M%Y" >${IMAGE_ROOTFS}/etc/timestamp +} # export the zap_root_password, create_etc_timestamp and remote_init_link -EXPORT_FUNCTIONS zap_root_password create_etc_timestamp remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin +EXPORT_FUNCTIONS zap_root_password create_etc_timestamp remove_init_link do_rootfs make_zimage_symlink_relative set_image_autologin rootfs_update_timestamp addtask rootfs before do_build after do_install diff --git a/classes/mozilla.bbclass b/classes/mozilla.bbclass index abf2bc7623..84c83ebe05 100644 --- a/classes/mozilla.bbclass +++ b/classes/mozilla.bbclass @@ -19,7 +19,7 @@ export MOZ_OBJDIR = "${S}" export CONFIGURE_ARGS = "${EXTRA_OECONF}" export HOST_LIBIDL_CFLAGS = "`${HOST_LIBIDL_CONFIG} --cflags`" export HOST_LIBIDL_LIBS = "`${HOST_LIBIDL_CONFIG} --libs`" -export HOST_LIBIDL_CONFIG = "PKG_CONFIG_PATH=${STAGING_DATADIR_NATIVE}/pkgconfig pkg-config libIDL-2.0" +export HOST_LIBIDL_CONFIG = "PKG_CONFIG_PATH=${STAGING_LIBDIR_NATIVE}/pkgconfig pkg-config libIDL-2.0" export HOST_CC = "${BUILD_CC}" export HOST_CXX = "${BUILD_CXX}" export HOST_CFLAGS = "${BUILD_CFLAGS}" diff --git a/classes/pkgconfig.bbclass b/classes/pkgconfig.bbclass index c795c8a709..c50e0b484f 100644 --- a/classes/pkgconfig.bbclass +++ b/classes/pkgconfig.bbclass @@ -15,8 +15,8 @@ def get_pkgconfig_mangle(d): s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'" s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'" s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'" - s += " -e 's:OEPREFIX:${STAGING_LIBDIR}/..:'" - s += " -e 's:OEEXECPREFIX:${STAGING_LIBDIR}/..:'" + s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${layout_prefix}:'" + s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${layout_exec_prefix}:'" s += " -e 's:-L${WORKDIR}\S*: :g'" s += " -e 's:-I${WORKDIR}\S*: :g'" diff --git a/classes/rootfs_deb.bbclass b/classes/rootfs_deb.bbclass index 5571f699e7..935ef6e3f7 100644 --- a/classes/rootfs_deb.bbclass +++ b/classes/rootfs_deb.bbclass @@ -10,8 +10,8 @@ fakeroot rootfs_deb_do_rootfs () { mkdir -p ${IMAGE_ROOTFS}/var/dpkg/info mkdir -p ${IMAGE_ROOTFS}/var/dpkg/updates - rm -f ${STAGING_DIR}${sysconfdir}/apt/sources.list.rev - rm -f ${STAGING_DIR}${sysconfdir}/apt/preferences + rm -f ${STAGING_ETCDIR_NATIVE}/apt/sources.list.rev + rm -f ${STAGING_ETCDIR_NATIVE}/apt/preferences > ${IMAGE_ROOTFS}/var/dpkg/status > ${IMAGE_ROOTFS}/var/dpkg/available # > ${STAGING_DIR}/var/dpkg/status @@ -28,25 +28,27 @@ fakeroot rootfs_deb_do_rootfs () { apt-ftparchive packages . | bzip2 > Packages.bz2 echo "Label: $arch" > Release - echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${STAGING_DIR}${sysconfdir}/apt/sources.list.rev + echo "deb file:${DEPLOY_DIR_DEB}/$arch/ ./" >> ${STAGING_ETCDIR_NATIVE}/apt/sources.list.rev (echo "Package: *" echo "Pin: release l=$arch" echo "Pin-Priority: $((800 + $priority))" - echo) >> ${STAGING_DIR}${sysconfdir}/apt/preferences + echo) >> ${STAGING_ETCDIR_NATIVE}/apt/preferences priority=$(expr $priority + 5) done - tac ${STAGING_DIR}${sysconfdir}/apt/sources.list.rev > ${STAGING_DIR}${sysconfdir}/apt/sources.list + tac ${STAGING_ETCDIR_NATIVE}/apt/sources.list.rev > ${STAGING_ETCDIR_NATIVE}/apt/sources.list - cat "${STAGING_DIR}${sysconfdir}/apt/apt.conf.sample" \ + cat "${STAGING_ETCDIR_NATIVE}/apt/apt.conf.sample" \ | sed -e 's#Architecture ".*";#Architecture "${TARGET_ARCH}";#' \ - > "${STAGING_DIR}${sysconfdir}/apt/apt-rootfs.conf" + > "${STAGING_ETCDIR_NATIVE}/apt/apt-rootfs.conf" - export APT_CONFIG="${STAGING_DIR}${sysconfdir}/apt/apt-rootfs.conf" + export APT_CONFIG="${STAGING_ETCDIR_NATIVE}/apt/apt-rootfs.conf" export D=${IMAGE_ROOTFS} export OFFLINE_ROOT=${IMAGE_ROOTFS} export IPKG_OFFLINE_ROOT=${IMAGE_ROOTFS} + mkdir -p ${IMAGE_ROOTFS}/var/lib/dpkg/alternatives + apt-get update _flag () { diff --git a/classes/sdk.bbclass b/classes/sdk.bbclass index 441da77bd0..63f12117eb 100644 --- a/classes/sdk.bbclass +++ b/classes/sdk.bbclass @@ -16,12 +16,36 @@ CFLAGS = "${BUILD_CFLAGS}" CXXFLAGS = "${BUILD_CFLAGS}" LDFLAGS = "${BUILD_LDFLAGS}" +# Path prefixes prefix = "${SDK_PREFIX}" exec_prefix = "${prefix}" -base_prefix = "${exec_prefix}" +base_prefix = "${prefix}" + +# Base paths +export base_bindir = "${prefix}/bin" +export base_sbindir = "${prefix}/bin" +export base_libdir = "${prefix}/lib" + +# Architecture independent paths +export datadir = "${prefix}/share" +export sysconfdir = "${prefix}/etc" +export sharedstatedir = "${datadir}/com" +export localstatedir = "${prefix}/var" +export infodir = "${datadir}/info" +export mandir = "${datadir}/man" +export docdir = "${datadir}/doc" +export servicedir = "${prefix}/srv" + +# Architecture dependent paths +export bindir = "${prefix}/bin" +export sbindir = "${prefix}/bin" +export libexecdir = "${prefix}/libexec" +export libdir = "${prefix}/lib" +export includedir = "${prefix}/include" +export oldincludedir = "${prefix}/include" FILES_${PN} = "${prefix}" FILES_${PN}-dbg += "${prefix}/.debug \ ${prefix}/bin/.debug \ - ${prefix}/sbin/.debug \ " + diff --git a/classes/seppuku.bbclass b/classes/seppuku.bbclass index 101f621303..834bee34b4 100644 --- a/classes/seppuku.bbclass +++ b/classes/seppuku.bbclass @@ -140,11 +140,11 @@ def seppuku_find_bug_report(debug_file, opener, query, product, component, bugna if len(scanner.result()) == 0: print >> debug_file, "Scanner failed to scan the html site" print >> debug_file, "%(query)sproduct=%(product)s&component=%(component)s&short_desc_type=substring&short_desc=%(bugname)s" % vars() - print >> debug_file, txt + #print >> debug_file, txt return (False,None) else: # silently pick the first result print >> debug_file, "Result of bug search is " - print >> debug_file, txt + #print >> debug_file, txt (number,status) = scanner.result()[0] return (not status in ["CLOS", "RESO", "VERI"],number) @@ -237,8 +237,16 @@ def seppuku_create_attachment(debug, poster, attach_query, product, component, b if not bug_number: import bb bb.note("Can't create an attachment, no bugnumber passed to method") + print >> debug, "Can't create an attachment, no bugnumber passed to method" + return False + + if not attach_query: + import bb + bb.note("Can't create an attachment, no attach_query passed to method") + print >> debug, "Can't create an attachment, no attach_query passed to method" return False + import urllib2 param = { "bugid" : bug_number, "action" : "insert", "data" : file, "description" : "Build log", "ispatch" : "0", "contenttypemethod" : "list", "contenttypeselection" : "text/plain", "comment" : text } @@ -250,12 +258,16 @@ def seppuku_create_attachment(debug, poster, attach_query, product, component, b return False except Exception, e: print e - return False + print >> debug, "Got exception in poster.open( attach_query, param )" + print >> debug, "attach_query: %s param: %s" % (attach_query, param ) + return False - print >> debug, result.read() + txt = result.read() if result.code != 200: + print >> debug, "Got bad return code (%s)" % result.code return False else: + print >> debug, "Got good return code (200)" return True @@ -361,11 +373,11 @@ python seppuku_eventhandler() { if bug_number and file: if not seppuku_create_attachment(debug_file, poster, attach, product, component, bug_number, text, file): - print >> debug_file, "Failed to attach the build log for bug #%" % bug_number + print >> debug_file, "Failed to attach the build log for bug #%s" % bug_number else: print >> debug_file, "Created an attachment for '%s' '%s' '%s'" % (product, component, bug_number) else: - print >> debug_file, "Not trying to create an attachment for bug #%" % bug_number + print >> debug_file, "Not trying to create an attachment for bug #%s" % bug_number return NotHandled } diff --git a/classes/tmake.bbclass b/classes/tmake.bbclass index 05b82e496d..dbd0bf2763 100644 --- a/classes/tmake.bbclass +++ b/classes/tmake.bbclass @@ -54,7 +54,7 @@ python tmake_do_createpro() { } tmake_do_configure() { - paths="${STAGING_DATADIR}/tmake/qws/${TARGET_OS}-${TARGET_ARCH}-g++ $STAGING_DIR/share/tmake/$OS-g++" + paths="${STAGING_DATADIR}/tmake/qws/${TARGET_OS}-${TARGET_ARCH}-g++ ${STAGING_DATADIR}/tmake/$OS-g++" if (echo "${TARGET_ARCH}"|grep -q 'i.86'); then paths="${STAGING_DATADIR}/tmake/qws/${TARGET_OS}-x86-g++ $paths" fi diff --git a/classes/xlibs.bbclass b/classes/xlibs.bbclass index e797748770..ae8f928f1e 100644 --- a/classes/xlibs.bbclass +++ b/classes/xlibs.bbclass @@ -6,10 +6,10 @@ XLIBS_CVS = "${FREEDESKTOP_CVS}/xlibs" inherit autotools pkgconfig do_stage() { - oe_runmake install prefix=${STAGING_DIR} \ + oe_runmake install prefix=${STAGING_DIR_HOST}${layout_prefix} \ bindir=${STAGING_BINDIR} \ includedir=${STAGING_INCDIR} \ libdir=${STAGING_LIBDIR} \ datadir=${STAGING_DATADIR} \ - mandir=${STAGING_DATADIR}/man + mandir=${STAGING_DIR_HOST}${layout_mandir} } |