Openembedded Core Discussions
 help / color / mirror / Atom feed
* [CONSOLIDATED PULL (v2) 00/33] Loads of Change!
@ 2011-11-10  7:42 Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 01/33] local.conf.sample.extended: Fix bug 1674 Saul Wold
                   ` (33 more replies)
  0 siblings, 34 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

Richard,

This set of changes is currently being built on the Autobuilder
along with some change I dropped for this request. Based on the
initial builds, I believe that most of these changes are correct
and buildable.

I an attempt to clear the decks and move things forward I am suggesting
we take these changes in.  I dropped Martin's SDL changes since they are
causing some of the Autobuilder failures currently

There still seems to be an issue with connman sanity,
and shadow (populate_sysroot_setscene):

ERROR: Task 3037 (/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb, do_populate_sysroot_setscene) failed with exit code '1'

I included many of your patches in this to verify them as part of
this build.

Please review the AB failures, to confirm my thoughts above.

Thanks
        Sau!

The following changes since commit 25fae81538a92e15eab3fc169ebce44505f67839:

  python: skip setup.py 'import check' when cross-compiling (2011-11-08 21:44:23 +0000)

are available in the git repository at:
  git://git.openembedded.org/openembedded-core-contrib sgw/stage2
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=sgw/stage2

Bruce Ashfield (1):
  linux-yocto: config cleanups + romely rt support

Darren Hart (1):
  ncurses: refactor configure to avoid configuring widec when disabled

Joshua Lock (3):
  shared-mime-info: package runtime data separately
  classes/[gnome|gnomebase|mime]: enhance gnome related classes
  gconf: add upstream GNOME gconf 3.2.3 and drop gconf-dbus

Martin Jansa (6):
  libxml2: use Copyright in LIC_FILES_CHKSUM instead of COPYING
  kbd: import from meta-oe
  kbd: add RREPLACES/RCONFLICTS/RPROVIDES for upgradeable path from
    console-tools
  task-core-boot, keymaps: add another VIRTUAL-RUNTIME to allow
    distributions to use different set of initscripts or no initscripts
    at all
  keymaps: depend on kbd instead of console-tools
  task-core-x11: use VIRTUAL-RUNTIME variables for xserver_common and
    graphical_init_manager

Matthew McClintock (1):
  Introduce new SERIAL_CONSOLES to add multiple consoles for your
    MACHINE

Paul Eggleton (2):
  classes/package_rpm: disable uninstall scripts for upgrades
  busybox: add grep to temporary links during uninstall

Paul Menzel (2):
  libarchive: Remove obsolete comment and empty line at the end
  xinit: Fix `startx` looking for `mcookie` in sysroot

Richard Purdie (7):
  hacktastic patch to fix adduser under rpm
  bitbake.conf: Unload pseudo when its not required for a given task
  scripts/qemuimage-testlib: Output a slightly better error if expect
    is missing
  classes: Remove various bashisms
  Allow use of dash as /bin/sh
  qemu: Ensure an internal qemugl script uses bash as it has bashisms
  useradd: Add missing DEPEND on shadow

Saul Wold (4):
  Distro_tracking: Update Manual Check Date
  libtasn1: update to 2.10
  lame: update to 3.99.1
  udev-extraconf: blacklist /dev/md

Scott Garman (4):
  useradd.bbclass: only modify packages in USERADD_PACKAGES
  useradd.bbclass: do not modify -nativesdk packages
  useradd-example.bb: update example documentation comments
  avahi: remove USERADDPN

Tom Zanussi (1):
  python: bump PR

Xiaofeng Yan (1):
  local.conf.sample.extended: Fix bug 1674

 .../recipes-skeleton/useradd/useradd-example.bb    |    9 +-
 meta/classes/gnome.bbclass                         |   18 +-
 meta/classes/gnomebase.bbclass                     |   30 +
 meta/classes/image-prelink.bbclass                 |    2 +-
 meta/classes/kernel.bbclass                        |    2 +-
 meta/classes/mime.bbclass                          |   58 +
 meta/classes/package_rpm.bbclass                   |   39 +-
 meta/classes/sanity.bbclass                        |    3 -
 meta/classes/useradd.bbclass                       |   49 +-
 meta/conf/bitbake.conf                             |    1 +
 meta/conf/distro/include/default-providers.inc     |    2 -
 .../conf/distro/include/distro_tracking_fields.inc |   94 +-
 meta/conf/local.conf.sample.extended               |    3 +
 meta/conf/multilib.conf                            |    2 +-
 meta/recipes-bsp/keymaps/keymaps_1.0.bb            |    9 +-
 meta/recipes-connectivity/avahi/avahi.inc          |    1 -
 .../recipes-core/base-passwd/base-passwd_3.5.22.bb |    8 +-
 meta/recipes-core/busybox/busybox.inc              |   11 +-
 meta/recipes-core/busybox/busybox_1.18.5.bb        |    2 +-
 meta/recipes-core/kbd/kbd_1.15.2.bb                |   24 +
 meta/recipes-core/libxml/libxml2.inc               |    2 +-
 meta/recipes-core/libxml/libxml2_2.7.8.bb          |    2 +-
 meta/recipes-core/ncurses/ncurses.inc              |   66 +-
 .../sysvinit/sysvinit-inittab_2.88dsf.bb           |   10 +
 meta/recipes-core/tasks/task-core-boot.bb          |    6 +-
 meta/recipes-core/udev/files/mount.blacklist       |    1 +
 meta/recipes-core/udev/udev-extraconf_0.0.bb       |    2 +-
 meta/recipes-devtools/libtool/libtool/prefix.patch |   11 +-
 .../openjade/openjade-native_1.3.2.bb              |    4 +-
 meta/recipes-devtools/python/python_2.7.2.bb       |    2 +-
 .../qemu/qemu-0.14.0/qemu-git-qemugl-host.patch    |    2 +-
 .../qemu/qemu-0.15.0/qemu-git-qemugl-host.patch    |    2 +-
 .../qemu/qemu-git/qemu-git-qemugl-host.patch       |    2 +-
 meta/recipes-devtools/qemu/qemu_0.14.0.bb          |    2 +-
 meta/recipes-devtools/qemu/qemu_0.15.0.bb          |    2 +-
 meta/recipes-devtools/qemu/qemu_git.bb             |    2 +-
 meta/recipes-devtools/rpm/psm.c                    | 3115 ++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm/hacktastic.patch     |   62 +
 meta/recipes-devtools/rpm/rpm_5.4.0.bb             |    3 +-
 .../libarchive/libarchive_2.8.5.bb                 |    3 -
 meta/recipes-gnome/gnome/gconf-3.2.3/nointro.patch |   59 +
 meta/recipes-gnome/gnome/gconf-dbus_705.bb         |   43 -
 meta/recipes-gnome/gnome/gconf_3.2.3.bb            |   43 +
 meta/recipes-graphics/xorg-app/xinit_1.3.0.bb      |    7 +-
 meta/recipes-kernel/linux/linux-yocto_3.0.bb       |    2 +-
 .../lame/{lame-3.98.4 => lame}/no-gtk1.patch       |    0
 .../lame/{lame_3.98.4.bb => lame_3.99.1.bb}        |    6 +-
 meta/recipes-sato/tasks/task-core-x11.bb           |   10 +-
 .../gnutls/{libtasn1_2.9.bb => libtasn1_2.10.bb}   |    8 +-
 .../shared-mime-info/shared-mime-info.inc          |    9 +-
 .../shared-mime-info/shared-mime-info_0.91.bb      |    2 +-
 scripts/qemuimage-testlib                          |   14 +
 52 files changed, 3644 insertions(+), 227 deletions(-)
 create mode 100644 meta/classes/gnomebase.bbclass
 create mode 100644 meta/classes/mime.bbclass
 create mode 100644 meta/recipes-core/kbd/kbd_1.15.2.bb
 create mode 100644 meta/recipes-devtools/rpm/psm.c
 create mode 100644 meta/recipes-devtools/rpm/rpm/hacktastic.patch
 create mode 100644 meta/recipes-gnome/gnome/gconf-3.2.3/nointro.patch
 delete mode 100644 meta/recipes-gnome/gnome/gconf-dbus_705.bb
 create mode 100644 meta/recipes-gnome/gnome/gconf_3.2.3.bb
 rename meta/recipes-multimedia/lame/{lame-3.98.4 => lame}/no-gtk1.patch (100%)
 rename meta/recipes-multimedia/lame/{lame_3.98.4.bb => lame_3.99.1.bb} (82%)
 rename meta/recipes-support/gnutls/{libtasn1_2.9.bb => libtasn1_2.10.bb} (65%)

-- 
1.7.6.4




^ permalink raw reply	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 01/33] local.conf.sample.extended: Fix bug 1674
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 02/33] libxml2: use Copyright in LIC_FILES_CHKSUM instead of COPYING Saul Wold
                   ` (32 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Xiaofeng Yan <xiaofeng.yan@windriver.com>

[YOCTO #1674]
local.conf.sample.extended: An image based on gtk+-directfb don't need x11 for DEFAULT_FEATURES

Remove "x11" from DEFAULT_FEATURES and add "directfb" to it because someone could don't need x11 in their project, perhaps
gtk over directfb will meet his reqirement.

Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>
---
 meta/conf/local.conf.sample.extended |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/meta/conf/local.conf.sample.extended b/meta/conf/local.conf.sample.extended
index e9935ce..7c26572 100644
--- a/meta/conf/local.conf.sample.extended
+++ b/meta/conf/local.conf.sample.extended
@@ -15,6 +15,9 @@
 
 #DISTRO_FEATURES = "alsa bluetooth ext2 irda pcmcia usbgadget usbhost wifi nfs zeroconf pci ${DISTRO_FEATURES_LIBC}"
 
+# If you want to get an image based on gtk+directfb without x11, Please copy this variable to build/conf/local.conf
+#DISTRO_FEATURES = "alsa argp bluetooth ext2 irda largefile pcmcia usbgadget usbhost wifi xattr nfs zeroconf pci 3g directfb ${DISTRO_FEATURES_LIBC}"
+
 # ENABLE_BINARY_LOCALE_GENERATION controls the generation of binary locale
 # packages at build time using qemu-native. Disabling it (by setting it to 0)
 # will save some build time at the expense of breaking i18n on devices with
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 02/33] libxml2: use Copyright in LIC_FILES_CHKSUM instead of COPYING
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 01/33] local.conf.sample.extended: Fix bug 1674 Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 03/33] Introduce new SERIAL_CONSOLES to add multiple consoles for your MACHINE Saul Wold
                   ` (31 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Martin Jansa <martin.jansa@gmail.com>

* COPYING is replaced by symlink to Copyright during do_configure
  (see configure.in), then we end with link to nonexistent file
* same issue as libxslt had http://patchwork.openembedded.org/patch/14195/

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-core/libxml/libxml2.inc      |    2 +-
 meta/recipes-core/libxml/libxml2_2.7.8.bb |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/libxml/libxml2.inc b/meta/recipes-core/libxml/libxml2.inc
index 6f79333..68c088c 100644
--- a/meta/recipes-core/libxml/libxml2.inc
+++ b/meta/recipes-core/libxml/libxml2.inc
@@ -4,7 +4,7 @@ HOMEPAGE = "http://www.xmlsoft.org/"
 BUGTRACKER = "http://bugzilla.gnome.org/buglist.cgi?product=libxml2"
 SECTION = "libs"
 LICENSE = "MIT"
-LIC_FILES_CHKSUM = "file://COPYING;md5=bb90c48926316d9af6e2d70ca7013ade \
+LIC_FILES_CHKSUM = "file://Copyright;md5=bb90c48926316d9af6e2d70ca7013ade \
                     file://hash.c;beginline=6;endline=15;md5=ce702952bfddd7aee22639a2d6b54136 \
                     file://list.c;beginline=4;endline=13;md5=cdbfa3dee51c099edb04e39f762ee907 \
                     file://trio.c;beginline=5;endline=14;md5=6c025753c86d958722ec76e94cae932e"
diff --git a/meta/recipes-core/libxml/libxml2_2.7.8.bb b/meta/recipes-core/libxml/libxml2_2.7.8.bb
index 71001a0..2fa246e 100644
--- a/meta/recipes-core/libxml/libxml2_2.7.8.bb
+++ b/meta/recipes-core/libxml/libxml2_2.7.8.bb
@@ -1,6 +1,6 @@
 require libxml2.inc
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI[md5sum] = "8127a65e8c3b08856093099b52599c86"
 SRC_URI[sha256sum] = "cda23bc9ebd26474ca8f3d67e7d1c4a1f1e7106364b690d822e009fdc3c417ec"
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 03/33] Introduce new SERIAL_CONSOLES to add multiple consoles for your MACHINE
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 01/33] local.conf.sample.extended: Fix bug 1674 Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 02/33] libxml2: use Copyright in LIC_FILES_CHKSUM instead of COPYING Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 04/33] libarchive: Remove obsolete comment and empty line at the end Saul Wold
                   ` (30 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Matthew McClintock <msm@freescale.com>

Just define additional serial consoles like so:

SERIAL_CONSOLES="115200;ttyS0 115200;ttyS1 ... 115200;ttySN"

Also be sure to remove SERIAL_CONSOLE (lacking the S) from your
machine as they can conflict.

Signed-off-by: Matthew McClintock <msm@freescale.com>
---
 .../sysvinit/sysvinit-inittab_2.88dsf.bb           |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
index ba60c74..3a716d7 100644
--- a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb
@@ -25,6 +25,16 @@ do_install() {
     if [ ! -z "${SERIAL_CONSOLE}" ]; then
         echo "S:2345:respawn:${base_sbindir}/getty ${SERIAL_CONSOLE}" >> ${D}${sysconfdir}/inittab
     fi
+
+    idx=0
+    tmp="${SERIAL_CONSOLES}"
+    for i in $tmp
+    do
+	j=`echo ${i} | sed s/\;/\ /g`
+        echo "${idx}:2345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
+	idx=`expr $idx + 1`
+    done
+
     if [ "${USE_VT}" = "1" ]; then
         cat <<EOF >>${D}${sysconfdir}/inittab
 # ${base_sbindir}/getty invocations for the runlevels.
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 04/33] libarchive: Remove obsolete comment and empty line at the end
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (2 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 03/33] Introduce new SERIAL_CONSOLES to add multiple consoles for your MACHINE Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 05/33] Distro_tracking: Update Manual Check Date Saul Wold
                   ` (29 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Paul Menzel <paulepanter@users.sourceforge.net>

This is a fix up for

        commit fb19df5b21e551c5dfdfa340438952560c5fa528
        Author: Xiaofeng Yan <xiaofeng.yan@windriver.com>
        Date:   Mon Nov 7 20:03:53 2011 +0800

            libarchive: update to 2.8.5

            Remove patch "0003-Patch-from-upstream-rev-2516.patch" because it has been merged
            to source codes.

            Signed-off-by: Xiaofeng Yan <xiaofeng.yan@windriver.com>

removing a now obsolete comment because the undistributable content was removed [1] from upstream’s tarball.

Also remove an empty line at the end introduced in the above commit.

[1] http://code.google.com/p/libarchive/issues/detail?id=162

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
---
 .../libarchive/libarchive_2.8.5.bb                 |    3 ---
 1 files changed, 0 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/libarchive/libarchive_2.8.5.bb b/meta/recipes-extended/libarchive/libarchive_2.8.5.bb
index 1bc49e2..5cf13e6 100644
--- a/meta/recipes-extended/libarchive/libarchive_2.8.5.bb
+++ b/meta/recipes-extended/libarchive/libarchive_2.8.5.bb
@@ -7,8 +7,6 @@ PR = "r0"
 
 DEPENDS = "libxml2"
 
-# We need to repack the tarball due undistributable content on the upstream one.
-# More details at http://code.google.com/p/libarchive/issues/detail?id=162
 SRC_URI = "http://libarchive.googlecode.com/files/libarchive-${PV}.tar.gz \
            file://0001-Patch-from-upstream-revision-1990.patch \
            file://0002-Patch-from-upstream-revision-1991.patch \
@@ -24,4 +22,3 @@ SRC_URI[sha256sum] = "13993e0ffbd121ccda46ea226b1f8eac218de0fa8da7d8b1f998093d5c
 inherit autotools lib_package
 
 BBCLASSEXTEND = "nativesdk"
-
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 05/33] Distro_tracking: Update Manual Check Date
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (3 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 04/33] libarchive: Remove obsolete comment and empty line at the end Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 06/33] libtasn1: update to 2.10 Saul Wold
                   ` (28 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

Checked the following Upstreams:
apt
libaio
sysstat
unzip
zip
linexif
boost
libcheck
ncurses
sysfsutils
util-linux - Offline
lsb
eds-tools
libmad
lame
glew
squashfs-tools

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 .../conf/distro/include/distro_tracking_fields.inc |   94 ++++++++++++--------
 1 files changed, 57 insertions(+), 37 deletions(-)

diff --git a/meta/conf/distro/include/distro_tracking_fields.inc b/meta/conf/distro/include/distro_tracking_fields.inc
index c4d33a7..5cd4c37 100644
--- a/meta/conf/distro/include/distro_tracking_fields.inc
+++ b/meta/conf/distro/include/distro_tracking_fields.inc
@@ -484,7 +484,7 @@ RECIPE_LATEST_VERSION_pn-ncurses = "5.9"
 RECIPE_LAST_UPDATE_pn-ncurses = "Apr 06, 2011"
 RECIPE_INTEL_SECTION_pn-ncurses = "base libs"
 RECIPE_MAINTAINER_pn-ncurses = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_MANUAL_CHECK_DATE_pn-ncurses = "Sep 29, 2011"
+RECIPE_MANUAL_CHECK_DATE_pn-ncurses = "Nov 08, 2011"
 
 RECIPE_STATUS_pn-popt = "green"
 RECIPE_LAST_UPDATE_pn-popt = "Jul 5, 2010"
@@ -570,20 +570,22 @@ RECIPE_COMMENTS_pn-tcp-wrappers = "Consider looking at ipv6.4 version"
 RECIPE_NO_UPDATE_REASON_pn-tcp-wrapers = "7.6 is last Stable release"
 
 RECIPE_STATUS_pn-libaio = "green"
+RECIPE_LATEST_VERSION_pn-libaio = "0.3.109"
+RECIPE_LATEST_RELEASE_DATE_pn-libaio = "Aug 30, 2011"
 RECIPE_LAST_UPDATE_pn-libaio = "Aug 27, 2010"
 RECIPE_MAINTAINER_pn-libaio = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_LATEST_VERSION_pn-libaio = "0.3.107"
-RECIPE_MANUAL_CHECK_DATE_pn-libaio = "Jun 6, 2011"
-RECIPE_COMMENTS_pn-libaio = "1.0.9 is current unstable"
+RECIPE_MANUAL_CHECK_DATE_pn-libaio = "Nov 8, 2011"
+RECIPE_COMMENTS_pn-libaio = ""
 
 RECIPE_STATUS_pn-libcheck = "green"
 RECIPE_DEPENDENCY_CHECK_pn-libcheck = "done"
+RECIPE_LATEST_VERSION_pn-libcheck = "0.9.8"
+RECIPE_LATEST_RELEASE_DATE_pn-libcheck = "Sep 23, 2009"
 RECIPE_LAST_UPDATE_pn-libcheck = "Aug 20, 2010"
+RECIPE_MANUAL_CHECK_DATE_pn-libcheck = "Nov 8, 2011"
 RECIPE_MAINTAINER_pn-libcheck = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_LATEST_VERSION_pn-libcheck = "0.9.8"
 RECIPE_INTEL_SECTION_pn-libcheck = "base libs"
 RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-libcheck = "9 months"
-RECIPE_LATEST_RELEASE_DATE_pn-libcheck = "Sep 01, 2009"
 RECIPE_COMMENTS_pn-libcheck = ""
 DISTRO_PN_ALIAS_pn-libcheck = "Ubuntu=check Fedora=check OpenSuSE=check"
 
@@ -1171,10 +1173,10 @@ RECIPE_LAST_UPDATE_pn-apr-util = "Jul 28, 2011"
 RECIPE_MAINTAINER_pn-apr-util = "Zhai Edwin <edwin.zhai@intel.com>"
 
 RECIPE_STATUS_pn-apt = "red"
-RECIPE_LATEST_VERSION_pn-apt = "0.8.15.8"
-RECIPE_LATEST_RELEASE_DATE_pn-apt = "Sep 14, 2011"
+RECIPE_LATEST_VERSION_pn-apt = "0.8.15.9"
+RECIPE_LATEST_RELEASE_DATE_pn-apt = "Oct 14, 2011"
 RECIPE_LAST_UPDATE_pn-apt = "Oct 6, 2011"
-RECIPE_MAINTAINER_pn-apt = "Mei Lei <lei.mei@intel.com>"
+RECIPE_MANUAL_CHECK_DATE_pn-apt = "Nov 08, 2011"
 RECIPE_NO_UPDATE_REASON_pn-apt="similar to zypper, defer the upgrading"
 
 RECIPE_STATUS_pn-chrpath = "red"
@@ -1313,14 +1315,18 @@ RECIPE_LATEST_VERSION_pn-psmisc = "22.13"
 RECIPE_LAST_UPDATE_pn-psmisc = "Jan 18, 2008"
 RECIPE_MAINTAINER_pn-psmisc = "Yu Ke <ke.yu@intel.com>"
 
-RECIPE_STATUS_pn-boost = "red"
-RECIPE_LATEST_VERSION_pn-boost = "1.44.0"
+RECIPE_STATUS_pn-boost = "yellow"
+RECIPE_LATEST_VERSION_pn-boost = "1.47.0"
+RECIPE_LATEST_RELEASE_DATE_pn-boost = "Jul 12, 2011"
 RECIPE_LAST_UPDATE_pn-boost = "Aug 19, 2010"
+RECIPE_MANUAL_CHECK_DATE_pn-boost = "Nov 08, 2011"
 RECIPE_MAINTAINER_pn-boost = "Saul Wold <sgw@linux.intel.com>"
 
-RECIPE_STATUS_pn-boost-jam-native = "red"
+RECIPE_STATUS_pn-boost-jam-native = "green"
 RECIPE_LATEST_VERSION_pn-boost-jam-native = "3.1.18"
+RECIPE_LATEST_RELEASE_DATE_pn-boost-jam-native = "Mar 22, 2011"
 RECIPE_LAST_UPDATE_pn-boost-jam-native = "Aug 19, 2010"
+RECIPE_MANUAL_CHECK_DATE_pn-boost-jam-native = "Nov 08, 2011"
 RECIPE_MAINTAINER_pn-boost-jam-native = "Saul Wold <sgw@linux.intel.com>"
 
 RECIPE_STATUS_pn-libfribidi = "red"
@@ -1453,15 +1459,15 @@ RECIPE_LATEST_RELEASE_DATE_pn-sysvinit = "Apr 01, 2010"
 RECIPE_COMMENTS_pn-sysvinit = ""
 
 RECIPE_STATUS_pn-sysfsutils = "green"
+RECIPE_LATEST_VERSION_pn-sysfsutils = "2.1.0"
+RECIPE_LATEST_RELEASE_DATE_pn-sysfsutils = "Aug 23, 2006"
 RECIPE_LAST_UPDATE_pn-sysfsutils = "Jun 18, 2010"
-RECIPE_MAINTAINER_pn-sysfsutils = "Saul Wold <sgw@linux.intel.com>"
 RECIPE_DEPENDENCY_CHECK_pn-sysfsutils = "not done"
-RECIPE_LATEST_VERSION_pn-sysfsutils = "2.1.0"
 RECIPE_INTEL_SECTION_pn-sysfsutils = "base utils"
 RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-sysfsutils = "n/a"
-RECIPE_LATEST_RELEASE_DATE_pn-sysfsutils = "Aug 23, 2006"
-RECIPE_MANUAL_CHECK_DATE_pn-sysfsutils = "Sep 27, 2011"
+RECIPE_MANUAL_CHECK_DATE_pn-sysfsutils = "Nov 08, 2011"
 RECIPE_COMMENTS_pn-sysfsutils = ""
+RECIPE_MAINTAINER_pn-sysfsutils = "Saul Wold <sgw@linux.intel.com>"
 
 RECIPE_STATUS_pn-curl = "green"
 RECIPE_LAST_UPDATE_pn-curl = "Sep 30, 2011"
@@ -1652,25 +1658,25 @@ RECIPE_LATEST_RELEASE_DATE_pn-pcmciautils = "Jan 01, 2010"
 RECIPE_COMMENTS_pn-pcmciautils = ""
 
 RECIPE_STATUS_pn-unzip = "green"
+RECIPE_LATEST_VERSION_pn-unzip = "6.0"
+RECIPE_LATEST_RELEASE_DATE_pn-unzip = "Apr 25, 2009"
 RECIPE_LAST_UPDATE_pn-unzip = "Jul 5, 2010"
 RECIPE_MAINTAINER_pn-unzip = "Saul Wold <sgw@linux.intel.com>"
 RECIPE_DEPENDENCY_CHECK_pn-unzip = "not done"
-RECIPE_LATEST_VERSION_pn-unzip = "6.0"
 RECIPE_INTEL_SECTION_pn-unzip = "base utils"
 RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-unzip = "49 months"
-RECIPE_LATEST_RELEASE_DATE_pn-unzip = "Apr 01, 2009"
-RECIPE_MANUAL_CHECK_DATE_pn-unzip = "Sep 27, 2011"
+RECIPE_MANUAL_CHECK_DATE_pn-unzip = "Nov 08, 2011"
 RECIPE_COMMENTS_pn-unzip = "5.52 has a race condition vulnerability for Unix version"
 
 RECIPE_STATUS_pn-zip = "green"
+RECIPE_LATEST_VERSION_pn-zip = "3.0"
+RECIPE_LATEST_RELEASE_DATE_pn-zip = "Sep 01, 2009"
 RECIPE_LAST_UPDATE_pn-zip = "Jul 6, 2010"
 RECIPE_MAINTAINER_pn-zip = "Saul Wold <sgw@linux.intel.com>"
 RECIPE_DEPENDENCY_CHECK_pn-zip = "not done"
-RECIPE_LATEST_VERSION_pn-zip = "3.0"
 RECIPE_INTEL_SECTION_pn-zip = "base utils"
 RECIPE_TIME_BETWEEN_LAST_TWO_RELEASES_pn-zip = "21 months"
-RECIPE_LATEST_RELEASE_DATE_pn-zip = "Sep 01, 2009"
-RECIPE_MANUAL_CHECK_DATE_pn-zip = "Sep 27, 2011"
+RECIPE_MANUAL_CHECK_DATE_pn-zip = "Nov 08, 2011"
 RECIPE_COMMENTS_pn-zip = ""
 
 RECIPE_STATUS_pn-strace = "green"
@@ -1755,12 +1761,13 @@ RECIPE_INTEL_SECTION_pn-shared-mime-info = "base utils"
 RECIPE_LATEST_RELEASE_DATE_pn-shared-mime-info = "Feb 01, 2010"
 
 RECIPE_STATUS_pn-util-linux = "green"
+RECIPE_LATEST_VERSION_pn-util-linux = "2.19.1"
 RECIPE_LAST_UPDATE_pn-util-linux = "May 24, 2011"
+RECIPE_LATEST_RELEASE_DATE_pn-util-linux = "May 2, 2011"
 RECIPE_MAINTAINER_pn-util-linux = "Saul Wold <sgw@linux.intel.com>"
-RECIPE_LATEST_VERSION_pn-util-linux = "2.19.1"
 RECIPE_INTEL_SECTION_pn-util-linux = "base utils"
-RECIPE_LATEST_RELEASE_DATE_pn-util-linux = "May 2, 2011"
-RECIPE_MANUAL_CHECK_DATE_pn-util-linux = "Sep 27, 2011"
+RECIPE_MANUAL_CHECK_DATE_pn-util-linux = "Nov 08, 2011"
+RECIPE_COMMENTS_pn-util-linux = "kernel.org still has this off-line"
 
 RECIPE_STATUS_pn-usbutils = "green"
 RECIPE_LAST_UPDATE_pn-usbutils = "May 20, 2011"
@@ -1808,9 +1815,10 @@ RECIPE_COMMENTS_pn-zypper = ""
 DISTRO_PN_ALIAS_pn-zypper = "OpenSuse=zypper Meego=zypper"
 
 RECIPE_STATUS_pn-sysstat = "green"
-RECIPE_LAST_UPDATE_pn-sysstat = "Sep 27, 2011"
 RECIPE_LATEST_VERSION_pn-sysstat = "10.0.2"
-RECIPE_MANUAL_CHECK_DATE_pn-sysstat = "Sep 27, 2011"
+RECIPE_LATEST_RELEASE_DATE_pn-systat = "Aug 28, 2011"
+RECIPE_LAST_UPDATE_pn-sysstat = "Sep 27, 2011"
+RECIPE_MANUAL_CHECK_DATE_pn-systat = "Nov 8, 2011"
 RECIPE_MAINTAINER_pn-sysstat = "Saul Wold <sgw@linux.intel.com>"
 
 RECIPE_STATUS_pn-sysklogd = "red"    # need upgrade
@@ -1922,9 +1930,11 @@ RECIPE_LAST_UPDATE_pn-tiff = "Jul 12, 2011"
 RECIPE_MAINTAINER_pn-tiff = "Saul Wold <sgw@linux.intel.com>"
 RECIPE_MANUAL_CHECK_DATE_pn-tiff = "Jul 12, 2011"
 
-RECIPE_STATUS_pn-libexif = "red"
-RECIPE_LATEST_VERSION_pn-libexif = "0.6.19"
-RECIPE_LAST_UPDATE_pn-libexif = "Nov 22, 2010"
+RECIPE_STATUS_pn-libexif = "green"
+RECIPE_LATEST_VERSION_pn-libexif = "0.6.20"
+RECIPE_LATEST_RELEASE_DATE_pn-libexif = "Dec 12, 2010"
+RECIPE_LAST_UPDATE_pn-libexif = "Apr 15, 2011"
+RECIPE_MANUAL_CHECK_DATE_pn-libexif = "Nov 08, 2011"
 RECIPE_MAINTAINER_pn-libexif = "Saul Wold <sgw@linux.intel.com>"
 
 RECIPE_STATUS_pn-setserial = "red"
@@ -5645,11 +5655,12 @@ RECIPE_STATUS_pn-aaina = "red"
 DISTRO_PN_ALIAS_pn-aaina = "Intel"
 RECIPE_STATUS_pn-table = "red"
 DISTRO_PN_ALIAS_pn-table = "Intel"
+
 RECIPE_STATUS_pn-eds-tools = "red"
 DISTRO_PN_ALIAS_pn-eds-tools = "OpenedHand"
 RECIPE_LATEST_VERSION_pn-eds-tools = "bzr"
 RECIPE_LAST_UPDATE_pn-eds-tools = "Sep 12, 2007"
-RECIPE_MANUAL_CHECK_DATE_pn-eds-tools = "Sep 27, 2011"
+RECIPE_MANUAL_CHECK_DATE_pn-eds-tools = "Nov 08, 2011"
 RECIPE_NO_UPDATE_REASON_pn-eds-tools = "Possibly convert to GIT based fetch"
 
 RECIPE_STATUS_pn-abiword-embedded = "red"
@@ -5691,24 +5702,34 @@ RECIPE_MAINTAINER_pn-adt-installer = "Jessica Zhang <jessica.zhang@intel.com>"
 RECIPE_LATEST_VERSION_pn-glew = "1.7.0"
 RECIPE_LATEST_RELEASE_DATE_pn-glew = "Aug 26, 2011"
 RECIPE_LAST_UPDATE_pn-glew = "May 24, 2011"
-RECIPE_MANUAL_CHECK_DATE_pn-glew = "Sep 27, 2011"
+RECIPE_MANUAL_CHECK_DATE_pn-glew = "Nov 08, 2011"
+
+RECIPE_LATEST_VERSION_pn-squashfs-tools = "4.2"
+RECIPE_LATEST_RELEASE_DATE_pn-squashfs-tools = "Feb 28, 2011"
+RECIPE_LAST_UPDATE_pn-squashfs-tools = "Oct 21, 2011"
+RECIPE_MANUAL_CHECK_DATE_pn-squashfs-tools = "Nov 08, 2011"
 
 RECIPE_LATEST_VERSION_pn-mpeg2dec = "0.5.1"
 RECIPE_NO_UPDATE_REASON_pn-mpeg2dec = "Why are we currently at 0.4.1?"
 RECIPE_MANUAL_CHECK_DATE_pn-mpeg2dec = "May 24, 2011"
-RECIPE_LATEST_VERSION_pn-lame = "3.98.4"
+
+RECIPE_LATEST_VERSION_pn-lame = "3.99"
+RECIPE_LATEST_RELEASE_DATE_pn-lame = "Nov 05, 2004
+RECIPE_LAST_UPDATE_pn-lame = "Jul 04, 2006"
+RECIPE_MANUAL_CHECK_DATE_pn-lame = "Nov 08, 2011"
+DISTRO_PN_ALIAS_pn-lame = "Debian=lame Ubuntu=lame"
 
 RECIPE_LATEST_VERSION_pn-libmad = "0.15.1b"
-RECIPE_LAST_UPDATE_pn-libmad = "Jul 04, 2006"
 RECIPE_LATEST_RELEASE_DATE_pn-libmad = "Feb 18, 2004
-RECIPE_MANUAL_CHECK_DATE_pn-libmad = "Sep 27, 2011"
+RECIPE_LAST_UPDATE_pn-libmad = "Jul 04, 2006"
+RECIPE_MANUAL_CHECK_DATE_pn-libmad = "Nov 08, 2011"
 
 RECIPE_LATEST_VERSION_pn-libxml-perl = "0.08"
 
 RECIPE_LATEST_VERSION_pn-lsb = "1.4"
 RECIPE_LAST_UPDATE_pn-lsb = "Nov 04, 2010"
 RECIPE_LATEST_RELEASE_DATE_pn-lsb = "Jan 04, 2001"
-RECIPE_MANUAL_CHECK_DATE_pn-lsb = "Sep 27, 2011"
+RECIPE_MANUAL_CHECK_DATE_pn-lsb = "Nov 08, 2011"
 RECIPE_NO_UPDATE_REASON_pn-lsb = "1.4 is fixed version of LSB Test"
 
 RECIPE_LATEST_VERSION_pn-lsbsetup = "0.9"
@@ -5995,7 +6016,6 @@ RECIPE_LATEST_VERSION_pn-chkconfig = "1.3.55"
 RECIPE_LAST_UPDATE_pn-chkconfig = "Oct 19, 2011"
 RECIPE_MANUAL_CHECK_DATE_pn-chkconfig = "Oct 25, 2011"
 
-DISTRO_PN_ALIAS_pn-lame = "Debian=lame Ubuntu=lame"
 DISTRO_PN_ALIAS_pn-libiconv = "Fedora=mingw-libiconv Opensuse=cross-mingw-libiconv"
 DISTRO_PN_ALIAS_pn-qt4-native = "Fedora=qt4 Debian=qt4-dev-tools"
 DISTRO_PN_ALIAS_pn-update-alternatives-dpkg = "Opensuse=update-alternatives Mandriva=update-alternatives"
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 06/33] libtasn1: update to 2.10
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (4 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 05/33] Distro_tracking: Update Manual Check Date Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 07/33] ncurses: refactor configure to avoid configuring widec when disabled Saul Wold
                   ` (27 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

COPYING.LIB has white space formating changing
README has Copyright update to year range

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 .../gnutls/{libtasn1_2.9.bb => libtasn1_2.10.bb}   |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
 rename meta/recipes-support/gnutls/{libtasn1_2.9.bb => libtasn1_2.10.bb} (65%)

diff --git a/meta/recipes-support/gnutls/libtasn1_2.9.bb b/meta/recipes-support/gnutls/libtasn1_2.10.bb
similarity index 65%
rename from meta/recipes-support/gnutls/libtasn1_2.9.bb
rename to meta/recipes-support/gnutls/libtasn1_2.10.bb
index 9a80005..ef15be7 100644
--- a/meta/recipes-support/gnutls/libtasn1_2.9.bb
+++ b/meta/recipes-support/gnutls/libtasn1_2.10.bb
@@ -5,18 +5,16 @@ LICENSE = "GPLv3+ & LGPLv2.1+"
 LICENSE_${PN}-bin = "GPLv3+"
 LICENSE_${PN} = "LGPLv2.1+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504 \
-                    file://COPYING.LIB;md5=a6f89e2100d9b6cdffcea4f398e37343 \
+                    file://COPYING.LIB;md5=4fbd65380cdd255951079008b364516c \
                     file://README;endline=8;md5=c3803a3e8ca5ab5eb1e5912faa405351"
 
-#RREPLACES_${PN}-bin = "libtasn1 (<< 2.7)"
+SRC_URI[md5sum] = "ef80c227d0dcdc2940fbc58faf8e0cf1"
+SRC_URI[sha256sum] = "17e4c06212e00437c13633c26ed73dad21784805008cf7550f1399adbd1006d0"
 
 PR = "r0"
 
 SRC_URI = "ftp://ftp.gnu.org/gnu/libtasn1/libtasn1-${PV}.tar.gz"
 
-SRC_URI[md5sum] = "f4f4035b84550100ffeb8ad4b261dea9"
-SRC_URI[sha256sum] = "fac46855fac8b08cf6f5a1b60cebad8e090bac1f06c335a044e84110d0b412c4"
-
 inherit autotools binconfig lib_package
 
 BBCLASSEXTEND = "native"
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 07/33] ncurses: refactor configure to avoid configuring widec when disabled
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (5 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 06/33] libtasn1: update to 2.10 Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 08/33] python: bump PR Saul Wold
                   ` (26 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Darren Hart <dvhart@linux.intel.com>

The ENABLE_WIDEC variable can be used to disable ncurses wide character support
when your C library doesn't support it. Currently, the do_configure step
configures for both narrow and wide characters regardless and only checks
ENABLE_WIDEC during compilation. This leads to QA failures with host
contamination during configure if the C library doesn't support wide characters.

Refactor do_configure with a new ncurses_configure helper function and only
configure for wide character support if ENABLE_WIDEC is true.

Ensure that configure errors are propogated back through to do_configure.

Tested with ENABLE_WIDEC as true and false via an ncurses bbappend on i586,
including basic error injection.

V2: INC_PR bump

Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
 meta/recipes-core/ncurses/ncurses.inc |   66 +++++++++++++++++---------------
 1 files changed, 35 insertions(+), 31 deletions(-)

diff --git a/meta/recipes-core/ncurses/ncurses.inc b/meta/recipes-core/ncurses/ncurses.inc
index be7d387..df9252a 100644
--- a/meta/recipes-core/ncurses/ncurses.inc
+++ b/meta/recipes-core/ncurses/ncurses.inc
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://ncurses/base/version.c;beginline=1;endline=27;md5=cbc
 SECTION = "libs"
 DEPENDS = "ncurses-native"
 DEPENDS_virtclass-native = ""
-INC_PR = "r1"
+INC_PR = "r2"
 
 inherit autotools binconfig multilib_header
 
@@ -26,6 +26,36 @@ ENABLE_WIDEC = "true"
 # builds.
 BUILD_CPPFLAGS += "-D_GNU_SOURCE"
 
+# Helper function for do_configure to allow multiple configurations
+# $1 the directory to run configure in
+# $@ the arguments to pass to configure
+ncurses_configure() {
+	mkdir -p $1
+	cd $1
+	shift
+	oe_runconf \
+	        --disable-static \
+	        --without-debug \
+	        --without-ada \
+	        --without-gpm \
+	        --enable-hard-tabs \
+	        --enable-xmc-glitch \
+	        --enable-colorfgbg \
+	        --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \
+	        --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \
+	        --with-shared \
+	        --disable-big-core \
+	        --program-prefix= \
+	        --with-ticlib \
+	        --with-termlib=tinfo \
+	        --enable-sigwinch \
+	        --enable-pc-files \
+	        --disable-rpath-hack \
+	        --with-manpage-format=normal \
+	        "$@" || return 1
+	cd ..
+}
+
 # Override the function from the autotools class; ncurses requires a
 # patched autoconf213 to generate the configure script. This autoconf
 # is not available so that the shipped script will be used.
@@ -35,36 +65,10 @@ do_configure() {
         # not the case for /dev/null redirections)
         export cf_cv_working_poll=yes
 
-        for i in \
-        'narrowc' \
-        'widec   --enable-widec --without-progs'; do
-                set -- $i
-                mkdir -p $1
-                cd $1
-                shift
-
-                oe_runconf \
-                        --disable-static \
-                        --without-debug \
-                        --without-ada \
-                        --without-gpm \
-                        --enable-hard-tabs \
-                        --enable-xmc-glitch \
-                        --enable-colorfgbg \
-                        --with-termpath='${sysconfdir}/termcap:${datadir}/misc/termcap' \
-                        --with-terminfo-dirs='${sysconfdir}/terminfo:${datadir}/terminfo' \
-                        --with-shared \
-                        --disable-big-core \
-                        --program-prefix= \
-                        --with-ticlib \
-                        --with-termlib=tinfo \
-                        --enable-sigwinch \
-                        --enable-pc-files \
-                        --disable-rpath-hack \
-                        --with-manpage-format=normal \
-                        "$@"
-                cd ..
-        done
+	ncurses_configure "narrowc" || \
+		return 1
+	! ${ENABLE_WIDEC} || \
+		ncurses_configure "widec" "--enable-widec" "--without-progs"
 }
 
 do_compile() {
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 08/33] python: bump PR
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (6 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 07/33] ncurses: refactor configure to avoid configuring widec when disabled Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 09/33] lame: update to 3.99.1 Saul Wold
                   ` (25 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Tom Zanussi <tom.zanussi@intel.com>

Commit 23d2eaf9 ('skip setup.py 'import check' when cross-compiling')
neglected bumping the PR, this adds it.

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
---
 meta/recipes-devtools/python/python_2.7.2.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-devtools/python/python_2.7.2.bb b/meta/recipes-devtools/python/python_2.7.2.bb
index 360e64e..5682e05 100644
--- a/meta/recipes-devtools/python/python_2.7.2.bb
+++ b/meta/recipes-devtools/python/python_2.7.2.bb
@@ -1,7 +1,7 @@
 require python.inc
 DEPENDS = "python-native db gdbm openssl readline sqlite3 zlib"
 DEPENDS_sharprom = "python-native db readline zlib gdbm openssl"
-PR = "${INC_PR}.1"
+PR = "${INC_PR}.2"
 
 DISTRO_SRC_URI ?= "file://sitecustomize.py"
 DISTRO_SRC_URI_linuxstdbase = ""
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 09/33] lame: update to 3.99.1
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (7 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 08/33] python: bump PR Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 10/33] kbd: import from meta-oe Saul Wold
                   ` (24 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

Updated lame.h checksum due to change of LGPL Lessor -> Library

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 .../lame/{lame-3.98.4 => lame}/no-gtk1.patch       |    0
 .../lame/{lame_3.98.4.bb => lame_3.99.1.bb}        |    6 +++---
 2 files changed, 3 insertions(+), 3 deletions(-)
 rename meta/recipes-multimedia/lame/{lame-3.98.4 => lame}/no-gtk1.patch (100%)
 rename meta/recipes-multimedia/lame/{lame_3.98.4.bb => lame_3.99.1.bb} (82%)

diff --git a/meta/recipes-multimedia/lame/lame-3.98.4/no-gtk1.patch b/meta/recipes-multimedia/lame/lame/no-gtk1.patch
similarity index 100%
rename from meta/recipes-multimedia/lame/lame-3.98.4/no-gtk1.patch
rename to meta/recipes-multimedia/lame/lame/no-gtk1.patch
diff --git a/meta/recipes-multimedia/lame/lame_3.98.4.bb b/meta/recipes-multimedia/lame/lame_3.99.1.bb
similarity index 82%
rename from meta/recipes-multimedia/lame/lame_3.98.4.bb
rename to meta/recipes-multimedia/lame/lame_3.99.1.bb
index 680ea48..31766fd 100644
--- a/meta/recipes-multimedia/lame/lame_3.98.4.bb
+++ b/meta/recipes-multimedia/lame/lame_3.99.1.bb
@@ -4,14 +4,14 @@ BUGTRACKER = "http://sourceforge.net/tracker/?group_id=290&atid=100290"
 SECTION = "console/utils"
 LICENSE = "LGPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=c46bda00ffbb0ba1dac22f8d087f54d9 \
-                    file://include/lame.h;beginline=1;endline=20;md5=d3ff8cae3e79c4e9da7169c7928dc3a2"
+                    file://include/lame.h;beginline=1;endline=20;md5=a2258182c593c398d15a48262130a92b
 PR = "r0"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/lame/lame-${PV}.tar.gz \
            file://no-gtk1.patch"
 
-SRC_URI[md5sum] = "8e9866ad6b570c6c95c8cba48060473f"
-SRC_URI[sha256sum] = "ac3144c76617223a9be4aaa3e28a66b51bcab28141050c3af04cb06836f772c8"
+SRC_URI[md5sum] = "2576a7368b5c90a87adc9de6b9f0628c"
+SRC_URI[sha256sum] = "1eedcbe238f81cdef822f367f104a8ff918062727b61f0c62b24e9f79d941cf0"
 
 inherit autotools
 
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 10/33] kbd: import from meta-oe
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (8 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 09/33] lame: update to 3.99.1 Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 11/33] kbd: add RREPLACES/RCONFLICTS/RPROVIDES for upgradeable path from console-tools Saul Wold
                   ` (23 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Martin Jansa <Martin.Jansa@gmail.com>

* replaces console-tools used in keymaps

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-core/kbd/kbd_1.15.2.bb |   19 +++++++++++++++++++
 1 files changed, 19 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-core/kbd/kbd_1.15.2.bb

diff --git a/meta/recipes-core/kbd/kbd_1.15.2.bb b/meta/recipes-core/kbd/kbd_1.15.2.bb
new file mode 100644
index 0000000..36e68a0
--- /dev/null
+++ b/meta/recipes-core/kbd/kbd_1.15.2.bb
@@ -0,0 +1,19 @@
+DESCRIPTION = "This package contains keytable files and keyboard utilities"
+# everything minus console-fonts is GPLv2+
+LICENSE = "GPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=587ce626d15bd61699a64a6b8a5afefb"
+
+inherit autotools gettext
+
+BBCLASSEXTEND = "native"
+
+SRC_URI="${KERNELORG_MIRROR}/linux/utils/kbd/kbd-1.15.2.tar.bz2"
+SRC_URI[md5sum] = "e850eb91e4d3b94b194efe8e953204c5"
+SRC_URI[sha256sum] = "b3602d191eef7a6a8317fc3cd231efa40a89ac235dce57a77cac825a2a21eba6"
+
+PACKAGES += "${PN}-consolefonts ${PN}-keymaps ${PN}-unimaps ${PN}-consoletrans"
+
+FILES_${PN}-consolefonts = "${datadir}/consolefonts"
+FILES_${PN}-consoletrans = "${datadir}/consoletrans"
+FILES_${PN}-keymaps = "${datadir}/keymaps"
+FILES_${PN}-unimaps = "${datadir}/unimaps"
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 11/33] kbd: add RREPLACES/RCONFLICTS/RPROVIDES for upgradeable path from console-tools
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (9 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 10/33] kbd: import from meta-oe Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 12/33] task-core-boot, keymaps: add another VIRTUAL-RUNTIME to allow distributions to use different set of initscripts or no initscripts at all Saul Wold
                   ` (22 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Martin Jansa <Martin.Jansa@gmail.com>

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-core/kbd/kbd_1.15.2.bb |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/meta/recipes-core/kbd/kbd_1.15.2.bb b/meta/recipes-core/kbd/kbd_1.15.2.bb
index 36e68a0..2e0406b 100644
--- a/meta/recipes-core/kbd/kbd_1.15.2.bb
+++ b/meta/recipes-core/kbd/kbd_1.15.2.bb
@@ -6,6 +6,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=587ce626d15bd61699a64a6b8a5afefb"
 inherit autotools gettext
 
 BBCLASSEXTEND = "native"
+RREPLACES_${PN} = "console-tools"
+RPROVIDES_${PN} = "console-tools"
+RCONFLICTS_${PN} = "console-tools"
+
+PR = "r1"
 
 SRC_URI="${KERNELORG_MIRROR}/linux/utils/kbd/kbd-1.15.2.tar.bz2"
 SRC_URI[md5sum] = "e850eb91e4d3b94b194efe8e953204c5"
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 12/33] task-core-boot, keymaps: add another VIRTUAL-RUNTIME to allow distributions to use different set of initscripts or no initscripts at all
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (10 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 11/33] kbd: add RREPLACES/RCONFLICTS/RPROVIDES for upgradeable path from console-tools Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 13/33] keymaps: depend on kbd instead of console-tools Saul Wold
                   ` (21 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Martin Jansa <Martin.Jansa@gmail.com>

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-bsp/keymaps/keymaps_1.0.bb   |    6 +++++-
 meta/recipes-core/tasks/task-core-boot.bb |    6 ++++--
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-bsp/keymaps/keymaps_1.0.bb b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
index 23a3051..4fe7987 100644
--- a/meta/recipes-bsp/keymaps/keymaps_1.0.bb
+++ b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
@@ -1,7 +1,11 @@
 SUMMARY = "Keyboard maps"
 DESCRIPTION = "Keymaps and initscript to set the keymap on bootup."
 SECTION = "base"
-RDEPENDS_${PN} = "initscripts console-tools"
+
+# Distro can override initscripts provider
+VIRTUAL-RUNTIME_initscripts ?= "initscripts"
+
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_initscripts} console-tools"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
diff --git a/meta/recipes-core/tasks/task-core-boot.bb b/meta/recipes-core/tasks/task-core-boot.bb
index 9e63ebb..05c280d 100644
--- a/meta/recipes-core/tasks/task-core-boot.bb
+++ b/meta/recipes-core/tasks/task-core-boot.bb
@@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://${COREBASE}/LICENSE;md5=3f40d7994397109285ec7b81fdeb3
 PACKAGE_ARCH = "${MACHINE_ARCH}"
 DEPENDS = "virtual/kernel"
 ALLOW_EMPTY = "1"
-PR = "r8"
+PR = "r9"
 
 #
 # Set by the machine configuration with packages essential for device bootup
@@ -23,6 +23,8 @@ VIRTUAL-RUNTIME_dev_manager ?= "udev"
 VIRTUAL-RUNTIME_login_manager ?= "tinylogin"
 # Distro can override init_manager provider
 VIRTUAL-RUNTIME_init_manager ?= "sysvinit"
+# Distro can override initscripts provider
+VIRTUAL-RUNTIME_initscripts ?= "initscripts"
 
 PACKAGES = "\
     task-core-boot \
@@ -34,7 +36,7 @@ RDEPENDS_task-core-boot = "\
     base-files \
     base-passwd \
     busybox \
-    initscripts \
+    ${VIRTUAL-RUNTIME_initscripts} \
     ${@base_contains("MACHINE_FEATURES", "keyboard", "keymaps", "", d)} \
     modutils-initscripts \
     netbase \
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 13/33] keymaps: depend on kbd instead of console-tools
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (11 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 12/33] task-core-boot, keymaps: add another VIRTUAL-RUNTIME to allow distributions to use different set of initscripts or no initscripts at all Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 14/33] task-core-x11: use VIRTUAL-RUNTIME variables for xserver_common and graphical_init_manager Saul Wold
                   ` (20 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Martin Jansa <Martin.Jansa@gmail.com>

* nowadays kbd seems more active

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-bsp/keymaps/keymaps_1.0.bb |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-bsp/keymaps/keymaps_1.0.bb b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
index 4fe7987..1876db8 100644
--- a/meta/recipes-bsp/keymaps/keymaps_1.0.bb
+++ b/meta/recipes-bsp/keymaps/keymaps_1.0.bb
@@ -5,11 +5,12 @@ SECTION = "base"
 # Distro can override initscripts provider
 VIRTUAL-RUNTIME_initscripts ?= "initscripts"
 
-RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_initscripts} console-tools"
+RDEPENDS_${PN} = "${VIRTUAL-RUNTIME_initscripts} kbd"
+
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
 PACKAGE_ARCH = "${MACHINE_ARCH}"
-PR = "r19"
+PR = "r20"
 
 INHIBIT_DEFAULT_DEPS = "1"
 
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 14/33] task-core-x11: use VIRTUAL-RUNTIME variables for xserver_common and graphical_init_manager
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (12 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 13/33] keymaps: depend on kbd instead of console-tools Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 15/33] classes/package_rpm: disable uninstall scripts for upgrades Saul Wold
                   ` (19 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Martin Jansa <Martin.Jansa@gmail.com>

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
---
 meta/recipes-sato/tasks/task-core-x11.bb |   10 ++++++++--
 1 files changed, 8 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-sato/tasks/task-core-x11.bb b/meta/recipes-sato/tasks/task-core-x11.bb
index 26d550a..106bc0f 100644
--- a/meta/recipes-sato/tasks/task-core-x11.bb
+++ b/meta/recipes-sato/tasks/task-core-x11.bb
@@ -30,6 +30,12 @@ ALLOW_EMPTY = "1"
 FILEMANAGER ?= "pcmanfm"
 FILEMANAGER_mips ?= ""
 
+# xserver-common, x11-common
+VIRTUAL-RUNTIME_xserver_common ?= "x11-common"
+
+# elsa, xserver-nodm-init
+VIRTUAL-RUNTIME_graphical_init_manager ?= "xserver-nodm-init"
+
 
 RDEPENDS_task-core-x11-base = "\
     dbus \
@@ -42,8 +48,8 @@ RDEPENDS_task-core-x11-base = "\
     matchbox-desktop \
     matchbox-session \
     ${XSERVER} \
-    x11-common \
-    xserver-nodm-init \
+    ${VIRTUAL-RUNTIME_xserver_common} \
+    ${VIRTUAL-RUNTIME_graphical_init_manager} \
     liberation-fonts \
     xauth \
     xhost \
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 15/33] classes/package_rpm: disable uninstall scripts for upgrades
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (13 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 14/33] task-core-x11: use VIRTUAL-RUNTIME variables for xserver_common and graphical_init_manager Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 16/33] busybox: add grep to temporary links during uninstall Saul Wold
                   ` (18 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Paul Eggleton <paul.eggleton@linux.intel.com>

Our current assumption (based on the behaviour of opkg) when writing
recipes is that prerm and postrm do not get called during an upgrade.
When using rpm however, these are mapped to the rpm "preun" and "postun"
events which occur after postinst for upgrades, and when these contain
removal type operations (such as update-alternatives --remove) this
causes problems.

This patch wraps each preun and postun script for rpm in a check that
determines whether or not the script is being called during an upgrade,
and skips the entire script if it is, which mimics the behaviour of opkg
under the same conditions.

Fixes [YOCTO #1760]

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
 meta/classes/package_rpm.bbclass |   18 ++++++++++++++++--
 1 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index df5a2db..2679e9f 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -471,6 +471,16 @@ python write_specfile () {
 				else:
 					target.append(path + "/" + file)
 
+	# Prevent the prerm/postrm scripts from being run during an upgrade
+	def wrap_uninstall(scriptvar):
+		scr = scriptvar.strip()
+		if scr.startswith("#!"):
+			pos = scr.find("\n") + 1
+		else:
+			pos = 0
+		scr = scr[:pos] + 'if [ "$1" = "0" ] ; then\n' + scr[pos:] + '\nfi'
+		return scr
+
 	packages = bb.data.getVar('PACKAGES', d, True)
 	if not packages or packages == '':
 		bb.debug(1, "No packages; nothing to do")
@@ -671,8 +681,10 @@ python write_specfile () {
 				spec_scriptlets_bottom.append('%%post -n %s' % splitname)
 			elif script == 'prerm':
 				spec_scriptlets_bottom.append('%%preun -n %s' % splitname)
+				scriptvar = wrap_uninstall(scriptvar)
 			elif script == 'postrm':
 				spec_scriptlets_bottom.append('%%postun -n %s' % splitname)
+				scriptvar = wrap_uninstall(scriptvar)
 			spec_scriptlets_bottom.append(scriptvar)
 			spec_scriptlets_bottom.append('')
 
@@ -758,11 +770,13 @@ python write_specfile () {
 		spec_scriptlets_top.append('')
 	if srcprerm:
 		spec_scriptlets_top.append('%preun')
-		spec_scriptlets_top.append(srcprerm)
+		scriptvar = wrap_uninstall(srcprerm)
+		spec_scriptlets_top.append(scriptvar)
 		spec_scriptlets_top.append('')
 	if srcpostrm:
 		spec_scriptlets_top.append('%postun')
-		spec_scriptlets_top.append(srcpostrm)
+		scriptvar = wrap_uninstall(srcpostrm)
+		spec_scriptlets_top.append(scriptvar)
 		spec_scriptlets_top.append('')
 
 	# Write the SPEC file
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 16/33] busybox: add grep to temporary links during uninstall
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (14 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 15/33] classes/package_rpm: disable uninstall scripts for upgrades Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 17/33] linux-yocto: config cleanups + romely rt support Saul Wold
                   ` (17 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Paul Eggleton <paul.eggleton@linux.intel.com>

In the busybox package prerm we set up some temporary links and modify
PATH so that certain utilities are provided for the purpose of running
update-alternatives; if grep is not among these then you get errors when
removing busybox, so add a temporary link for grep as well.

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>

Resorted the link list.

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-core/busybox/busybox.inc       |   11 ++++++-----
 meta/recipes-core/busybox/busybox_1.18.5.bb |    2 +-
 2 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-core/busybox/busybox.inc b/meta/recipes-core/busybox/busybox.inc
index acd635b..ff31bb7 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -259,17 +259,18 @@ pkg_prerm_${PN} () {
 	# for syslog, httpd and/or udhcpd will fail if there is no other package providing sh
 	tmpdir=`mktemp -d /tmp/busyboxrm-XXXXXX`
 	ln -s /bin/busybox $tmpdir/[
-	ln -s /bin/busybox $tmpdir/test
-	ln -s /bin/busybox $tmpdir/head
-	ln -s /bin/busybox $tmpdir/sh
 	ln -s /bin/busybox $tmpdir/basename
+	ln -s /bin/busybox $tmpdir/dirname
 	ln -s /bin/busybox $tmpdir/echo
-	ln -s /bin/busybox $tmpdir/mv
+	ln -s /bin/busybox $tmpdir/grep
+	ln -s /bin/busybox $tmpdir/head
 	ln -s /bin/busybox $tmpdir/ln
-	ln -s /bin/busybox $tmpdir/dirname
+	ln -s /bin/busybox $tmpdir/mv
 	ln -s /bin/busybox $tmpdir/rm
 	ln -s /bin/busybox $tmpdir/sed
+	ln -s /bin/busybox $tmpdir/sh
 	ln -s /bin/busybox $tmpdir/sort
+	ln -s /bin/busybox $tmpdir/test
 	export PATH=$PATH:$tmpdir
 
 	while read link
diff --git a/meta/recipes-core/busybox/busybox_1.18.5.bb b/meta/recipes-core/busybox/busybox_1.18.5.bb
index bdafb31..17d583e 100644
--- a/meta/recipes-core/busybox/busybox_1.18.5.bb
+++ b/meta/recipes-core/busybox/busybox_1.18.5.bb
@@ -1,5 +1,5 @@
 require busybox.inc
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "http://www.busybox.net/downloads/busybox-${PV}.tar.bz2;name=tarball \
            file://udhcpscript.patch \
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 17/33] linux-yocto: config cleanups + romely rt support
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (15 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 16/33] busybox: add grep to temporary links during uninstall Saul Wold
@ 2011-11-10  7:42 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 18/33] udev-extraconf: blacklist /dev/md Saul Wold
                   ` (16 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:42 UTC (permalink / raw)
  To: openembedded-core

From: Bruce Ashfield <bruce.ashfield@windriver.com>

Updating the meta branch SRCREV to pickup a series of BSP
cleanups and add -rt support to the romely.

  ae3e64c meta/romley: Add rt support Add rt support to the meta branch for romley.
  6c78969 meta/fishriver: enable hpet
  bc4452a meta/jasperforest: use power/intel feature
  6e9634e meta/fri2: use power/intel feature
  ec949f5 meta/fishriver: use power/intel feature

Signed-off-by: Tom Zanussi <tom.zanussi@intel.com>
Signed-off-by: Kishore Bodke <kishore.k.bodke@intel.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com>
---
 meta/recipes-kernel/linux/linux-yocto_3.0.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-kernel/linux/linux-yocto_3.0.bb b/meta/recipes-kernel/linux/linux-yocto_3.0.bb
index 688999f..ed93fbe 100644
--- a/meta/recipes-kernel/linux/linux-yocto_3.0.bb
+++ b/meta/recipes-kernel/linux/linux-yocto_3.0.bb
@@ -18,7 +18,7 @@ SRCREV_machine_qemuppc ?= "16eb6506148ff163cfc4f4516110275726831014"
 SRCREV_machine_qemux86 ?= "fea3842615c13a54180b6600783b222f499002ef"
 SRCREV_machine_qemux86-64 ?= "5f86f8f0a3102e1c7d0164abefcd50d825aa468f"
 SRCREV_machine ?= "a811486d28dd9b0e1af0672a65ad9fa97873b82a"
-SRCREV_meta ?= "4095bb597a7bcd647856aa35b5fb8637ed7ff975"
+SRCREV_meta ?= "ae3e64c077972fe87f09946bd215620df68ca327"
 
 PR = "r2"
 PV = "${LINUX_VERSION}+git${SRCPV}"
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 18/33] udev-extraconf: blacklist /dev/md
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (16 preceding siblings ...)
  2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 17/33] linux-yocto: config cleanups + romely rt support Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 19/33] shared-mime-info: package runtime data separately Saul Wold
                   ` (15 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

Do not mount /dev/md by default via udev, this resolved a problem
with the sanity test failing due to seeing the error while attempting
to mount /dev/md0

Signed-off-by: Saul Wold <sgw@linux.intel.com>
---
 meta/recipes-core/udev/files/mount.blacklist |    1 +
 meta/recipes-core/udev/udev-extraconf_0.0.bb |    2 +-
 2 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-core/udev/files/mount.blacklist b/meta/recipes-core/udev/files/mount.blacklist
index d3ebb17..7c7d938 100644
--- a/meta/recipes-core/udev/files/mount.blacklist
+++ b/meta/recipes-core/udev/files/mount.blacklist
@@ -1,3 +1,4 @@
 /dev/loop
 /dev/ram
 /dev/mtdblock
+/dev/md
diff --git a/meta/recipes-core/udev/udev-extraconf_0.0.bb b/meta/recipes-core/udev/udev-extraconf_0.0.bb
index e17d944..d0d0e84 100644
--- a/meta/recipes-core/udev/udev-extraconf_0.0.bb
+++ b/meta/recipes-core/udev/udev-extraconf_0.0.bb
@@ -3,7 +3,7 @@ DESCRIPTION = "Extra machine specific configuration files for udev, specifically
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://${WORKDIR}/COPYING.GPL;md5=751419260aa954499f7abaabaa882bbe"
 
-PR = "r1"
+PR = "r2"
 
 SRC_URI = "file://mount.blacklist \
            file://COPYING.GPL"
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 19/33] shared-mime-info: package runtime data separately
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (17 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 18/33] udev-extraconf: blacklist /dev/md Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 20/33] classes/[gnome|gnomebase|mime]: enhance gnome related classes Saul Wold
                   ` (14 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

The freedesktop.org.xml is required when updating the mime database but
otherwise not much use. Therefore package it separately, rather than
removing it completely, so that it can be used as required for on-device
updates without adding almost 2MB to every image which hase shared-mime-info.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 .../shared-mime-info/shared-mime-info.inc          |    9 ++++++---
 .../shared-mime-info/shared-mime-info_0.91.bb      |    2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info.inc b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
index c8cab29..57e829c 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info.inc
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info.inc
@@ -17,13 +17,16 @@ EXTRA_OECONF = "--disable-update-mimedb"
 FILES_${PN} += "${datadir}/mime"
 FILES_${PN}-dev += "${datadir}/pkgconfig/shared-mime-info.pc"
 
+# freedesktop.org.xml is only required when updating the mime database,
+# package it separately
+PACKAGES += "shared-mime-info-data"
+FILES_shared-mime-info-data = "${datadir}/mime/packages/freedesktop.org.xml"
+RDEPENDS_shared-mime-info-data = "shared-mime-info"
+
 do_install () {
 	autotools_do_install
 
 	update-mime-database ${D}${datadir}/mime
-
-	# we do not need it on device and it is huge
-	rm ${D}${datadir}/mime/packages/freedesktop.org.xml
 }
 
 do_install_virtclass-native () {
diff --git a/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb b/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
index 0c3b01c..bc4a8f7 100644
--- a/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
+++ b/meta/recipes-support/shared-mime-info/shared-mime-info_0.91.bb
@@ -1,5 +1,5 @@
 require shared-mime-info.inc
-PR = "r1"
+PR = "r2"
 
 SRC_URI[md5sum] = "982a211560ba4c47dc791ccff34e8fbc"
 SRC_URI[sha256sum] = "98cfebe1d809afb24934e634373821e2a1dfa86fc6462cab230589a1c80988bd"
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 20/33] classes/[gnome|gnomebase|mime]: enhance gnome related classes
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (18 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 19/33] shared-mime-info: package runtime data separately Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 21/33] gconf: add upstream GNOME gconf 3.2.3 and drop gconf-dbus Saul Wold
                   ` (13 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

This patch pulls in the gnome related classes from oe-core which
adds extra packaging rules and functionality whilst modularising things
so that one can get a subset of gnome functionality without adding a lot
of extra dependencies.

These aren't an exact copy of the classes from meta-openembedded, notable
differences are:
* gnome.bbclass - I dropped the BBCLASSEXTEND
* mime.bbclass:
  - updated coding style
  - use which to find update-mime-database program rather than hard coded
  - fix typo in populate_packges_append such that it's actually called

CC: Koen Kooi <koen@dominion.thruhere.net>
CC: Richard Purdie <richard.purdie@linuxfoundation.org>
Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/classes/gnome.bbclass     |   18 +-----------
 meta/classes/gnomebase.bbclass |   30 ++++++++++++++++++++
 meta/classes/mime.bbclass      |   58 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 90 insertions(+), 16 deletions(-)
 create mode 100644 meta/classes/gnomebase.bbclass
 create mode 100644 meta/classes/mime.bbclass

diff --git a/meta/classes/gnome.bbclass b/meta/classes/gnome.bbclass
index 3d68b12..a19dd17 100644
--- a/meta/classes/gnome.bbclass
+++ b/meta/classes/gnome.bbclass
@@ -1,17 +1,3 @@
-def gnome_verdir(v):
-	import re
-	m = re.match("^([0-9]+)\.([0-9]+)", v)
-	return "%s.%s" % (m.group(1), m.group(2))
+inherit gnomebase gtk-icon-cache gconf mime
 
-SECTION ?= "x11/gnome"
-SRC_URI = "${GNOME_MIRROR}/${BPN}/${@gnome_verdir("${PV}")}/${BPN}-${PV}.tar.bz2;name=archive"
-
-DEPENDS += "gnome-common"
-
-FILES_${PN} += "${datadir}/application-registry \
-    ${datadir}/mime-info \
-    ${datadir}/gnome-2.0"
-
-inherit autotools pkgconfig gconf
-
-EXTRA_OEMAKE += "GCONF_DISABLE_MAKEFILE_SCHEMA_INSTALL=1"
+EXTRA_OECONF += "--enable-introspection=no"
diff --git a/meta/classes/gnomebase.bbclass b/meta/classes/gnomebase.bbclass
new file mode 100644
index 0000000..a4209a0
--- /dev/null
+++ b/meta/classes/gnomebase.bbclass
@@ -0,0 +1,30 @@
+def gnome_verdir(v):
+	import re
+	m = re.match("^([0-9]+)\.([0-9]+)", v)
+	return "%s.%s" % (m.group(1), m.group(2))
+
+SECTION ?= "x11/gnome"
+SRC_URI = "${GNOME_MIRROR}/${BPN}/${@gnome_verdir("${PV}")}/${BPN}-${PV}.tar.bz2;name=archive"
+
+DEPENDS += "gnome-common"
+
+FILES_${PN} += "${datadir}/application-registry  \
+	${datadir}/mime-info \
+	${datadir}/mime/packages \	
+	${datadir}/mime/application \
+	${datadir}/gnome-2.0 \
+	${datadir}/polkit* \
+	${datadir}/GConf \
+	${datadir}/glib-2.0/schemas \
+"
+
+FILES_${PN}-doc += "${datadir}/devhelp"
+
+inherit autotools pkgconfig
+
+do_install_append() {
+	rm -rf ${D}${localstatedir}/lib/scrollkeeper/*
+	rm -rf ${D}${localstatedir}/scrollkeeper/*
+	rm -f ${D}${datadir}/applications/*.cache
+}
+
diff --git a/meta/classes/mime.bbclass b/meta/classes/mime.bbclass
new file mode 100644
index 0000000..4a2ce8b
--- /dev/null
+++ b/meta/classes/mime.bbclass
@@ -0,0 +1,58 @@
+DEPENDS += "shared-mime-info-native shared-mime-info"
+
+mime_postinst() {
+if [ "$1" = configure ]; then
+	UPDATEMIMEDB=`which update-mime-database`
+	if [ -x "$UPDATEMIMEDB" ] ; then
+		echo "Updating MIME database... this may take a while."
+		$UPDATEMIMEDB $D${datadir}/mime
+	else
+		echo "Missing update-mime-database, update of mime database failed!"
+		exit 1
+	fi
+fi
+}
+
+mime_postrm() {
+if [ "$1" = remove ] || [ "$1" = upgrade ]; then
+	UPDATEMIMEDB=`which update-mime-database`
+	if [ -x "$UPDATEMIMEDB" ] ; then
+		echo "Updating MIME database... this may take a while."
+		$UPDATEMIMEDB $D${datadir}/mime
+	else
+		echo "Missing update-mime-database, update of mime database failed!"
+		exit 1
+	fi
+fi
+}
+
+python populate_packages_append () {
+	import re
+	packages = d.getVar('PACKAGES', True).split()
+	pkgdest =  d.getVar('PKGDEST', True)
+
+	for pkg in packages:
+		mime_dir = '%s/%s/usr/share/mime/packages' % (pkgdest, pkg)
+		mimes = []
+		mime_re = re.compile(".*\.xml$")
+		if os.path.exists(mime_dir):
+			for f in os.listdir(mime_dir):
+				if mime_re.match(f):
+					mimes.append(f)
+		if mimes:
+			bb.note("adding mime postinst and postrm scripts to %s" % pkg)
+			postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
+			if not postinst:
+				postinst = '#!/bin/sh\n'
+			postinst += d.getVar('mime_postinst', True)
+			d.setVar('pkg_postinst_%s' % pkg, postinst)
+			postrm = d.getVar('pkg_postrm_%s' % pkg, True) or d.getVar('pkg_postrm', True)
+			if not postrm:
+				postrm = '#!/bin/sh\n'
+			postrm += d.getVar('mime_postrm', True)
+			d.setVar('pkg_postrm_%s' % pkg, postrm)
+			bb.note("adding shared-mime-info-data dependency to %s" % pkg)
+			rdepends = explode_deps(dgetVar('RDEPENDS_' + pkg, False) or d.getVar('RDEPENDS', False)) or ""
+			rdepends.append("shared-mime-info-data")
+			d.setVar('RDEPENDS_' + pkg, " " + " ".join(rdepends))
+}
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 21/33] gconf: add upstream GNOME gconf 3.2.3 and drop gconf-dbus
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (19 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 20/33] classes/[gnome|gnomebase|mime]: enhance gnome related classes Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 22/33] xinit: Fix `startx` looking for `mcookie` in sysroot Saul Wold
                   ` (12 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Joshua Lock <josh@linux.intel.com>

The D-Bus backend has been integrated into upstream GConf so we can
switch to upstream and drop gconf-dbus.

I've gone for a release in the 3.2 series as we disable Gtk+, and
therefore are not impacted by the gtk+3 changes, and the D-Bus backend
was unstable before this release.

Signed-off-by: Joshua Lock <josh@linux.intel.com>
---
 meta/conf/distro/include/default-providers.inc     |    2 -
 meta/conf/multilib.conf                            |    2 +-
 meta/recipes-gnome/gnome/gconf-3.2.3/nointro.patch |   59 ++++++++++++++++++++
 meta/recipes-gnome/gnome/gconf-dbus_705.bb         |   43 --------------
 meta/recipes-gnome/gnome/gconf_3.2.3.bb            |   43 ++++++++++++++
 5 files changed, 103 insertions(+), 46 deletions(-)
 create mode 100644 meta/recipes-gnome/gnome/gconf-3.2.3/nointro.patch
 delete mode 100644 meta/recipes-gnome/gnome/gconf-dbus_705.bb
 create mode 100644 meta/recipes-gnome/gnome/gconf_3.2.3.bb

diff --git a/meta/conf/distro/include/default-providers.inc b/meta/conf/distro/include/default-providers.inc
index be23d36..afea5e7 100644
--- a/meta/conf/distro/include/default-providers.inc
+++ b/meta/conf/distro/include/default-providers.inc
@@ -21,8 +21,6 @@ VIRTUAL-RUNTIME_update-alternatives ?= "update-alternatives-cworth"
 #
 PREFERRED_PROVIDER_dbus-glib ?= "dbus-glib"
 PREFERRED_PROVIDER_dbus-glib-native ?= "dbus-glib-native"
-PREFERRED_PROVIDER_gconf ?= "gconf-dbus"
-PREFERRED_PROVIDER_gconf-native ?= "gconf-dbus-native"
 PREFERRED_PROVIDER_gdk-pixbuf ?= "gdk-pixbuf"
 PREFERRED_PROVIDER_libgcc ?= "libgcc"
 PREFERRED_PROVIDER_libgcc-nativesdk ?= "libgcc-nativesdk"
diff --git a/meta/conf/multilib.conf b/meta/conf/multilib.conf
index 5e4b435..de53540 100644
--- a/meta/conf/multilib.conf
+++ b/meta/conf/multilib.conf
@@ -103,7 +103,7 @@ BBCLASSEXTEND_append_pn-gcc-cross-initial = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-gcc-cross-intermediate = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-gcc-cross = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-gcc-runtime = " ${MULTILIBS}"
-BBCLASSEXTEND_append_pn-gconf-dbus = " ${MULTILIBS}"
+BBCLASSEXTEND_append_pn-gconf = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-gdbm = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-gdb = " ${MULTILIBS}"
 BBCLASSEXTEND_append_pn-gdk-pixbuf = " ${MULTILIBS}"
diff --git a/meta/recipes-gnome/gnome/gconf-3.2.3/nointro.patch b/meta/recipes-gnome/gnome/gconf-3.2.3/nointro.patch
new file mode 100644
index 0000000..29181e3
--- /dev/null
+++ b/meta/recipes-gnome/gnome/gconf-3.2.3/nointro.patch
@@ -0,0 +1,59 @@
+This is a hacky way to prevent GConf from trying to build the introspection related pieces.
+Clearly not appropriate for upstream.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Joshua Lock <josh@linux.intel.com>
+
+Index: GConf-3.2.2/gconf/Makefile.am
+===================================================================
+--- GConf-3.2.2.orig/gconf/Makefile.am
++++ GConf-3.2.2/gconf/Makefile.am
+@@ -145,34 +145,6 @@ libgconf_2_la_LDFLAGS = -version-info $(
+ 
+ libgconf_2_la_LIBADD = $(INTLLIBS) $(DEPENDENT_LIBS) $(DEPENDENT_DBUS_LIBS) $(DEPENDENT_ORBIT_LIBS)
+ 
+--include $(INTROSPECTION_MAKEFILE)
+-INTROSPECTION_GIRS =
+-INTROSPECTION_SCANNER_ARGS = --warn-all --add-include-path=$(srcdir)
+-INTROSPECTION_COMPILER_ARGS= --includedir=$(srcdir)
+-
+-if HAVE_INTROSPECTION
+-introspection_files =				\
+-	$(gconfinclude_HEADERS)			\
+-	$(filter-out $(CORBA_SOURCECODE), $(filter %.c,$(libgconf_2_la_SOURCES)))
+-GConf-2.0.gir: libgconf-2.la Makefile
+-GConf_2_0_gir_INCLUDES = GObject-2.0
+-GConf_2_0_gir_CFLAGS = \
+-	$(INCLUDES)
+-GConf_2_0_gir_LIBS = libgconf-2.la
+-GConf_2_0_gir_FILES = $(addprefix $(srcdir)/, $(introspection_files))
+-GConf_2_0_gir_SCANNERFLAGS = --identifier-prefix=GConf --symbol-prefix=gconf --c-include "gconf/gconf.h"
+-GConf_2_0_gir_EXPORT_PACKAGES = gconf-2.0
+-INTROSPECTION_GIRS += GConf-2.0.gir
+-
+-girdir = $(datadir)/gir-1.0/
+-gir_DATA = $(INTROSPECTION_GIRS)
+-
+-typelibsdir = $(libdir)/girepository-1.0/
+-typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
+-
+-CLEANFILES += $(gir_DATA) $(typelibs_DATA)
+-endif
+-
+ EXTRA_DIST=GConfX.idl default.path.in org.gnome.GConf.service.in gconfmarshal.list regenerate-enum-header.sh regenerate-enum-footer.sh
+ 
+ default.path: $(srcdir)/default.path.in
+Index: GConf-3.2.2/configure.in
+===================================================================
+--- GConf-3.2.2.orig/configure.in
++++ GConf-3.2.2/configure.in
+@@ -354,8 +354,6 @@ AM_GLIB_GNU_GETTEXT
+ 
+ AC_CHECK_FUNCS(bind_textdomain_codeset)
+ 
+-GOBJECT_INTROSPECTION_CHECK([0.9.5])
+-
+ AC_SUBST(CFLAGS)
+ AC_SUBST(CPPFLAGS)
+ AC_SUBST(LDFLAGS)
diff --git a/meta/recipes-gnome/gnome/gconf-dbus_705.bb b/meta/recipes-gnome/gnome/gconf-dbus_705.bb
deleted file mode 100644
index 52e8a08..0000000
--- a/meta/recipes-gnome/gnome/gconf-dbus_705.bb
+++ /dev/null
@@ -1,43 +0,0 @@
-DESCRIPTION = "Settings daemon using DBUS for communication."
-SECTION = "x11/utils"
-LICENSE = "LGPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
-
-DEPENDS = "intltool-native virtual/libintl glib-2.0 dbus dbus-glib libxml2 popt gtk-doc-native"
-PROVIDES = "gconf"
-RPROVIDES_${PN} = "gconf"
-RPROVIDES_${PN}-dev = "gconf-dev"
-
-#SRCREV = "705"
-#PV = "2.16.0+svnr${SRCPV}"
-PR = "r2"
-
-# This SVN repo is no longer available use a tarball mirror site until
-# we move to proper gconf recipe.
-#SRC_URI = "svn://developer.imendio.com/svn/gconf-dbus;module=trunk;proto=http"
-SRC_URI = "http://autobuilder.pokylinux.org/sources/trunk_developer.imendio.com_.svn.gconf-dbus_705_.tar.gz"
-
-SRC_URI[md5sum] = "dba8d534b0c6262d24817c842b36369d"
-SRC_URI[sha256sum] = "5552b1884d42d4072a199c93e35a28dc1799f9166baefbf9243394966039e416"
-
-S = "${WORKDIR}/trunk"
-
-inherit pkgconfig autotools
-
-PARALLEL_MAKE = ""
-
-
-EXTRA_OECONF = "--disable-gtk-doc --disable-gtk --enable-shared --disable-static --enable-debug=yes"
-
-
-do_configure_prepend() {
-        touch gtk-doc.make
-}
-
-FILES_${PN} = "${libdir}/GConf-dbus/2/*.so ${libdir}/dbus-1.0 ${sysconfdir} ${datadir}/dbus* ${libdir}/*.so.* ${bindir}/* ${libexecdir}/*"
-FILES_${PN}-dbg += " ${libdir}/GConf-dbus/2/.debug"
-FILES_${PN}-dev += "${datadir}/sgml/gconf/gconf-1.0.dtd \
-		    ${libdir}/GConf-dbus/2/*.la"
-
-BBCLASSEXTEND = "native"
-
diff --git a/meta/recipes-gnome/gnome/gconf_3.2.3.bb b/meta/recipes-gnome/gnome/gconf_3.2.3.bb
new file mode 100644
index 0000000..3d3e65f
--- /dev/null
+++ b/meta/recipes-gnome/gnome/gconf_3.2.3.bb
@@ -0,0 +1,43 @@
+DESCRIPTION = "GNOME configuration system"
+SECTION = "x11/gnome"
+LICENSE = "LGPLv2+"
+LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
+
+DEPENDS = "glib-2.0 dbus dbus-glib libxml2 intltool-native"
+
+inherit gnomebase
+
+SRC_URI = "${GNOME_MIRROR}/GConf/${@gnome_verdir("${PV}")}/GConf-${PV}.tar.bz2;name=archive \
+	   file://nointro.patch"
+
+SRC_URI[archive.md5sum] = "f80329173cd9d134ad07e36002dd2a15"
+SRC_URI[archive.sha256sum] = "52008a82a847527877d9e1e549a351c86cc53cada4733b8a70a1123925d6aff4"
+
+S = "${WORKDIR}/GConf-${PV}"
+
+EXTRA_OECONF = "--disable-gtk-doc --disable-gtk --enable-shared --disable-static --enable-debug=yes --disable-introspection --disable-orbit --with-openldap=no"
+
+do_configure_prepend () {
+	touch gtk-doc.make
+}
+
+do_install_append() {
+	# this directory need to be created to avoid an Error 256 at gdm launch
+	install -d ${D}${sysconfdir}/gconf/gconf.xml.system
+
+	# this stuff is unusable
+	rm ${D}${libdir}/GConf/*/*.*a
+	rm ${D}${libdir}/gio/*/*.*a
+}
+
+RDEPENDS_${PN} += "dbus-x11"
+FILES_${PN} += "${libdir}/GConf/* \
+	        ${libdir}/gio/*/*.so \
+		${datadir}/polkit* \
+	       	${datadir}/dbus-1/services/*.service \
+	       	${datadir}/dbus-1/system-services/*.service \
+	        "
+FILES_${PN}-dbg += "${libdir}/*/*/.debug"
+FILES_${PN}-dev += "${datadir}/sgml/gconf/gconf-1.0.dtd"
+
+BBCLASSEXTEND = "native"
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 22/33] xinit: Fix `startx` looking for `mcookie` in sysroot
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (20 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 21/33] gconf: add upstream GNOME gconf 3.2.3 and drop gconf-dbus Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 23/33] useradd.bbclass: only modify packages in USERADD_PACKAGES Saul Wold
                   ` (11 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Paul Menzel <paulepanter@users.sourceforge.net>

`startx` run on a system based on the demo systemd image [1] and `opkg`-installed packages fails with the following error.

	/usr/bin/startx: line 139: /OE/tentacle/build/tmp-angstrom_2010_x/sysroots/x68_64-linux/usr/bin/mcookie: No such file or directory

Applying commit 443bcc07 [1] from OE-classic

        Author: Tom Rini <tom_rini@mentor.com>
        Date:   Thu Apr 7 10:36:43 2011 -0700

            xinit: Fix mcookie / util-linux-ng dependency

            xinit just needs to know the runtime path of mcookie so we need to
            RDEPEND on util-linux-ng and pass the runtime path in via EXTRA_OECONF

            Signed-off-by: Tom Rini <tom_rini@mentor.com>

fixes this issue. Commit 7f6cec6f [2]

        Author: Frans Meulenbroeks <fransmeulenbroeks@gmail.com>
        Date:   Sun Feb 21 18:11:30 2010 +0100

            xinit: add dependency on util-linux-ng

        […]

tried to address the same problem but apparently did not help, because Tom still had problems.

[1] http://www.angstrom-distribution.org/demo/beagleboard/Angstrom-systemd-image-eglibc-ipk-v2011.11-core-beagleboard.rootfs.tar.bz2
[2] http://git.openembedded.org/openembedded/commit/443bcc0785bc004e471b3750a34d12d2fd2e5dad
[3] http://git.openembedded.org/openembedded/commit/7f6cec6f0adb6203a6dbaf8a43c67c2c4f8bf84e

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
---
 meta/recipes-graphics/xorg-app/xinit_1.3.0.bb |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-graphics/xorg-app/xinit_1.3.0.bb b/meta/recipes-graphics/xorg-app/xinit_1.3.0.bb
index ee7c64d..6953ccc 100644
--- a/meta/recipes-graphics/xorg-app/xinit_1.3.0.bb
+++ b/meta/recipes-graphics/xorg-app/xinit_1.3.0.bb
@@ -9,9 +9,14 @@ systems. When this first client exits, xinit will kill the X server and \
 then terminate."
 
 LIC_FILES_CHKSUM = "file://COPYING;md5=0d4b5eef75f1584ccbdc5e4a34314407"
-PR = "r0"
+
+PR = "r1"
 PE = "1"
 
+EXTRA_OECONF = "ac_cv_path_MCOOKIE=${bindir}/mcookie"
+
+RDEPENDS_${PN} += "util-linux"
+
 FILES_${PN} += "${libdir}X11/xinit"
 
 SRC_URI[md5sum] = "bc4e8b7d1919597cc37a0d24aa149dda"
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 23/33] useradd.bbclass: only modify packages in USERADD_PACKAGES
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (21 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 22/33] xinit: Fix `startx` looking for `mcookie` in sysroot Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 24/33] useradd.bbclass: do not modify -nativesdk packages Saul Wold
                   ` (10 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Scott Garman <scott.a.garman@intel.com>

Previously we injected the user/group preinstall script into all
output packages. This fixes that so that only packages listed in
USERADD_PACKAGES get modified.

It also removes the USERADDPN variable, which is no longer needed.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 meta/classes/useradd.bbclass |   42 ++++++++++++++++--------------------------
 1 files changed, 16 insertions(+), 26 deletions(-)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index a8a1c14..3b2d1db 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -1,5 +1,3 @@
-USERADDPN ?= "${PN}"
-
 # base-passwd-cross provides the default passwd and group files in the
 # target sysroot, and shadow -native and -sysroot provide the utilities
 # and support files needed to add and modify user and group accounts
@@ -106,30 +104,29 @@ SYSROOTPOSTFUNC_virtclass-nativesdk = ""
 
 # Recipe parse-time sanity checks
 def update_useradd_after_parse(d):
-	if not d.getVar('USERADD_PACKAGES', False):
-		if not d.getVar('USERADD_PARAM', False) and not d.getVar('GROUPADD_PARAM', False):
-			raise bb.build.FuncFailed, "%s inherits useradd but doesn't set USERADD_PARAM or GROUPADD_PARAM" % bb.data.getVar('FILE', d)
+	useradd_packages = d.getVar('USERADD_PACKAGES', True)
+
+	if not useradd_packages:
+		raise bb.build.FuncFailed, "%s inherits useradd but doesn't set USERADD_PACKAGES" % bb.data.getVar('FILE', d)
+
+	for pkg in useradd_packages.split():
+		if not d.getVar('USERADD_PARAM_%s' % pkg, True) and not d.getVar('GROUPADD_PARAM_%s' % pkg, True):
+			raise bb.build.FuncFailed, "%s inherits useradd but doesn't set USERADD_PARAM or GROUPADD_PARAM for package %s" % (bb.data.getVar('FILE', d), pkg)
 
 python __anonymous() {
 	update_useradd_after_parse(d)
 }
 
 # Return a single [GROUP|USER]ADD_PARAM formatted string which includes the
-# [group|user]add parameters for all packages in this recipe
+# [group|user]add parameters for all USERADD_PACKAGES in this recipe
 def get_all_cmd_params(d, cmd_type):
 	import string
 	
 	param_type = cmd_type.upper() + "ADD_PARAM_%s"
 	params = []
 
-	pkgs = d.getVar('USERADD_PACKAGES', True)
-	if not pkgs:
-		pkgs = d.getVar('USERADDPN', True)
-		packages = (d.getVar('PACKAGES', True) or "").split()
-		if packages and pkgs not in packages:
-			pkgs = packages[0]
-
-	for pkg in pkgs.split():
+	useradd_packages = d.getVar('USERADD_PACKAGES', True) or ""
+	for pkg in useradd_packages.split():
 		param = d.getVar(param_type % pkg, True)
 		if param:
 			params.append(param)
@@ -156,17 +153,10 @@ fakeroot python populate_packages_prepend () {
 		rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
 		rdepends += " base-passwd shadow"
 		bb.data.setVar("RDEPENDS_%s" % pkg, rdepends, d)
-		
-	# We add the user/group calls to all packages to allow any package
-	# to contain files owned by the users/groups defined in the recipe.
-	# The user/group addition code is careful not to create duplicate
-	# entries, so this is safe.
-	pkgs = d.getVar('USERADD_PACKAGES', True)
-	if not pkgs:
-		pkgs = d.getVar('USERADDPN', True)
-		packages = (d.getVar('PACKAGES', True) or "").split()
-		if packages and pkgs not in packages:
-			pkgs = packages[0]
-	for pkg in pkgs.split():
+	
+	# Add the user/group preinstall scripts and RDEPENDS requirements
+	# to packages specified by USERADD_PACKAGES
+	useradd_packages = d.getVar('USERADD_PACKAGES', True) or ""
+	for pkg in useradd_packages.split():
 		update_useradd_package(pkg)
 }
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 24/33] useradd.bbclass: do not modify -nativesdk packages
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (22 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 23/33] useradd.bbclass: only modify packages in USERADD_PACKAGES Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 25/33] useradd-example.bb: update example documentation comments Saul Wold
                   ` (9 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Scott Garman <scott.a.garman@intel.com>

Exclude the addition of user/group code and RDEPENDS changes for
-nativesdk packages.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 meta/classes/useradd.bbclass |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 3b2d1db..64d6861 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -153,10 +153,11 @@ fakeroot python populate_packages_prepend () {
 		rdepends = d.getVar("RDEPENDS_%s" % pkg, True) or ""
 		rdepends += " base-passwd shadow"
 		bb.data.setVar("RDEPENDS_%s" % pkg, rdepends, d)
-	
+
 	# Add the user/group preinstall scripts and RDEPENDS requirements
 	# to packages specified by USERADD_PACKAGES
-	useradd_packages = d.getVar('USERADD_PACKAGES', True) or ""
-	for pkg in useradd_packages.split():
-		update_useradd_package(pkg)
+	if not bb.data.inherits_class('nativesdk', d):
+		useradd_packages = d.getVar('USERADD_PACKAGES', True) or ""
+		for pkg in useradd_packages.split():
+			update_useradd_package(pkg)
 }
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 25/33] useradd-example.bb: update example documentation comments
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (23 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 24/33] useradd.bbclass: do not modify -nativesdk packages Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 26/33] avahi: remove USERADDPN Saul Wold
                   ` (8 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Scott Garman <scott.a.garman@intel.com>

Clarify that only packages listed in USERADD_PACKAGES will
include the user/group creation code.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 .../recipes-skeleton/useradd/useradd-example.bb    |    9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
index 02d56f6..b10c1d0 100644
--- a/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
+++ b/meta-skeleton/recipes-skeleton/useradd/useradd-example.bb
@@ -17,13 +17,12 @@ PACKAGES =+ "${PN}-user3"
 
 inherit useradd
 
-# Specify which package(s) should include the user/group code.
-# Make sure that any packages which install files owned by custom
-# users/groups are included here. The code which adds users and
-# groups is idempotent.
+# You must set USERADD_PACKAGES when you inherit useradd. This
+# lists which output packages will include the user/group
+# creation code.
 USERADD_PACKAGES = "${PN} ${PN}-user3"
 
-# You *must* set USERADD_PARAM and/or GROUPADD_PARAM when
+# You must also set USERADD_PARAM and/or GROUPADD_PARAM when
 # you inherit useradd.
 
 # USERADD_PARAM specifies command line options to pass to the
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 26/33] avahi: remove USERADDPN
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (24 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 25/33] useradd-example.bb: update example documentation comments Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 27/33] hacktastic patch to fix adduser under rpm Saul Wold
                   ` (7 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Scott Garman <scott.a.garman@intel.com>

USERADDPN is no longer used; remove it.

Signed-off-by: Scott Garman <scott.a.garman@intel.com>
---
 meta/recipes-connectivity/avahi/avahi.inc |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-connectivity/avahi/avahi.inc b/meta/recipes-connectivity/avahi/avahi.inc
index 728c38f..deebbd6 100644
--- a/meta/recipes-connectivity/avahi/avahi.inc
+++ b/meta/recipes-connectivity/avahi/avahi.inc
@@ -23,7 +23,6 @@ SRC_URI = "http://avahi.org/download/avahi-${PV}.tar.gz \
           file://99avahi-autoipd \
           file://initscript.patch"
 
-USERADDPN = "avahi-daemon"
 USERADD_PACKAGES = "avahi-daemon"
 USERADD_PARAM_avahi-daemon = "--system --home /var/run/avahi-daemon \
                               --no-create-home --shell /bin/false \
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 27/33] hacktastic patch to fix adduser under rpm
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (25 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 26/33] avahi: remove USERADDPN Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 28/33] bitbake.conf: Unload pseudo when its not required for a given task Saul Wold
                   ` (6 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/package_rpm.bbclass                   |    3 +-
 meta/classes/useradd.bbclass                       |    2 +
 .../recipes-core/base-passwd/base-passwd_3.5.22.bb |    8 +-
 meta/recipes-devtools/rpm/psm.c                    | 3115 ++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm/hacktastic.patch     |   62 +
 meta/recipes-devtools/rpm/rpm_5.4.0.bb             |    3 +-
 6 files changed, 3187 insertions(+), 6 deletions(-)
 create mode 100644 meta/recipes-devtools/rpm/psm.c
 create mode 100644 meta/recipes-devtools/rpm/rpm/hacktastic.patch

diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 2679e9f..c01863e 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -389,7 +389,8 @@ package_install_internal_rpm () {
 		-D "_dbpath ${rpmlibdir}" \
 		--noscripts --notriggers --noparentdirs --nolinktos --replacepkgs \
 		-D "__dbi_txn create nofsync private" \
-		-Uhv ${target_rootfs}/install/total_solution.manifest
+		-Uhv ${target_rootfs}/install/total_solution.manifest \
+		--pre
 }
 
 python write_specfile () {
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index 64d6861..ae7349b 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -17,6 +17,8 @@ if test "x$D" != "x"; then
 	SYSROOT="$D"
 	OPT="--root $D"
 
+	PATH=${STAGING_BINDIR_NATIVE}/../sbin:$PATH
+
 	# Add groups and users defined for all recipe packages
 	GROUPADD_PARAM="${@get_all_cmd_params(d, 'group')}"
 	USERADD_PARAM="${@get_all_cmd_params(d, 'user')}"
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
index aa90a6d..aa9f221 100644
--- a/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
+++ b/meta/recipes-core/base-passwd/base-passwd_3.5.22.bb
@@ -43,12 +43,12 @@ pkg_preinst_${PN} () {
 	# Used for rootfs generation. On in-target install this will be run
         # before the unpack so the files won't be available
 
-	if [ ! -e $D${sysconfdir}/passwd ] && [ -e $D${datadir}/base-passwd/passwd.master ]; then
-		cp $D${datadir}/base-passwd/passwd.master $D${sysconfdir}/passwd
+	if [ ! -e $D${sysconfdir}/passwd ] && [ -e ${STAGING_DIR_TARGET}${datadir}/base-passwd/passwd.master ]; then
+		cp ${STAGING_DIR_TARGET}${datadir}/base-passwd/passwd.master $D${sysconfdir}/passwd
 	fi
 
-	if [ ! -e $D${sysconfdir}/group ] && [ -e $D${datadir}/base-passwd/group.master ]; then
-		cp $D${datadir}/base-passwd/group.master $D${sysconfdir}/group
+	if [ ! -e $D${sysconfdir}/group ] && [ -e ${STAGING_DIR_TARGET}${datadir}/base-passwd/group.master ]; then
+		cp ${STAGING_DIR_TARGET}${datadir}/base-passwd/group.master $D${sysconfdir}/group
 	fi
 
 	exit 0
diff --git a/meta/recipes-devtools/rpm/psm.c b/meta/recipes-devtools/rpm/psm.c
new file mode 100644
index 0000000..3e6ebe0
--- /dev/null
+++ b/meta/recipes-devtools/rpm/psm.c
@@ -0,0 +1,3115 @@
+/** \ingroup rpmts payload
+ * \file lib/psm.c
+ * Package state machine to handle a package from a transaction set.
+ */
+
+#include "system.h"
+
+#define	_MIRE_INTERNAL	/* XXX mireApply doesn't tell which pattern matched. */
+
+#include <rpmio_internal.h>	/* XXX FDSTAT_READ */
+#include <rpmcb.h>		/* XXX fnpyKey */
+#include <rpmsx.h>
+#include <rpmmacro.h>
+#include <rpmurl.h>
+
+#include <rpmaug.h>
+#include <rpmficl.h>
+#include <rpmjs.h>
+#include <rpmlua.h>
+#include <rpmperl.h>
+#include <rpmpython.h>
+#include <rpmruby.h>
+#include <rpmsm.h>
+#include <rpmsql.h>
+#include <rpmsquirrel.h>
+#include <rpmtcl.h>
+
+#if defined(WITH_LUA) || defined(WITH_AUGEAS) || defined(WITH_FICL) || defined(WITH_GPSEE) || defined(WITH_PERLEMBED) || defined(WITH_PYTHONEMBED) || defined(WITH_RUBYEMBED) || defined(WITH_SEMANAGE) || defined(WITH_SQLITE) || defined(WITH_SQUIRREL) || defined(WITH_TCL)
+#define	_WITH_EMBEDDED
+#else
+#undef _WITH_ENBEDDED
+#endif
+
+#include <rpmtag.h>
+#include <rpmtypes.h>
+#include <pkgio.h>
+#define	_RPMDB_INTERNAL
+#include <rpmdb.h>		/* XXX for db_chrootDone */
+#include <rpmtxn.h>
+#include "signature.h"		/* signature constants */
+#include <rpmlib.h>
+
+#define	_RPMFI_INTERNAL
+#include "rpmfi.h"
+#include "fsm.h"		/* XXX CPIO_FOO/IOSM_FOO constants */
+#define	_RPMSQ_INTERNAL
+#define	_RPMPSM_INTERNAL
+#include "psm.h"
+#define F_ISSET(_psm, _FLAG)	((_psm)->flags & (RPMPSM_FLAGS_##_FLAG))
+#define F_SET(_psm, _FLAG)	((_psm)->flags |=  (RPMPSM_FLAGS_##_FLAG))
+#define F_CLR(_psm, _FLAG)	((_psm)->flags &= ~(RPMPSM_FLAGS_##_FLAG))
+
+#define	_RPMEVR_INTERNAL
+#include "rpmds.h"
+
+#define	_RPMTE_INTERNAL
+#include "rpmte.h"
+
+#define	_RPMTS_INTERNAL		/* XXX ts->notify */
+#include "rpmts.h"
+
+#include "misc.h"		/* XXX rpmMkdirPath, makeTempFile, doputenv */
+
+#include <rpmcli.h>
+
+#include "debug.h"
+
+#define	_PSM_DEBUG	0
+/*@unchecked@*/
+int _psm_debug = _PSM_DEBUG;
+/*@unchecked@*/
+int _psm_threads = 0;
+
+/*@access FD_t @*/		/* XXX void * arg */
+/*@access Header @*/		/* XXX void * arg */
+/*@access miRE @*/
+
+/*@access rpmpsm @*/
+
+/*@access rpmfi @*/
+/*@access rpmte @*/	/* XXX rpmInstallSourcePackage */
+/*@access rpmts @*/	/* XXX ts->notify */
+
+/*@access rpmluav @*/
+
+#ifdef	DYING
+/**
+ * Mark files in database shared with this package as "replaced".
+ * @param psm		package state machine data
+ * @return		0 always
+ */
+static rpmRC markReplacedFiles(const rpmpsm psm)
+	/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
+	/*@modifies psm, rpmGlobalMacroContext, fileSystem, internalState @*/
+{
+    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+    const rpmts ts = psm->ts;
+    rpmte te = psm->te;
+    rpmfi fi = psm->fi;
+    sharedFileInfo replaced = (te ? te->replaced : NULL);
+    sharedFileInfo sfi;
+    rpmmi mi;
+    Header h;
+    uint32_t * offsets;
+    rpmuint32_t prev;
+    int num;
+    int xx;
+
+    if (!(rpmfiFC(fi) > 0 && replaced != NULL))
+	return RPMRC_OK;
+
+    num = prev = 0;
+    for (sfi = replaced; sfi->otherPkg; sfi++) {
+	if (prev && prev == sfi->otherPkg)
+	    continue;
+	prev = sfi->otherPkg;
+	num++;
+    }
+    if (num == 0)
+	return RPMRC_OK;
+
+    offsets = alloca(num * sizeof(*offsets));
+    offsets[0] = 0;
+    num = prev = 0;
+    for (sfi = replaced; sfi->otherPkg; sfi++) {
+	if (prev && prev == sfi->otherPkg)
+	    continue;
+	prev = sfi->otherPkg;
+	offsets[num++] = sfi->otherPkg;
+    }
+
+    mi = rpmtsInitIterator(ts, RPMDBI_PACKAGES, NULL, 0);
+    xx = rpmmiGrow(mi, offsets, num);
+    xx = rpmmiSetRewrite(mi, 1);
+
+    sfi = replaced;
+    while ((h = rpmmiNext(mi)) != NULL) {
+	int modified;
+
+	modified = 0;
+
+	/* XXX FIXME: not correct yet, but headerGetEntry needs to die now! */
+	he->tag = RPMTAG_FILESTATES;
+	xx = headerGet(h, he, 0);
+	if (!xx)
+	    continue;
+	
+	prev = rpmmiInstance(mi);
+	num = 0;
+	while (sfi->otherPkg && sfi->otherPkg == prev) {
+assert(sfi->otherFileNum < he->c);
+	    if (he->p.ui8p[sfi->otherFileNum] != RPMFILE_STATE_REPLACED) {
+		he->p.ui8p[sfi->otherFileNum] = RPMFILE_STATE_REPLACED;
+		if (modified == 0) {
+		    /* Modified header will be rewritten. */
+		    modified = 1;
+		    xx = rpmmiSetModified(mi, modified);
+		}
+		num++;
+	    }
+	    sfi++;
+	}
+	he->p.ptr = _free(he->p.ptr);
+    }
+    mi = rpmmiFree(mi);
+
+    return RPMRC_OK;
+}
+#endif
+
+static rpmRC createDir(rpmts ts, rpmfi fi, const char ** fn, const char * name)
+	/*@globals rpmGlobalMacroContext @*/
+	/*@modifies *fn, rpmGlobalMacroContext @*/
+{
+    const char * N = rpmGenPath(rpmtsRootDir(ts), name, "");
+    char * t = xstrdup(name+2);
+    rpmRC rc;
+
+    t[strlen(t)-1] = '\0';
+
+    rc = rpmMkdirPath(N, t+1);
+    if (rc != RPMRC_OK) {
+    	if (Access(N, W_OK))
+    	    rpmlog(RPMLOG_ERR, _("cannot write to %%%s %s\n"), t, N);
+	else if (fi)
+	    Chown(N, fi->uid, fi->gid);
+    }
+
+    if (fn)
+	*fn = N;
+    else
+	N = _free(N);
+    t = _free(t);
+
+    return rc;
+}
+
+rpmRC rpmInstallSourcePackage(rpmts ts, void * _fd,
+		const char ** specFilePtr, const char ** cookie)
+{
+    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+    FD_t fd = _fd;
+    rpmfi fi = NULL;
+    rpmte p = NULL;
+    rpmpsm psm = NULL;
+    Header h = NULL;
+    int isSource;
+    rpmRC rc;
+    int i;
+
+/*@-mods@*/	/* Avoid void * _fd annotations for now. */
+    rc = rpmReadPackageFile(ts, fd, __FUNCTION__, &h);
+/*@=mods@*/
+    switch (rc) {
+    case RPMRC_NOTTRUSTED:
+    case RPMRC_NOKEY:
+    case RPMRC_OK:
+	break;
+    default:
+	goto exit;
+	/*@notreached@*/ break;
+    }
+    if (h == NULL)
+	goto exit;
+
+    rc = RPMRC_FAIL;		/* assume failure */
+
+    isSource =
+	(headerIsEntry(h, RPMTAG_SOURCERPM) == 0 &&
+	 headerIsEntry(h, RPMTAG_ARCH) != 0);
+
+    if (!isSource) {
+	rpmlog(RPMLOG_ERR, _("source package expected, binary found\n"));
+	goto exit;
+    }
+
+    (void) rpmtsAddInstallElement(ts, h, NULL, 0, NULL);
+
+    p = rpmtsElement(ts, 0);
+assert(p->h == NULL);
+    (void) rpmteSetHeader(p, h);
+/*@-mods@*/	/* LCL: avoid void * _fd annotation for now. */
+/*@-assignexpose -castexpose -temptrans @*/
+    p->fd = fdLink(fd, __FUNCTION__);
+/*@=assignexpose =castexpose =temptrans @*/
+/*@=mods@*/
+
+    fi = rpmteFI(p, RPMTAG_BASENAMES);
+    fi->h = headerLink(h);
+/*@-onlytrans@*/	/* FIX: te reference */
+    fi->te = p;
+/*@=onlytrans@*/
+
+    /* XXX FIXME: don't do per-file mapping, force global flags. */
+    fi->fmapflags = _free(fi->fmapflags);
+    fi->mapflags = IOSM_MAP_PATH | IOSM_MAP_MODE | IOSM_MAP_UID | IOSM_MAP_GID;
+
+    fi->uid = getuid();
+    fi->gid = getgid();
+#if defined(RPM_VENDOR_OPENPKG) /* switch-from-susr-to-musr-on-srpm-install */
+    /* If running as the OpenPKG "susr", do not unpack source RPM
+       packages with "susr" file ownerships as the OpenPKG Set-UID
+       wrapper switches from "musr" to "susr" on "openpkg rpm -Uvh
+       *.src.rpm". As a result the installed files could be never
+       removed again by "musr". It is more consistent to always unpack
+       as "musr" if possible. */
+    if (fi->uid == 0) {
+        char *muid_str;
+        char *mgid_str;
+        uid_t muid;
+        gid_t mgid;
+        if ((muid_str = rpmExpand("%{l_muid}", NULL)) != NULL)
+            if ((muid = (uid_t)strtol(muid_str, (char **)NULL, 10)) > 0)
+                fi->uid = muid;
+        if ((mgid_str = rpmExpand("%{l_mgid}", NULL)) != NULL)
+            if ((mgid = (gid_t)strtol(mgid_str, (char **)NULL, 10)) > 0)
+                fi->gid = mgid;
+    }
+#endif
+    for (i = 0; i < (int)fi->fc; i++)
+	fi->actions[i] = FA_CREATE;
+
+    /* Load relative (in a *.src.rpm) file paths as an argv array. */
+    fi->astriplen = 0;
+    fi->striplen = 0;
+    he->tag = RPMTAG_FILEPATHS;
+    if (!headerGet(h, he, 0) || he->p.argv == NULL || he->p.argv[0] == NULL)
+	goto exit;
+    fi->apath = he->p.argv;
+
+    (void) headerMacrosLoad(h);
+
+#if defined(RPM_VENDOR_OPENPKG) /* switch-from-susr-to-musr-on-srpm-install */
+    if (createDir(ts, fi, NULL, "%{_topdir}")
+     || createDir(ts, fi, NULL, "%{_builddir}")
+     || createDir(ts, fi, NULL, "%{_rpmdir}")
+     || createDir(ts, fi, NULL, "%{_srcrpmdir}")
+     || createDir(ts, fi, NULL, "%{_sourcedir}")
+     || createDir(ts, fi, NULL, "%{_specdir}"))
+#else
+    if (createDir(ts, NULL, NULL, "%{_topdir}")
+     || createDir(ts, NULL, NULL, "%{_builddir}")
+     || createDir(ts, NULL, NULL, "%{_rpmdir}")
+     || createDir(ts, NULL, NULL, "%{_srcrpmdir}")
+     || createDir(ts, NULL, NULL, "%{_sourcedir}")
+     || createDir(ts, NULL, NULL, "%{_specdir}"))
+#endif
+	goto exit;
+
+    /* Retrieve build cookie. */
+    if (cookie) {
+	*cookie = NULL;
+	he->tag = RPMTAG_COOKIE;
+	if (headerGet(h, he, 0)) *cookie = he->p.str;
+    }
+
+    /* Find spec file path. */
+    if (specFilePtr) {
+	*specFilePtr = NULL;
+	fi = rpmfiInit(fi, 0);
+	while ((i = rpmfiNext(fi)) >= 0) {
+	    if (!(rpmfiFFlags(fi) & RPMFILE_SPECFILE))
+		continue;
+	    *specFilePtr = xstrdup(rpmfiFN(fi));
+	    break;
+	}
+	if (*specFilePtr == NULL) {
+	    rpmlog(RPMLOG_ERR, _("source package contains no .spec file\n"));
+	    goto exit;
+	}
+    }
+
+    /* Unpack the SRPM contents. */
+    psm = rpmpsmNew(ts, p, fi);
+    psm->goal = PSM_PKGINSTALL;
+    rc = rpmpsmStage(psm, PSM_PROCESS);
+    (void) rpmpsmStage(psm, PSM_FINI);
+    psm = rpmpsmFree(psm, __FUNCTION__);
+
+exit:
+    if (rc != RPMRC_OK) {
+	if (specFilePtr) *specFilePtr = _free(*specFilePtr);
+	if (cookie) *cookie = _free(*cookie);
+    }
+
+    if (fi)
+	fi->te = NULL;
+
+    if (p) {
+	(void) rpmteSetHeader(p, NULL);
+/*@-mods@*/	/* Avoid void * _fd annotations for now. */
+	if (p->fd != NULL)
+	    (void) Fclose(p->fd);
+/*@=mods@*/
+	p->fd = NULL;
+    }
+
+    /* XXX nuke the added package(s). */
+    rpmtsClean(ts);
+
+    (void) headerFree(h);
+    h = NULL;
+
+    return rc;
+}
+
+/*@observer@*/ /*@unchecked@*/
+static char * SCRIPT_PATH = "PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin";
+
+/**
+ * Return scriptlet name from tag.
+ * @param tag		scriptlet tag
+ * @return		name of scriptlet
+ */
+static /*@observer@*/ const char * tag2sln(rpmTag tag)
+	/*@*/
+{
+    switch (tag) {
+    case RPMTAG_PRETRANS:	return "%pretrans";
+    case RPMTAG_TRIGGERPREIN:	return "%triggerprein";
+    case RPMTAG_PREIN:		return "%pre";
+    case RPMTAG_POSTIN:		return "%post";
+    case RPMTAG_TRIGGERIN:	return "%triggerin";
+    case RPMTAG_TRIGGERUN:	return "%triggerun";
+    case RPMTAG_PREUN:		return "%preun";
+    case RPMTAG_POSTUN:		return "%postun";
+    case RPMTAG_POSTTRANS:	return "%posttrans";
+    case RPMTAG_TRIGGERPOSTUN:	return "%triggerpostun";
+    case RPMTAG_VERIFYSCRIPT:	return "%verify";
+    case RPMTAG_SANITYCHECK:	return "%sanitycheck";
+    case RPMTAG_BUILDPREP:	return "%prep";
+    case RPMTAG_BUILDBUILD:	return "%build";
+    case RPMTAG_BUILDINSTALL:	return "%install";
+    case RPMTAG_BUILDCHECK:	return "%check";
+    default:	break;
+    }
+    return "%unknownscript";
+}
+
+/**
+ * Return scriptlet id from tag.
+ * @param tag		scriptlet tag
+ * @return		id of scriptlet
+ */
+static rpmScriptID tag2slx(rpmTag tag)
+	/*@*/
+{
+    switch (tag) {
+    case RPMTAG_PRETRANS:	return RPMSCRIPT_PRETRANS;
+    case RPMTAG_TRIGGERPREIN:	return RPMSCRIPT_TRIGGERPREIN;
+    case RPMTAG_PREIN:		return RPMSCRIPT_PREIN;
+    case RPMTAG_POSTIN:		return RPMSCRIPT_POSTIN;
+    case RPMTAG_TRIGGERIN:	return RPMSCRIPT_TRIGGERIN;
+    case RPMTAG_TRIGGERUN:	return RPMSCRIPT_TRIGGERUN;
+    case RPMTAG_PREUN:		return RPMSCRIPT_PREUN;
+    case RPMTAG_POSTUN:		return RPMSCRIPT_POSTUN;
+    case RPMTAG_POSTTRANS:	return RPMSCRIPT_POSTTRANS;
+    case RPMTAG_TRIGGERPOSTUN:	return RPMSCRIPT_TRIGGERPOSTUN;
+    case RPMTAG_VERIFYSCRIPT:	return RPMSCRIPT_VERIFY;
+    case RPMTAG_SANITYCHECK:	return RPMSCRIPT_SANITYCHECK;
+    case RPMTAG_BUILDPREP:	return RPMSCRIPT_PREP;
+    case RPMTAG_BUILDBUILD:	return RPMSCRIPT_BUILD;
+    case RPMTAG_BUILDINSTALL:	return RPMSCRIPT_INSTALL;
+    case RPMTAG_BUILDCHECK:	return RPMSCRIPT_CHECK;
+    default:	break;
+    }
+    return RPMSCRIPT_MAX;
+}
+
+/**
+ * Wait for child process to be reaped.
+ * @param psm		package state machine data
+ * @return		
+ */
+static pid_t psmWait(rpmpsm psm)
+	/*@globals fileSystem, internalState @*/
+	/*@modifies psm, fileSystem, internalState @*/
+{
+    const rpmts ts = psm->ts;
+    rpmtime_t msecs;
+
+    (void) rpmsqWait(&psm->sq);
+    msecs = psm->sq.op.usecs/1000;
+    (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_SCRIPTLETS), &psm->sq.op);
+
+    rpmlog(RPMLOG_DEBUG,
+	D_("%s: waitpid(%d) rc %d status %x secs %u.%03u\n"),
+	psm->stepName, (unsigned)psm->sq.child,
+	(unsigned)psm->sq.reaped, psm->sq.status,
+	(unsigned)msecs/1000, (unsigned)msecs%1000);
+
+    if (psm->sstates != NULL)
+    {	rpmuint32_t * ssp = psm->sstates + tag2slx(psm->scriptTag);
+	*ssp &= ~0xffff;
+	*ssp |= (psm->sq.status & 0xffff);
+	*ssp |= RPMSCRIPT_STATE_REAPED;
+    }
+
+    return psm->sq.reaped;
+}
+
+#ifdef WITH_LUA
+/**
+ * Run internal Lua script.
+ * @param psm		package state machine data
+ * @param sln		name of scriptlet section
+ * @param Phe		scriptlet args, Phe->p.argv[0] is interpreter to use
+ * @param script	scriptlet body
+ * @param arg1		no. instances of package installed after scriptlet exec
+ *			(-1 is no arg)
+ * @param arg2		ditto, but for the target package
+ * @return		RPMRC_OK on success
+ */
+static rpmRC runLuaScript(rpmpsm psm, const char * sln, HE_t Phe,
+		   const char *script, int arg1, int arg2)
+	/*@globals fileSystem, internalState @*/
+	/*@modifies psm, fileSystem, internalState @*/
+{
+    rpmRC rc = RPMRC_OK;
+    int xx;
+    rpmlua lua = NULL;	/* Global state. */
+    rpmluav var;
+
+    /* Create arg variable */
+    rpmluaPushTable(lua, "arg");
+    var = rpmluavNew();
+    rpmluavSetListMode(var, 1);
+/*@+relaxtypes@*/
+    if (Phe->p.argv) {
+	int i;
+	for (i = 0; i < (int)Phe->c && Phe->p.argv[i]; i++) {
+	    rpmluavSetValue(var, RPMLUAV_STRING, Phe->p.argv[i]);
+	    rpmluaSetVar(lua, var);
+	}
+    }
+    if (arg1 >= 0) {
+	rpmluavSetValueNum(var, arg1);
+	rpmluaSetVar(lua, var);
+    }
+    if (arg2 >= 0) {
+	rpmluavSetValueNum(var, arg2);
+	rpmluaSetVar(lua, var);
+    }
+/*@=relaxtypes@*/
+/*@-moduncon@*/
+    var = rpmluavFree(var);
+/*@=moduncon@*/
+    rpmluaPop(lua);
+
+    {	char buf[BUFSIZ];
+	xx = snprintf(buf, BUFSIZ, "%s(%s)", sln, psm->NVRA);
+	xx = rpmluaRunScript(lua, script, buf);
+	if (xx == -1) {
+	    void * ptr = rpmtsNotify(psm->ts, psm->te, RPMCALLBACK_SCRIPT_ERROR,
+				 psm->scriptTag, 1);
+	    ptr = ptr;	/* XXX keep gcc happy. */
+	    rc = RPMRC_FAIL;
+	} else
+	    rc = RPMRC_OK;
+    }
+    rpmluaDelVar(lua, "arg");
+
+    return rc;
+}
+#endif	/* WITH_LUA */
+
+#if defined(_WITH_EMBEDDED)
+static int enterChroot(rpmpsm psm, int * pwdFdnop, int * rootFdnop)
+	/*@globals fileSystem, internalState @*/
+	/*@modifies *pwdFdnop, *rootFdnop, fileSystem, internalState @*/
+{
+    const rpmts ts = psm->ts;
+    int inChroot;
+    int xx;
+
+    /* Save the current working directory. */
+    if (pwdFdnop)
+	(*pwdFdnop) = open(".", O_RDONLY, 0);
+
+    /* Save the current root directory. */
+    if (rootFdnop)
+	(*rootFdnop) = open("/", O_RDONLY, 0);
+
+    /* Get into the chroot. */
+    if (!rpmtsChrootDone(ts)) {
+	const char *rootDir = rpmtsRootDir(ts);
+	inChroot = 0;
+	/*@-modobserver @*/
+	if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') {
+	    xx = Chroot(rootDir);
+	/*@=modobserver @*/
+	    xx = rpmtsSetChrootDone(ts, 1);
+	}
+    } else
+       inChroot = 1;
+
+    /* All embedded scriptlets run with CWD == "/". */
+    xx = Chdir("/");
+
+    return inChroot;
+}
+
+static int exitChroot(rpmpsm psm, int inChroot, int pwdFdno, int rootFdno)
+	/*@globals fileSystem, internalState @*/
+	/*@modifies psm, fileSystem, internalState @*/
+{
+    const rpmts ts = psm->ts;
+    const char *rootDir = rpmtsRootDir(ts);
+    int xx;
+
+    if (rpmtsChrootDone(ts) && !inChroot) {
+	xx = fchdir(rootFdno);
+/*@-modobserver@*/
+	if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/') {
+	    xx = Chroot(".");
+/*@=modobserver@*/
+	    xx = rpmtsSetChrootDone(ts, 0);
+	}
+	xx = fchdir(pwdFdno);
+    } else
+	xx = fchdir(pwdFdno);
+
+    xx = close(rootFdno);
+    xx = close(pwdFdno);
+
+    return 0;
+}
+
+/**
+ * Run embedded interpreter script.
+ * @param psm		package state machine data
+ * @param sln		name of scriptlet section
+ * @param Phe		scriptlet args, Phe->p.argv[0] is interpreter to use
+ * @param script	scriptlet body
+ * @param arg1		no. instances of package installed after scriptlet exec
+ *			(-1 is no arg)
+ * @param arg2		ditto, but for the target package
+ * @return		RPMRC_OK on success
+ */
+static rpmRC runEmbeddedScript(rpmpsm psm, const char * sln, HE_t Phe,
+		   const char *script, int arg1, int arg2)
+	/*@globals fileSystem, internalState @*/
+	/*@modifies psm, fileSystem, internalState @*/
+{
+    char * av[] = { NULL, NULL, NULL, NULL };
+    int pwdFdno = -1;
+    int rootFdno = -1;
+    rpmRC rc = RPMRC_OK;
+    int xx = 0;
+    rpmuint32_t * ssp = NULL;
+    int inChroot = enterChroot(psm, &pwdFdno, &rootFdno);
+
+    if (psm->sstates != NULL)
+	ssp = psm->sstates + tag2slx(psm->scriptTag);
+    if (ssp != NULL)
+	*ssp |= (RPMSCRIPT_STATE_EMBEDDED|RPMSCRIPT_STATE_EXEC);
+
+    av[0] = (char *) Phe->p.argv[0];
+    if (arg1 >= 0)
+	(void) sprintf((av[1] = alloca(32)), "%d", arg1);
+    if (arg2 >= 0)
+	(void) sprintf((av[2] = alloca(32)), "%d", arg2);
+
+#if defined(WITH_LUA)
+    if (!strcmp(Phe->p.argv[0], "<lua>")) {
+	rc = runLuaScript(psm, sln, Phe, script, arg1, arg2);
+    } else
+#endif
+#if defined(WITH_AUGEAS)
+    if (!strcmp(Phe->p.argv[0], "<augeas>")) {
+	/* XXX change rpmaugNew() to common embedded interpreter API */
+	rpmaug aug = NULL;
+	rc = rpmaugRun(aug, script, NULL) == RPMRC_OK
+	    ? RPMRC_OK : RPMRC_FAIL;
+	aug = rpmaugFree(aug);
+    } else
+#endif
+#if defined(WITH_FICL)
+    if (!strcmp(Phe->p.argv[0], "<ficl>")) {
+	rpmficl ficl = rpmficlNew((char **)av, 0);
+	rc = rpmficlRun(ficl, script, NULL) == RPMRC_OK
+	    ? RPMRC_OK : RPMRC_FAIL;
+	ficl = rpmficlFree(ficl);
+    } else
+#endif
+#if defined(WITH_GPSEE)
+    if (!strcmp(Phe->p.argv[0], "<js>")) {
+	rpmjs js = rpmjsNew((char **)av, 0);
+	rc = rpmjsRun(js, script, NULL) == RPMRC_OK
+	    ? RPMRC_OK : RPMRC_FAIL;
+	js = rpmjsFree(js);
+    } else
+#endif
+#if defined(WITH_PERLEMBED)
+    if (!strcmp(Phe->p.argv[0], "<perl>")) {
+	rpmperl perl = rpmperlNew((char **)av, 0);
+	rc = rpmperlRun(perl, script, NULL) == RPMRC_OK
+	    ? RPMRC_OK : RPMRC_FAIL;
+	perl = rpmperlFree(perl);
+    } else
+#endif
+#if defined(WITH_PYTHONEMBED)
+    if (!strcmp(Phe->p.argv[0], "<python>")) {
+	rpmpython python = rpmpythonNew((char **)av, 0);
+	rc = rpmpythonRun(python, script, NULL) == RPMRC_OK
+	    ? RPMRC_OK : RPMRC_FAIL;
+	python = rpmpythonFree(python);
+    } else
+#endif
+#if defined(WITH_RUBY)
+    if (!strcmp(Phe->p.argv[0], "<ruby>")) {
+	rpmruby ruby = rpmrubyNew((char **)av, 0);
+	rc = rpmrubyRun(ruby, script, NULL) == RPMRC_OK
+	    ? RPMRC_OK : RPMRC_FAIL;
+	ruby = rpmrubyFree(ruby);
+    } else
+#endif
+#if defined(WITH_SEMANAGE)
+    if (!strcmp(Phe->p.argv[0], "<spook>")) {
+	/* XXX change rpmsmNew() to common embedded interpreter API */
+	rpmsm sm = NULL;
+	/* XXX HACK: use an argv for now. */
+	const char * av[2];
+	av[0] = script;
+	av[1] = NULL;
+	rc = rpmsmRun(sm, (char **)av, NULL) == RPMRC_OK
+	    ? RPMRC_OK : RPMRC_FAIL;
+	sm = rpmsmFree(sm);
+    } else
+#endif
+#if defined(WITH_SQLITE)
+    if (!strcmp(Phe->p.argv[0], "<sql>")) {
+	int Pac = Phe->c;
+	const char ** Pav = xmalloc((Pac + 1) * sizeof(*Pav));
+	const char * result = NULL;
+	rpmsql sql;
+	int i;
+
+	/* XXX ignore $1/$2, copy the tag array instead. */
+	/* XXX no NULL sentinel in tag arrays. */
+	for (i = 0; i < Pac; i++)
+	    Pav[i] = rpmExpand(Phe->p.argv[i], NULL);
+	Pav[Pac] = NULL;
+
+	sql = rpmsqlNew((char **)Pav, 0);
+	rc = rpmsqlRun(sql, script, &result) == RPMRC_OK
+	    ? RPMRC_OK : RPMRC_FAIL;
+	sql = rpmsqlFree(sql);
+	Pav = argvFree(Pav);
+    } else
+#endif
+#if defined(WITH_SQUIRREL)
+    if (!strcmp(Phe->p.argv[0], "<squirrel>")) {
+	rpmsquirrel squirrel = rpmsquirrelNew((char **)av, 0);
+	rc = rpmsquirrelRun(squirrel, script, NULL) == RPMRC_OK
+	    ? RPMRC_OK : RPMRC_FAIL;
+	squirrel = rpmsquirrelFree(squirrel);
+    } else
+#endif
+#if defined(WITH_TCL)
+    if (!strcmp(Phe->p.argv[0], "<tcl>")) {
+	rpmtcl tcl = rpmtclNew((char **)av, 0);
+	rc = rpmtclRun(tcl, script, NULL) == RPMRC_OK
+	    ? RPMRC_OK : RPMRC_FAIL;
+	tcl = rpmtclFree(tcl);
+    } else
+#endif
+	rc = RPMRC_NOTFOUND;
+
+    if (ssp != NULL) {
+	*ssp &= ~0xffff;
+	*ssp |= (xx & 0xffff);
+	*ssp |= RPMSCRIPT_STATE_REAPED;
+    }
+
+    xx = exitChroot(psm, inChroot, pwdFdno, rootFdno);
+
+    return rc;
+}
+#endif
+
+/**
+ */
+/*@unchecked@*/
+static int ldconfig_done = 0;
+
+/*@unchecked@*/ /*@observer@*/ /*@null@*/
+static const char * ldconfig_path = "/sbin/ldconfig";
+
+/**
+ * Run scriptlet with args.
+ *
+ * Run a script with an interpreter. If the interpreter is not specified,
+ * /bin/sh will be used.
+ *
+ * @param psm		package state machine data
+ * @param h		header
+ * @param sln		name of scriptlet section
+ * @param Phe		scriptlet args, Phe->p.argv[0] is interpreter to use
+ * @param script	scriptlet body
+ * @param arg1		no. instances of package installed after scriptlet exec
+ *			(-1 is no arg)
+ * @param arg2		ditto, but for the target package
+ * @return		RPMRC_OK on success
+ */
+static rpmRC runScript(rpmpsm psm, Header h, const char * sln, HE_t Phe,
+		const char * script, int arg1, int arg2)
+	/*@globals ldconfig_done, rpmGlobalMacroContext, h_errno,
+		fileSystem, internalState@*/
+	/*@modifies psm, ldconfig_done, rpmGlobalMacroContext,
+		fileSystem, internalState @*/
+{
+    const rpmts ts = psm->ts;
+    const char * NVRA = psm->NVRA;
+    HE_t IPhe = psm->IPhe;
+    const char ** argv = NULL;
+    int argc = 0;
+    const char ** IP = NULL;
+    int nIP;
+    size_t maxPrefixLength;
+    size_t len;
+    char * prefixBuf = NULL;
+    const char * fn = NULL;
+    FD_t scriptFd = NULL;
+    FD_t out = NULL;		/* exit: expects this to be initialized. */
+    rpmRC rc = RPMRC_FAIL;	/* assume failure */
+    const char * body = NULL;
+    rpmop op = memset(alloca(sizeof(*op)), 0, sizeof(*op));
+    int ix = tag2slx(psm->scriptTag);
+    rpmuint32_t * ssp = NULL;
+    pid_t pid;
+    int xx;
+    int i;
+
+    if (psm->sstates != NULL && ix >= 0 && ix < RPMSCRIPT_MAX)
+	ssp = psm->sstates + ix;
+    if (ssp != NULL)
+	*ssp = RPMSCRIPT_STATE_UNKNOWN;
+
+    if (Phe->p.argv == NULL && script == NULL)
+	return RPMRC_OK;
+
+    /* Macro expand all scriptlets. */
+    body = rpmExpand(script, NULL);
+
+    /* XXX Load NVRA lazily. This should be done elsewhere ... */
+    if (NVRA == NULL) {
+	HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+	he->tag = RPMTAG_NVRA;
+	xx = headerGet(h, he, 0);
+assert(he->p.str != NULL);
+	psm->NVRA = NVRA = he->p.str;
+    }
+
+    if (op != NULL)
+	(void) rpmswEnter(op, 0);
+    
+    if (Phe->p.argv && Phe->p.argv[0])
+    if (!strcmp(Phe->p.argv[0], "<lua>")
+     || !strcmp(Phe->p.argv[0], "<augeas>")
+     || !strcmp(Phe->p.argv[0], "<ficl>")
+     || !strcmp(Phe->p.argv[0], "<js>")
+     || !strcmp(Phe->p.argv[0], "<perl>")
+     || !strcmp(Phe->p.argv[0], "<python>")
+     || !strcmp(Phe->p.argv[0], "<ruby>")
+     || !strcmp(Phe->p.argv[0], "<sql>")
+     || !strcmp(Phe->p.argv[0], "<squirrel>")
+     || !strcmp(Phe->p.argv[0], "<tcl>"))
+    {
+#if defined(_WITH_EMBEDDED)
+	rpmlog(RPMLOG_DEBUG,
+		D_("%s: %s(%s) running %s scriptlet.\n"),
+		psm->stepName, tag2sln(psm->scriptTag), NVRA, Phe->p.argv[0]);
+	rc = runEmbeddedScript(psm, sln, Phe, body, arg1, arg2);
+#endif
+	goto exit;
+    }
+
+    psm->sq.reaper = 1;
+
+    /*
+     * If a successor node, and ldconfig was just run, don't bother.
+     */
+    if (ldconfig_path && Phe->p.argv != NULL && F_ISSET(psm, UNORDERED)) {
+ 	if (ldconfig_done && !strcmp(Phe->p.argv[0], ldconfig_path)) {
+	    rpmlog(RPMLOG_DEBUG,
+		D_("%s: %s(%s) skipping redundant \"%s\".\n"),
+		psm->stepName, tag2sln(psm->scriptTag), NVRA,
+		Phe->p.argv[0]);
+	    rc = RPMRC_OK;
+	    goto exit;
+	}
+    }
+
+    rpmlog(RPMLOG_DEBUG,
+		D_("%s: %s(%s) %ssynchronous scriptlet start\n"),
+		psm->stepName, tag2sln(psm->scriptTag), NVRA,
+		(F_ISSET(psm, UNORDERED) ? "a" : ""));
+
+    if (Phe->p.argv == NULL) {
+	argv = alloca(5 * sizeof(*argv));
+	argv[0] = "/bin/sh";
+	argc = 1;
+	ldconfig_done = 0;
+    } else {
+	argv = alloca((Phe->c + 4) * sizeof(*argv));
+	memcpy(argv, Phe->p.argv, Phe->c * sizeof(*argv));
+	argc = Phe->c;
+	ldconfig_done = (ldconfig_path && !strcmp(argv[0], ldconfig_path)
+		? 1 : 0);
+    }
+
+    /* XXX Load INSTPREFIXES lazily. This should be done elsewhere ... */
+    if (IPhe->tag == 0) {
+	IPhe->tag = RPMTAG_INSTPREFIXES;
+	xx = headerGet(h, IPhe, 0);
+	if (!xx) {
+	    IPhe->p.ptr = _free(IPhe->p.ptr);
+	    IPhe->tag = RPMTAG_INSTALLPREFIX;
+	    xx = headerGet(h, IPhe, 0);
+	    if (xx) {
+		const char ** av =
+			xmalloc(sizeof(*av) + strlen(IPhe->p.argv[0]) + 1);
+		char * t = (char *) &av[1];
+
+		av[0] = t;
+		t = stpcpy(t, IPhe->p.argv[0]);
+		*t = '\0';
+		IPhe->p.ptr = _free(IPhe->p.ptr);
+		IPhe->t = RPM_STRING_ARRAY_TYPE;
+		IPhe->p.argv = av;
+		IPhe->c = 1;
+	    } else {
+		IPhe->p.argv = NULL;
+		IPhe->c = 0;
+	    }
+	}
+    }
+    IP = IPhe->p.argv;
+    nIP = IPhe->c;
+
+    maxPrefixLength = 0;
+    if (IP != NULL)
+    for (i = 0; i < nIP; i++) {
+	len = strlen(IP[i]);
+	if (len > maxPrefixLength) maxPrefixLength = len;
+    }
+    prefixBuf = alloca(maxPrefixLength + 50);
+
+    if (script) {
+	const char * rootDir = rpmtsRootDir(ts);
+	FD_t fd;
+	size_t nw;
+
+	if (rpmTempFile((!rpmtsChrootDone(ts) ? rootDir : "/"), &fn, &fd))
+	    goto exit;
+
+	if (rpmIsDebug() &&
+	    (!strcmp(argv[0], "/bin/sh") || !strcmp(argv[0], "/bin/bash")))
+	{
+	    static const char set_x[] = "set -x\n";
+	    nw = Fwrite(set_x, sizeof(set_x[0]), sizeof(set_x)-1, fd);
+	}
+
+	if (ldconfig_path && strstr(body, ldconfig_path) != NULL)
+	    ldconfig_done = 1;
+
+	nw = Fwrite(body, sizeof(body[0]), strlen(body), fd);
+	xx = Fclose(fd);
+
+	{   const char * sn = fn;
+//	    if (!rpmtsChrootDone(ts) && rootDir != NULL &&
+//		!(rootDir[0] == '/' && rootDir[1] == '\0'))
+//	    {
+//		sn += strlen(rootDir)-1;
+//	    }
+	    argv[argc++] = sn;
+	}
+
+	if (arg1 >= 0) {
+	    char *av = alloca(20);
+	    sprintf(av, "%d", arg1);
+	    argv[argc++] = av;
+	}
+	if (arg2 >= 0) {
+	    char *av = alloca(20);
+	    sprintf(av, "%d", arg2);
+	    argv[argc++] = av;
+	}
+    }
+
+    argv[argc] = NULL;
+
+    /* Log the scriptlet to be exec'd. */
+    switch (psm->scriptTag) {
+    default:
+	break;
+    case RPMTAG_PREIN:
+	(void) rpmlioPrein(rpmtsGetRdb(ts), argv, body);
+	break;
+    case RPMTAG_POSTIN:
+	(void) rpmlioPostin(rpmtsGetRdb(ts), argv, body);
+	break;
+    case RPMTAG_PREUN:
+	(void) rpmlioPreun(rpmtsGetRdb(ts), argv, body);
+	break;
+    case RPMTAG_POSTUN:
+	(void) rpmlioPostun(rpmtsGetRdb(ts), argv, body);
+	break;
+    }
+
+    scriptFd = rpmtsScriptFd(ts);
+    if (scriptFd != NULL) {
+	if (rpmIsVerbose()) {
+	    out = fdDup(Fileno(scriptFd));
+	} else {
+	    out = Fopen("/dev/null", "w.fdio");
+	    if (Ferror(out)) {
+		out = fdDup(Fileno(scriptFd));
+	    }
+	}
+    } else {
+	out = fdDup(STDOUT_FILENO);
+    }
+    if (out == NULL)	/* XXX can't happen */
+	goto exit;
+
+    pid = rpmsqFork(&psm->sq);
+    if (psm->sq.child == 0) {
+	int pipes[2];
+	int flag;
+	int fdno;
+
+	pipes[0] = pipes[1] = 0;
+	/* Make stdin inaccessible */
+	xx = pipe(pipes);
+	xx = close(pipes[1]);
+	xx = dup2(pipes[0], STDIN_FILENO);
+	xx = close(pipes[0]);
+
+	/* XXX Force FD_CLOEXEC on 1st 100 inherited fdno's. */
+	for (fdno = 3; fdno < 100; fdno++) {
+	    flag = fcntl(fdno, F_GETFD);
+	    if (flag == -1 || (flag & FD_CLOEXEC))
+		continue;
+	    rpmlog(RPMLOG_DEBUG,
+			D_("%s: %s(%s)\tfdno(%d) missing FD_CLOEXEC\n"),
+			psm->stepName, sln, NVRA,
+			fdno);
+	    xx = fcntl(fdno, F_SETFD, FD_CLOEXEC);
+	    /* XXX W2DO? debug msg for inheirited fdno w/o FD_CLOEXEC */
+	}
+
+	if (scriptFd != NULL) {
+	    int sfdno = Fileno(scriptFd);
+	    int ofdno = Fileno(out);
+	    if (sfdno != STDERR_FILENO)
+		xx = dup2(sfdno, STDERR_FILENO);
+	    if (ofdno != STDOUT_FILENO)
+		xx = dup2(ofdno, STDOUT_FILENO);
+	    /* make sure we don't close stdin/stderr/stdout by mistake! */
+	    if (ofdno > STDERR_FILENO && ofdno != sfdno)
+		xx = Fclose (out);
+	    if (sfdno > STDERR_FILENO && ofdno != sfdno)
+		xx = Fclose (scriptFd);
+	}
+
+	{   const char *ipath = rpmExpand("PATH=%{_install_script_path}", NULL);
+	    const char *path = SCRIPT_PATH;
+
+	    if (ipath && ipath[5] != '%')
+		path = ipath;
+
+	    xx = doputenv(path);
+	    /*@-modobserver@*/
+	    ipath = _free(ipath);
+	    /*@=modobserver@*/
+	}
+
+	if (IP != NULL)
+	for (i = 0; i < nIP; i++) {
+	    sprintf(prefixBuf, "RPM_INSTALL_PREFIX%d=%s", i, IP[i]);
+	    xx = doputenv(prefixBuf);
+
+	    /* backwards compatibility */
+	    if (i == 0) {
+		sprintf(prefixBuf, "RPM_INSTALL_PREFIX=%s", IP[i]);
+		xx = doputenv(prefixBuf);
+	    }
+	}
+
+	{   const char * rootDir = rpmtsRootDir(ts);
+        xx = Chdir(rootDir);
+	    rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"),
+			psm->stepName, sln, NVRA,
+			argv[0], (unsigned)getpid());
+
+	    /* XXX Don't mtrace into children. */
+	    unsetenv("MALLOC_CHECK_");
+	    setenv("D", rootDir, 0);
+
+	    if (ssp != NULL)
+		*ssp |= RPMSCRIPT_STATE_EXEC;
+
+	    /* Permit libselinux to do the scriptlet exec. */
+	    if (rpmtsSELinuxEnabled(ts) == 1) {	
+		if (ssp != NULL)
+		    *ssp |= RPMSCRIPT_STATE_SELINUX;
+		xx = rpmsxExec(NULL, 0, argv);
+	    } else {
+/*@-nullstate@*/
+		xx = execv(argv[0], (char *const *)argv);
+/*@=nullstate@*/
+	    }
+	}
+
+	if (ssp != NULL)
+	    *ssp &= ~RPMSCRIPT_STATE_EXEC;
+
+ 	_exit(-1);
+	/*@notreached@*/
+    }
+
+    if (psm->sq.child == (pid_t)-1) {
+        rpmlog(RPMLOG_ERR, _("Couldn't fork %s: %s\n"), sln, strerror(errno));
+        goto exit;
+    }
+
+    (void) psmWait(psm);
+
+  /* XXX filter order dependent multilib "other" arch helper error. */
+  if (!(psm->sq.reaped >= 0 && !strcmp(argv[0], "/usr/sbin/glibc_post_upgrade") && WEXITSTATUS(psm->sq.status) == 110)) {
+    void *ptr = NULL;
+    if (psm->sq.reaped < 0) {
+	rpmlog(RPMLOG_ERR,
+		_("%s(%s) scriptlet failed, waitpid(%d) rc %d: %s\n"),
+		 sln, NVRA, (int)psm->sq.child, (int)psm->sq.reaped,
+		strerror(errno));
+	goto exit;
+    } else
+    if (!WIFEXITED(psm->sq.status) || WEXITSTATUS(psm->sq.status)) {
+	if (WIFSIGNALED(psm->sq.status)) {
+	    ptr = rpmtsNotify(ts, psm->te, RPMCALLBACK_SCRIPT_ERROR,
+				 psm->scriptTag, WTERMSIG(psm->sq.status));
+	    rpmlog(RPMLOG_ERR,
+                 _("%s(%s) scriptlet failed, signal %d\n"),
+                 sln, NVRA, WTERMSIG(psm->sq.status));
+	} else {
+	    ptr = rpmtsNotify(ts, psm->te, RPMCALLBACK_SCRIPT_ERROR,
+				 psm->scriptTag, WEXITSTATUS(psm->sq.status));
+	    rpmlog(RPMLOG_ERR,
+		_("%s(%s) scriptlet failed, exit status %d\n"),
+		sln, NVRA, WEXITSTATUS(psm->sq.status));
+	}
+	goto exit;
+    }
+  }
+
+    rc = RPMRC_OK;
+
+exit:
+    if (op != NULL) {
+	static unsigned int scale = 1000;
+	(void) rpmswExit(op, 0);
+        if (ix >= 0 && ix < RPMSCRIPT_MAX)
+            psm->smetrics[ix] += op->usecs / scale;
+    }
+
+    if (out)
+	xx = Fclose(out);	/* XXX dup'd STDOUT_FILENO */
+
+    if (script) {
+	if (!rpmIsDebug() && fn != NULL)
+	    xx = Unlink(fn);
+	fn = _free(fn);
+    }
+
+    body = _free(body);
+
+    return rc;
+}
+
+/**
+ * Retrieve and run scriptlet from header.
+ * @param psm		package state machine data
+ * @return		rpmRC return code
+ */
+static rpmRC runInstScript(rpmpsm psm)
+	/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
+	/*@modifies psm, rpmGlobalMacroContext, fileSystem, internalState @*/
+{
+    HE_t Phe = memset(alloca(sizeof(*Phe)), 0, sizeof(*Phe));
+    HE_t She = memset(alloca(sizeof(*She)), 0, sizeof(*She));
+    rpmfi fi = psm->fi;
+    const char * argv0 = NULL;
+    rpmRC rc = RPMRC_OK;
+
+assert(fi->h != NULL);
+    She->tag = psm->scriptTag;
+    if (!headerGet(fi->h, She, 0))
+	goto exit;
+
+    Phe->tag = psm->progTag;
+    if (!headerGet(fi->h, Phe, 0))
+	goto exit;
+
+    /* Coerce strings into header argv return. */
+    if (Phe->t == RPM_STRING_TYPE) {
+	const char * s = Phe->p.str;
+	char * t;
+	Phe->p.argv = xmalloc(sizeof(Phe->p.argv[0]) + strlen(s) + 1);
+	Phe->p.argv[0] = t = (char *) &Phe->p.argv[1];
+	t = stpcpy(t, s);
+	*t = '\0';
+	s = _free(s);
+    }
+
+    /* Expand "%script -p %%{interpreter}" macros. */
+    if (Phe->p.argv[0][0] == '%')
+	Phe->p.argv[0] = argv0 = rpmExpand(Phe->p.argv[0], NULL);
+
+    rc = runScript(psm, fi->h, tag2sln(psm->scriptTag), Phe,
+		She->p.str, psm->scriptArg, -1);
+
+exit:
+    argv0 = _free(argv0);
+    Phe->p.ptr = _free(Phe->p.ptr);
+    She->p.ptr = _free(She->p.ptr);
+    return rc;
+}
+
+/*@unchecked@*/
+static rpmTag _trigger_tag;
+
+/**
+ * Execute triggers.
+ * @param psm		package state machine data
+ * @param sourceH
+ * @param triggeredH
+ * @param arg2
+ * @return		RPMRC_OK on success
+ */
+static rpmRC handleOneTrigger(const rpmpsm psm,
+			Header sourceH, Header triggeredH, int arg2)
+	/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState@*/
+	/*@modifies psm, sourceH, triggeredH,
+		rpmGlobalMacroContext, fileSystem, internalState @*/
+{
+    static int scareMem = 0;
+    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+    HE_t Ihe = memset(alloca(sizeof(*Ihe)), 0, sizeof(*Ihe));
+    HE_t She = memset(alloca(sizeof(*She)), 0, sizeof(*She));
+    HE_t Phe = memset(alloca(sizeof(*Phe)), 0, sizeof(*Phe));
+    miRE mire = NULL;
+    const rpmts ts = psm->ts;
+    rpmds Tds = NULL;
+    rpmds Fds = NULL;
+    rpmds Dds = NULL;
+    rpmds Pds = NULL;
+    const char * sourceName;
+    const char * triggerName;
+    rpmRC rc = RPMRC_OK;
+    int arg1;
+    int xx;
+    int i;
+
+    he->tag = RPMTAG_NAME;
+    xx = headerGet(sourceH, he, 0);
+    sourceName = he->p.str;
+
+    he->tag = RPMTAG_NAME;
+    xx = headerGet(triggeredH, he, 0);
+    triggerName = he->p.str;
+
+    arg1 = rpmdbCountPackages(rpmtsGetRdb(ts), triggerName);
+    if (arg1 < 0) {
+	/* XXX W2DO? fails as "execution of script failed" */
+	rc = RPMRC_FAIL;
+	goto exit;
+    }
+    arg1 += psm->countCorrection;
+
+    Tds = rpmdsNew(triggeredH, RPMTAG_TRIGGERNAME, scareMem);
+    if (Tds == NULL)
+	goto exit;
+    xx = rpmdsSetNoPromote(Tds, 1);
+
+    Ihe->tag = RPMTAG_TRIGGERINDEX;
+    if (!headerGet(triggeredH, Ihe, 0))
+	goto exit;
+
+    She->tag = RPMTAG_TRIGGERSCRIPTS;
+    if (!headerGet(triggeredH, She, 0))
+	goto exit;
+
+    Phe->tag = RPMTAG_TRIGGERSCRIPTPROG;
+    if (!headerGet(triggeredH, Phe, 0))
+	goto exit;
+
+    if ((Tds = rpmdsInit(Tds)) != NULL)
+    while ((i = rpmdsNext(Tds)) >= 0) {
+	rpmuint32_t Flags = rpmdsFlags(Tds);
+	char * depName;
+	int bingo;
+
+	/* Skip triggers that are not in this context. */
+	if (!(Flags & psm->sense))
+	    continue;
+
+	bingo = 0;		/* no trigger to fire. */
+	depName = (char *) rpmdsN(Tds);
+	if (depName[0] == '/') {
+	    size_t nb = strlen(depName);
+	    if (Glob_pattern_p(depName, 0)) {
+		rpmds ds = NULL;
+		if (depName[nb-1] == '/') {
+		    /* XXX Dirnames w trailing "/" needed. */
+		    if (Dds == NULL)
+			Dds = rpmdsNew(sourceH, RPMTAG_DIRNAMES, 0x2);
+		    ds = rpmdsLink(Dds, "Triggers");
+		} else {
+		    if (Fds == NULL)
+			Fds = rpmdsNew(sourceH, RPMTAG_BASENAMES, 0);
+		    ds = rpmdsLink(Fds, "Triggers");
+		}
+		if (mire == NULL)
+		    mire = mireNew(RPMMIRE_GLOB, 0);
+
+		xx = mireRegcomp(mire, depName);
+		if ((ds = rpmdsInit(ds)) != NULL)
+		while (rpmdsNext(ds) >= 0) {
+		    const char * N = rpmdsN(ds);
+		    xx = mireRegexec(mire, N, 0);
+		    if (xx < 0)
+			/*@innercontinue@*/ continue;
+		    bingo = 1;
+		    /*@innerbreak@*/ break;
+		}
+		(void)rpmdsFree(ds);
+		ds = NULL;
+		xx = mireClean(mire);
+	    }
+
+	    /* If not matched, and directory trigger, try dir names. */
+	    if (!bingo && depName[nb-1] == '/') {
+		/* XXX Dirnames w trailing "/" needed. */
+		if (Dds == NULL)
+		    Dds = rpmdsNew(sourceH, RPMTAG_DIRNAMES, 0x2);
+		bingo = rpmdsMatch(Tds, Dds);
+	    }
+
+	    /* If not matched, try file paths. */
+	    if (!bingo) {
+		if (Fds == NULL)
+		    Fds = rpmdsNew(sourceH, RPMTAG_BASENAMES, 0);
+		bingo = rpmdsMatch(Tds, Fds);
+	    }
+	}
+
+	/* If trigger not fired yet, try provided dependency match. */
+	if (!bingo) {
+	    if (Pds == NULL)
+		Pds = rpmdsNew(sourceH, RPMTAG_PROVIDENAME, 0);
+	    bingo = rpmdsMatch(Tds, Pds);
+	    bingo = rpmdsNegateRC(Tds, bingo);
+	}
+	if (!bingo)
+	    continue;
+
+	/* Coerce strings into header argv return. */
+	/* XXX FIXME: permit trigger scripts with arguments. */
+	{   int index = Ihe->p.ui32p[i];
+	    const char * s = Phe->p.argv[index];
+	    char * t;
+	    
+	    he->tag = Phe->tag;
+	    he->t = RPM_STRING_ARRAY_TYPE;
+	    he->c = 1;
+	    he->p.argv = xmalloc(sizeof(Phe->p.argv[0]) + strlen(s) + 1);
+	    he->p.argv[0] = t = (char *) &he->p.argv[1];
+	    t = stpcpy(t, s);
+	    *t = '\0';
+
+	    rc |= runScript(psm, triggeredH, "%trigger", he,
+			She->p.argv[index], arg1, arg2);
+
+	    he->p.ptr = _free(he->p.ptr);
+	}
+    }
+
+    mire = mireFree(mire);
+    (void)rpmdsFree(Pds);
+    Pds = NULL;
+    (void)rpmdsFree(Dds);
+    Dds = NULL;
+    (void)rpmdsFree(Fds);
+    Fds = NULL;
+    (void)rpmdsFree(Tds);
+    Tds = NULL;
+
+exit:
+    Ihe->p.ptr = _free(Ihe->p.ptr);
+    She->p.ptr = _free(She->p.ptr);
+    Phe->p.ptr = _free(Phe->p.ptr);
+    triggerName = _free(triggerName);
+    sourceName = _free(sourceName);
+
+    return rc;
+}
+
+/* Retrieve trigger patterns from rpmdb. */
+static int rpmdbTriggerGlobs(rpmpsm psm)
+	/*@globals rpmGlobalMacroContext @*/
+	/*@modifies psm, rpmGlobalMacroContext @*/
+{
+    const rpmts ts = psm->ts;
+    ARGV_t keys = NULL;
+    int xx = rpmdbMireApply(rpmtsGetRdb(ts), RPMTAG_TRIGGERNAME,
+		RPMMIRE_STRCMP, NULL, &keys);
+    int nkeys = argvCount(keys);
+    int i;
+    
+    if (keys)
+    for (i = 0; i < nkeys; i++) {
+	char * t = (char *) keys[i];
+	if (!Glob_pattern_p(t, 0))
+	    continue;
+	xx = mireAppend(RPMMIRE_GLOB, 0, t, NULL,
+		(void *)&psm->Tmires, &psm->nTmires);
+	xx = argvAdd(&psm->Tpats, t);
+    }
+    keys = argvFree(keys);
+    return 0;
+}
+
+/**
+ * Run a dependency set loop against rpmdb triggers.
+ * @param psm		package state machine data
+ * @param tagno		dependency set to run against rpmdb
+ * @param arg2		scriptlet arg2
+ * @return		RPMRC_OK on success
+ */
+static rpmRC runTriggersLoop(rpmpsm psm, rpmTag tagno, int arg2)
+	/*@globals rpmGlobalMacroContext, h_errno,
+		fileSystem, internalState @*/
+	/*@modifies psm, rpmGlobalMacroContext,
+		fileSystem, internalState @*/
+{
+    static int scareMem = 0;
+    const rpmts ts = psm->ts;
+    rpmfi fi = psm->fi;
+    rpmds ds = rpmdsNew(fi->h, tagno, scareMem);
+    char * depName = NULL;
+    ARGI_t instances = NULL;
+    rpmmi mi;
+    Header triggeredH;
+    rpmRC rc = RPMRC_OK;
+    int i;
+    int xx;
+
+    /* Fire elements against rpmdb trigger strings. */
+    if ((ds = rpmdsInit(ds)) != NULL)
+    while ((i = rpmdsNext(ds)) >= 0) {
+	const char * Name = rpmdsN(ds);
+	size_t nName = strlen(Name);
+	unsigned prev, instance;
+	unsigned nvals;
+	ARGint_t vals;
+
+	depName = _free(depName);
+	depName = xmalloc(nName + 1 + 1);
+	(void) stpcpy(depName, Name);
+	/* XXX re-add the pesky trailing '/' to dirnames. */
+	depName[nName] = (tagno == RPMTAG_DIRNAMES ? '/' : '\0');
+	depName[nName+1] = '\0';
+
+	if (depName[0] == '/' && psm->Tmires != NULL) {
+	    miRE mire;
+	    int j;
+
+	    /* XXX mireApply doesn't tell which pattern matched. */
+	    for (j = 0, mire = psm->Tmires; j < psm->nTmires; j++, mire++) {
+		const char * pattern = psm->Tpats[j];
+		if (depName[nName-1] != '/') {
+		    size_t npattern = strlen(pattern);
+		    depName[nName] = (pattern[npattern-1] == '/') ? '/' : '\0';
+		}
+		if (mireRegexec(mire, depName, 0) < 0)
+		    /*@innercontinue@*/ continue;
+
+		/* Reset the primary retrieval key to the pattern. */
+		depName = _free(depName);
+		depName = xstrdup(pattern);
+		/*@innerbreak@*/ break;
+	    }
+	}
+
+	/* Retrieve triggered header(s) by key. */
+	mi = rpmtsInitIterator(ts, RPMTAG_TRIGGERNAME, depName, 0);
+
+	nvals = argiCount(instances);
+	vals = argiData(instances);
+	if (nvals > 0)
+	    xx = rpmmiPrune(mi, (uint32_t *)vals, nvals, 1);
+
+	prev = 0;
+	while((triggeredH = rpmmiNext(mi)) != NULL) {
+	    instance = rpmmiInstance(mi);
+	    if (prev == instance)
+		/*@innercontinue@*/ continue;
+	    rc |= handleOneTrigger(psm, fi->h, triggeredH, arg2);
+	    prev = instance;
+	    xx = argiAdd(&instances, -1, instance);
+	    xx = argiSort(instances, NULL);
+	}
+
+	mi = rpmmiFree(mi);
+    }
+
+    instances = argiFree(instances);
+    depName = _free(depName);
+    (void)rpmdsFree(ds);
+    ds = NULL;
+
+    return rc;
+}
+
+/**
+ * Run trigger scripts in the database that are fired by this header.
+ * @param psm		package state machine data
+ * @return		0 on success
+ */
+static rpmRC runTriggers(rpmpsm psm)
+	/*@globals rpmGlobalMacroContext, h_errno,
+		fileSystem, internalState @*/
+	/*@modifies psm, rpmGlobalMacroContext,
+		fileSystem, internalState @*/
+{
+    const rpmts ts = psm->ts;
+    rpmfi fi = psm->fi;
+    int numPackage;
+    rpmTag tagno;
+    rpmRC rc = RPMRC_OK;
+
+    /* Select RPMTAG_NAME or RPMTAG_PROVIDENAME index for triggering. */
+    if (_trigger_tag == 0) {
+	const char * t = rpmExpand("%{?_trigger_tag}", NULL);
+/*@-mods@*/
+	_trigger_tag = (!strcmp(t, "name") ? RPMTAG_NAME : RPMTAG_PROVIDENAME);
+/*@=mods@*/
+	t = _free(t);
+    }
+    tagno = _trigger_tag;
+
+assert(psm->te != NULL);
+    {	const char * N = rpmteN(psm->te);
+assert(N != NULL);
+	numPackage = rpmdbCountPackages(rpmtsGetRdb(ts), N);
+	numPackage += psm->countCorrection;
+	if (numPackage < 0)
+	    return RPMRC_NOTFOUND;
+    }
+assert(fi != NULL);
+assert(fi->h != NULL);
+
+    /* XXX Save/restore count correction. */
+    {	int countCorrection = psm->countCorrection;
+
+	psm->countCorrection = 0;
+
+	/* Try name/providename triggers first. */
+	rc |= runTriggersLoop(psm, tagno, numPackage);
+
+	/* If not limited to NEVRA triggers, also try file/dir path triggers. */
+	if (tagno != RPMTAG_NAME) {
+	    int xx;
+	    /* Retrieve trigger patterns from rpmdb. */
+	    xx = rpmdbTriggerGlobs(psm);
+
+	    rc |= runTriggersLoop(psm, RPMTAG_BASENAMES, numPackage);
+	    rc |= runTriggersLoop(psm, RPMTAG_DIRNAMES, numPackage);
+
+	    psm->Tpats = argvFree(psm->Tpats);
+	    psm->Tmires = mireFreeAll(psm->Tmires, psm->nTmires);
+	    psm->nTmires = 0;
+	}
+
+	psm->countCorrection = countCorrection;
+    }
+
+    return rc;
+}
+
+/**
+ * Run triggers from this header that are fired by headers in the database.
+ * @param psm		package state machine data
+ * @return		0 on success
+ */
+static rpmRC runImmedTriggers(rpmpsm psm)
+	/*@globals rpmGlobalMacroContext, h_errno,
+		fileSystem, internalState @*/
+	/*@modifies psm, rpmGlobalMacroContext,
+		fileSystem, internalState @*/
+{
+    HE_t Ihe = memset(alloca(sizeof(*Ihe)), 0, sizeof(*Ihe));
+    const rpmts ts = psm->ts;
+    rpmfi fi = psm->fi;
+    rpmds triggers = NULL;
+    rpmmi mi;
+    ARGV_t keys = NULL;
+    ARGI_t instances = NULL;
+    Header sourceH = NULL;
+    const char * Name;
+    rpmTag tagno;
+    rpmRC rc = RPMRC_OK;
+    int i;
+    int xx;
+
+assert(fi->h != NULL);
+
+    /* Select RPMTAG_NAME or RPMTAG_PROVIDENAME index for triggering. */
+    if (_trigger_tag == 0) {
+	const char * t = rpmExpand("%{?_trigger_tag}", NULL);
+/*@-mods@*/
+	_trigger_tag = (!strcmp(t, "name") ? RPMTAG_NAME : RPMTAG_PROVIDENAME);
+/*@=mods@*/
+	t = _free(t);
+    }
+    tagno = _trigger_tag;
+
+/*@-castexpose@*/
+    triggers = rpmdsLink(psm->triggers, "ImmedTriggers");
+/*@=castexpose@*/
+    if (triggers == NULL)
+	goto exit;
+
+    Ihe->tag = RPMTAG_TRIGGERINDEX;
+    xx = headerGet(fi->h, Ihe, 0);
+    if (!(xx && Ihe->p.ui32p && Ihe->c)) goto exit;
+
+    /* Collect primary trigger keys, expanding globs as needed. */
+    triggers = rpmdsInit(triggers);
+    if (triggers != NULL)
+    while ((i = rpmdsNext(triggers)) >= 0) {
+	evrFlags Flags = rpmdsFlags(triggers);
+	const char * N = rpmdsN(triggers);
+	const char * EVR = rpmdsEVR(triggers);
+
+	/* Skip triggers that are not in this context. */
+	if (!(Flags & psm->sense))
+	    continue;
+
+	/* If not limited to NEVRA triggers, use file/dir index. */
+	if (tagno != RPMTAG_NAME) {
+	    /* XXX if trigger name ends with '/', use dirnames instead. */
+	    if (N[0] == '/') 
+		tagno = (N[strlen(N)-1] == '/')
+			? RPMTAG_DIRNAMES : RPMTAG_FILEPATHS;
+	}
+	/* XXX For now, permit globs only in unversioned triggers. */
+	if ((EVR == NULL || *EVR == '\0') && Glob_pattern_p(N, 0))
+	    xx = rpmdbMireApply(rpmtsGetRdb(ts), tagno, RPMMIRE_GLOB, N, &keys);
+	else
+	    xx = argvAdd(&keys, N);
+    }
+    (void)rpmdsFree(triggers);
+    triggers = NULL;
+
+    /* For all primary keys, retrieve headers and fire triggers. */
+    if (keys != NULL)
+    for (i = 0; (Name = keys[i]) != NULL; i++) {
+	unsigned prev, instance;
+	unsigned nvals;
+	ARGint_t vals;
+
+	/* If not limited to NEVRA triggers, use file/dir index. */
+	if (tagno != RPMTAG_NAME) {
+	    /* XXX if trigger name ends with '/', use dirnames instead. */
+	    if (Name[0] == '/') 
+		tagno = (Name[strlen(Name)-1] == '/')
+			? RPMTAG_DIRNAMES : RPMTAG_FILEPATHS;
+	}
+
+	mi = rpmtsInitIterator(ts, tagno, Name, 0);
+
+	/* Don't retrieve headers that have already been processed. */
+	nvals = argiCount(instances);
+	vals = argiData(instances);
+	if (nvals > 0)
+	    xx = rpmmiPrune(mi, (uint32_t *)vals, nvals, 1);
+
+	prev = 0;
+	while((sourceH = rpmmiNext(mi)) != NULL) {
+
+	    /* Skip headers that have already been processed. */
+	    instance = rpmmiInstance(mi);
+	    if (prev == instance)
+		/*@innercontinue@*/ continue;
+
+	    rc |= handleOneTrigger(psm, sourceH, fi->h, rpmmiCount(mi));
+
+	    /* Mark header instance as processed. */
+	    prev = instance;
+	    xx = argiAdd(&instances, -1, instance);
+	    xx = argiSort(instances, NULL);
+	}
+
+	mi = rpmmiFree(mi);
+    }
+
+exit:
+    instances = argiFree(instances);
+    keys = argvFree(keys);
+    Ihe->p.ptr = _free(Ihe->p.ptr);
+    return rc;
+}
+
+/*@observer@*/
+static const char * pkgStageString(pkgStage a)
+	/*@*/
+{
+    switch(a) {
+    case PSM_UNKNOWN:		return "unknown";
+
+    case PSM_PKGINSTALL:	return "  install";
+    case PSM_PKGERASE:		return "    erase";
+    case PSM_PKGCOMMIT:		return "   commit";
+    case PSM_PKGSAVE:		return "repackage";
+
+    case PSM_INIT:		return "init";
+    case PSM_PRE:		return "pre";
+    case PSM_PROCESS:		return "process";
+    case PSM_POST:		return "post";
+    case PSM_UNDO:		return "undo";
+    case PSM_FINI:		return "fini";
+
+    case PSM_CREATE:		return "create";
+    case PSM_NOTIFY:		return "notify";
+    case PSM_DESTROY:		return "destroy";
+    case PSM_COMMIT:		return "commit";
+
+    case PSM_CHROOT_IN:		return "chrootin";
+    case PSM_CHROOT_OUT:	return "chrootout";
+    case PSM_SCRIPT:		return "script";
+    case PSM_TRIGGERS:		return "triggers";
+    case PSM_IMMED_TRIGGERS:	return "immedtriggers";
+
+    case PSM_RPMIO_FLAGS:	return "rpmioflags";
+
+    case PSM_RPMDB_LOAD:	return "rpmdbload";
+    case PSM_RPMDB_ADD:		return "rpmdbadd";
+    case PSM_RPMDB_REMOVE:	return "rpmdbremove";
+
+    default:			return "???";
+    }
+    /*@noteached@*/
+}
+
+void rpmpsmSetAsync(rpmpsm psm, int async)
+{
+    assert(psm != NULL);
+#ifdef	REFERENCE
+    psm->unorderedSuccessor = async;
+#else
+    if (async)
+	psm->flags |= RPMPSM_FLAGS_UNORDERED;
+    else
+	psm->flags &= ~RPMPSM_FLAGS_UNORDERED;
+#endif
+}
+
+rpmRC rpmpsmScriptStage(rpmpsm psm, rpmTag scriptTag, rpmTag progTag)
+{
+assert(psm != NULL);
+    psm->scriptTag = scriptTag;
+    psm->progTag = progTag;
+    /* XXX other tags needed? */
+    switch (scriptTag) {
+    default:	break;
+    case RPMTAG_SANITYCHECK:	psm->stepName = "sanitycheck";	break;
+    case RPMTAG_VERIFYSCRIPT:	psm->stepName = "verify";	break;
+    case RPMTAG_PRETRANS:	psm->stepName = "pretrans";	break;
+    case RPMTAG_POSTTRANS:	psm->stepName = "posttrans";	break;
+    }
+    return rpmpsmStage(psm, PSM_SCRIPT);
+}
+
+/*@-mustmod@*/
+static void rpmpsmFini(void * _psm)
+	/*@modifies _psm @*/
+{
+    rpmpsm psm = _psm;
+
+/*@-nullstate@*/
+    psm->fi = rpmfiFree(psm->fi);
+#ifdef	NOTYET
+    psm->te = rpmteFree(psm->te);
+#else
+    psm->te = NULL;
+#endif
+/*@-internalglobs@*/
+    (void)rpmtsFree(psm->ts); 
+    psm->ts = NULL;
+/*@=internalglobs@*/
+
+    psm->IPhe->p.ptr = _free(psm->IPhe->p.ptr);
+    psm->IPhe = _free(psm->IPhe);
+    psm->NVRA = _free(psm->NVRA);
+    (void)rpmdsFree(psm->triggers);
+    psm->triggers = NULL;
+/*@=nullstate@*/
+}
+/*@=mustmod@*/
+
+/*@unchecked@*/ /*@only@*/ /*@null@*/
+rpmioPool _psmPool;
+
+static rpmpsm rpmpsmGetPool(/*@null@*/ rpmioPool pool)
+	/*@globals _psmPool, fileSystem, internalState @*/
+	/*@modifies pool, _psmPool, fileSystem, internalState @*/
+{
+    rpmpsm psm;
+
+    if (_psmPool == NULL) {
+	_psmPool = rpmioNewPool("psm", sizeof(*psm), -1, _psm_debug,
+			NULL, NULL, rpmpsmFini);
+	pool = _psmPool;
+    }
+    psm = (rpmpsm) rpmioGetPool(pool, sizeof(*psm));
+    memset(((char *)psm)+sizeof(psm->_item), 0, sizeof(*psm)-sizeof(psm->_item));
+    return psm;
+}
+
+rpmpsm rpmpsmNew(rpmts ts, rpmte te, rpmfi fi)
+{
+    static const char msg[] = "rpmpsmNew";
+    rpmpsm psm = rpmpsmGetPool(_psmPool);
+
+/*@-assignexpose -castexpose @*/
+    if (ts)	psm->ts = rpmtsLink(ts, msg);
+#ifdef	NOTYET
+    if (te)	psm->te = rpmteLink(te, msg);
+#else
+/*@-temptrans @*/
+    if (te)	psm->te = te;
+/*@=temptrans @*/
+#endif
+    if (fi)	psm->fi = rpmfiLink(fi, msg);
+/*@=assignexpose =castexpose @*/
+
+    psm->triggers = NULL;
+    psm->NVRA = NULL;
+    psm->IPhe = xcalloc(1, sizeof(*psm->IPhe));
+    memset(psm->sstates, 0, sizeof(psm->sstates));
+    memset(psm->smetrics, 0, sizeof(psm->smetrics));
+
+    return rpmpsmLink(psm, msg);
+}
+
+/**
+ * Load a transaction id from a header.
+ * @param h		header
+ * @param tag		tag to load
+ * @return		tag value (0 on failure)
+ */
+static rpmuint32_t hLoadTID(Header h, rpmTag tag)
+	/*@globals internalState @*/
+	/*@modifies internalState @*/
+{
+    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+    rpmuint32_t val;
+    int xx;
+
+    he->tag = tag;
+    xx = headerGet(h, he, 0);
+    val = (xx && he->p.ui32p ? he->p.ui32p[0] : 0);
+    he->p.ptr = _free(he->p.ptr);
+    return val;
+}
+
+/**
+ * Copy a tag from a source to a target header.
+ * @param sh		source header
+ * @param th		target header
+ * @param tag		tag to copy
+ * @return		0 always
+ */
+static int hCopyTag(Header sh, Header th, rpmTag tag)
+	/*@globals internalState @*/
+	/*@modifies th, internalState @*/
+{
+    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+    int xx = 1;
+
+    he->tag = tag;
+    if (headerGet(sh, he, 0) && he->c > 0)
+	xx = headerPut(th, he, 0);
+    he->p.ptr = _free(he->p.ptr);
+    return 0;
+}
+
+/**
+ * Save backward link(s) of an upgrade chain into a header.
+ * @param h		header
+ * @param *blink	backward links
+ * @return		0 always
+ */
+static int hSaveBlinks(Header h, const struct rpmChainLink_s * blink)
+	/*@modifies h @*/
+{
+    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+/*@observer@*/
+    static const char * chain_end = RPMTE_CHAIN_END;
+    int ac;
+    int xx = 1;
+
+    /* Save forward links into header upgrade chain. */
+    he->tag = RPMTAG_BLINKNEVRA;
+    he->t = RPM_STRING_ARRAY_TYPE;
+    ac = argvCount(blink->NEVRA);
+    if (ac > 0) {
+	he->p.argv = argvData(blink->NEVRA);
+	he->c = ac;
+    } else {    /* XXX Add an explicit chain terminator on 1st install. */
+	he->p.argv = &chain_end;
+	he->c = 1;
+    }
+    xx = headerPut(h, he, 0);
+    
+    he->tag = RPMTAG_BLINKPKGID;
+    he->t = RPM_STRING_ARRAY_TYPE;
+    ac = argvCount(blink->Pkgid);
+    if (ac > 0) {
+	he->p.argv = argvData(blink->Pkgid);
+	he->c = ac;
+    } else {	/* XXX Add an explicit chain terminator on 1st install. */
+	he->p.argv = &chain_end;
+	he->c = 1;
+    }
+    xx = headerPut(h, he, 0);
+
+    he->tag = RPMTAG_BLINKHDRID;
+    he->t = RPM_STRING_ARRAY_TYPE;
+    ac = argvCount(blink->Hdrid);
+    if (ac > 0) {
+	he->p.argv = argvData(blink->Hdrid);
+	he->c = ac;
+    } else {	/* XXX Add an explicit chain terminator on 1st install. */
+	he->p.argv = &chain_end;
+	he->c = 1;
+    }
+    xx = headerPut(h, he, 0);
+
+    return 0;
+}
+
+/**
+ * Save forward link(s) of an upgrade chain into a header.
+ * @param h		header
+ * @param *flink	forward links
+ * @return		0 always
+ */
+static int hSaveFlinks(Header h, const struct rpmChainLink_s * flink)
+	/*@modifies h @*/
+{
+    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+#ifdef	NOTYET
+    /*@observer@*/
+    static const char * chain_end = RPMTE_CHAIN_END;
+#endif
+    int ac;
+    int xx = 1;
+
+    /* Save forward links into header upgrade chain. */
+    he->tag = RPMTAG_FLINKNEVRA;
+    he->t = RPM_STRING_ARRAY_TYPE;
+    ac = argvCount(flink->NEVRA);
+    if (ac > 0) {
+	he->p.argv = argvData(flink->NEVRA);
+	he->c = ac;
+    }
+#ifdef	NOTYET	/* XXX is an explicit flink terminator needed? */
+    else {	/* XXX Add an explicit chain terminator on 1st install. */
+	he->p.argv = &chain_end;
+	he->c = 1;
+    }
+#endif
+    xx = headerPut(h, he, 0);
+
+    he->tag = RPMTAG_FLINKPKGID;
+    he->t = RPM_STRING_ARRAY_TYPE;
+    ac = argvCount(flink->Pkgid);
+    if (ac > 0) {
+	he->p.argv = argvData(flink->Pkgid);
+	he->c = ac;
+    }
+#ifdef	NOTYET	/* XXX is an explicit flink terminator needed? */
+    else {	/* XXX Add an explicit chain terminator on 1st install. */
+	he->p.argv = &chain_end;
+	he->c = 1;
+    }
+#endif
+    xx = headerPut(h, he, 0);
+
+    he->tag = RPMTAG_FLINKHDRID;
+    he->t = RPM_STRING_ARRAY_TYPE;
+    ac = argvCount(flink->Hdrid);
+    if (ac > 0) {
+	he->p.argv = argvData(flink->Hdrid);
+	he->c = ac;
+    }
+#ifdef	NOTYET	/* XXX is an explicit flink terminator needed? */
+    else {	/* XXX Add an explicit chain terminator on 1st install. */
+	he->p.argv = &chain_end;
+	he->c = 1;
+    }
+#endif
+    xx = headerPut(h, he, 0);
+
+    return 0;
+}
+
+/**
+ * Add per-transaction data to an install header.
+ * @param ts		transaction set
+ * @param te		transaction element
+ * @param fi		file info set
+ * @return		0 always
+ */
+static int populateInstallHeader(const rpmts ts, const rpmte te, rpmfi fi)
+	/*@globals h_errno, fileSystem, internalState @*/
+	/*@modifies fi, fileSystem, internalState @*/
+{
+    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+    rpmuint32_t tscolor = rpmtsColor(ts);
+    rpmuint32_t tecolor = rpmteColor(te);
+    rpmuint32_t * uip;
+    rpmuint32_t installTime[2];
+    rpmuint32_t originTime[2];
+    rpmuint32_t originTid[2];
+    int xx = 1;
+
+assert(fi->h != NULL);
+
+    {	struct timeval tv;
+	xx = gettimeofday(&tv, NULL);
+	installTime[0] = (rpmuint32_t) tv.tv_sec;
+	installTime[1] = (rpmuint32_t) tv.tv_usec;
+    }
+    he->tag = RPMTAG_INSTALLTIME;
+    he->t = RPM_UINT32_TYPE;
+    he->p.ui32p = &installTime[0];
+    he->c = 2;
+    xx = headerPut(fi->h, he, 0);
+
+    /* Propagate the tid & time that the package was first installed. */
+    if ((uip = rpmteOriginTime(te)) != NULL)
+	memcpy(originTime, uip, sizeof(originTime));
+    if (originTime[0] == 0)
+	memcpy(originTime, installTime, sizeof(originTime));
+    he->tag = RPMTAG_ORIGINTIME;
+    he->t = RPM_UINT32_TYPE;
+    he->p.ui32p = originTime;
+    he->c = 2;
+    xx = headerPut(fi->h, he, 0);
+
+    if ((uip = rpmteOriginTid(te)) != NULL)
+	memcpy(originTid, uip, sizeof(originTid));
+    if (originTid[0] == 0)
+	memcpy(originTid, ts->tid, sizeof(originTid));
+    he->tag = RPMTAG_ORIGINTID;
+    he->t = RPM_UINT32_TYPE;
+    he->p.ui32p = originTid;
+    he->c = 2;
+    xx = headerPut(fi->h, he, 0);
+
+    he->tag = RPMTAG_INSTALLCOLOR;
+    he->t = RPM_UINT32_TYPE;
+    he->p.ui32p = &tscolor;
+    he->c = 1;
+    xx = headerPut(fi->h, he, 0);
+
+    /* XXX FIXME: add preferred color at install. */
+
+    he->tag = RPMTAG_PACKAGECOLOR;
+    he->t = RPM_UINT32_TYPE;
+    he->p.ui32p = &tecolor;
+    he->c = 1;
+    xx = headerPut(fi->h, he, 0);
+
+    /* Add the header's origin/digest/stat (i.e. URL) */
+    {	const char * fn = headerGetOrigin(fi->h);
+	const char * digest = headerGetDigest(fi->h);
+	struct stat * st = headerGetStatbuf(fi->h);
+
+	if (fn != NULL) {
+	    he->tag = RPMTAG_PACKAGEORIGIN;
+	    he->t = RPM_STRING_TYPE;
+	    he->p.str = xstrdup(fn);
+	    he->c = 1;
+	    xx = headerPut(fi->h, he, 0);
+	    he->p.ptr = _free(he->p.ptr);
+
+	    if (digest != NULL) {
+		he->tag = RPMTAG_PACKAGEDIGEST;
+		he->t = RPM_STRING_TYPE;
+		he->p.str = headerGetDigest(fi->h);
+		he->c = 1;
+		xx = headerPut(fi->h, he, 0);
+	    }
+	    if (st != NULL) {
+/* XXX Fstat(2) in pkgio.c should set *st. Verify st->st_mode w assert(3). */
+#ifndef	DYING
+		int ut = urlPath(fn, NULL);
+		/* XXX URI is active, so avoid the lazy Stat(2) for now. */
+		if (!(ut == URL_IS_HTTP || ut == URL_IS_HTTPS))
+		if (st->st_mode == 0 && st->st_mtime == 0 && st->st_size == 0)
+		    xx = Stat(fn, st);
+#endif
+		if (st->st_mode != 0) {
+		    he->tag = RPMTAG_PACKAGESTAT;
+		    he->t = RPM_BIN_TYPE;
+		    he->p.ptr = (void *)st;
+		    he->c = (rpmTagCount) sizeof(*st);
+		    xx = headerPut(fi->h, he, 0);
+		}
+	    }
+	}
+    }
+
+    /* XXX Don't clobber forward/backward upgrade chain on rollbacks */
+    if (rpmtsType(ts) != RPMTRANS_TYPE_ROLLBACK)
+	xx = hSaveBlinks(fi->h, &te->blink);
+
+    return 0;
+}
+
+/**
+ * Add fi->states to an install header.
+ * @param ts		transaction set
+ * @param te		transaction element
+ * @param fi		file info set
+ * @return		0 always
+ */
+static int postPopulateInstallHeader(/*@unused@*/ const rpmts ts,
+		const rpmpsm psm, rpmfi fi)
+	/*@modifies psm, fi @*/
+{
+    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+    int fc = rpmfiFC(fi);
+    int xx = 1;
+
+    /* Add the (install) scriptlet status/metrics. */
+    he->tag = RPMTAG_SCRIPTSTATES;
+    he->t = RPM_UINT32_TYPE;
+    he->p.ui32p = psm->sstates;
+    he->c = RPMSCRIPT_MAX;
+    xx = headerPut(fi->h, he, 0);
+    he->tag = RPMTAG_SCRIPTMETRICS;
+    he->t = RPM_UINT32_TYPE;
+    he->p.ui32p = psm->smetrics;
+    he->c = RPMSCRIPT_MAX;
+    xx = headerPut(fi->h, he, 0);
+
+    /* Add file states to install header. */
+    if (fi->fstates != NULL && fc > 0) {
+	he->tag = RPMTAG_FILESTATES;
+	he->t = RPM_UINT8_TYPE;
+	he->p.ui8p = fi->fstates;
+	he->c = fc;
+	xx = headerPut(fi->h, he, 0);
+    }
+
+    return 0;
+}
+
+#if defined(WITH_PTHREADS)
+static void * rpmpsmThread(void * arg)
+	/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
+	/*@modifies arg, rpmGlobalMacroContext, fileSystem, internalState @*/
+{
+    rpmpsm psm = arg;
+/*@-unqualifiedtrans@*/
+    return ((void *) rpmpsmStage(psm, psm->nstage));
+/*@=unqualifiedtrans@*/
+}
+#endif
+
+static int rpmpsmNext(rpmpsm psm, pkgStage nstage)
+	/*@globals rpmGlobalMacroContext, h_errno, fileSystem, internalState @*/
+	/*@modifies psm, rpmGlobalMacroContext, fileSystem, internalState @*/
+{
+    psm->nstage = nstage;
+#if defined(WITH_PTHREADS)
+    if (_psm_threads)
+	return rpmsqJoin( rpmsqThread(rpmpsmThread, psm) );
+#endif
+    return rpmpsmStage(psm, psm->nstage);
+}
+
+/**
+ * @todo Packages w/o files never get a callback, hence don't get displayed
+ * on install with -v.
+ */
+/*@-nullpass@*/ /* FIX: testing null annotation for fi->h */
+rpmRC rpmpsmStage(rpmpsm psm, pkgStage stage)
+{
+    HE_t he = memset(alloca(sizeof(*he)), 0, sizeof(*he));
+    const rpmts ts = psm->ts;
+    rpmuint32_t tscolor = rpmtsColor(ts);
+    rpmfi fi = psm->fi;
+    rpmRC rc = psm->rc;
+    int saveerrno;
+    int xx;
+
+/* XXX hackery to assert(!scareMem) in rpmfiNew. */
+/*@-castexpose@*/
+if (fi->h == NULL && fi->te && ((rpmte)fi->te)->h != NULL) fi->h = headerLink(((rpmte)fi->te)->h);
+/*@=castexpose@*/
+
+    switch (stage) {
+    case PSM_UNKNOWN:
+	break;
+    case PSM_INIT:
+	rpmlog(RPMLOG_DEBUG, D_("%s: %s has %d files, test = %d\n"),
+		psm->stepName, rpmteNEVR(psm->te),
+		rpmfiFC(fi), (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST));
+
+	/*
+	 * When we run scripts, we pass an argument which is the number of
+	 * versions of this package that will be installed when we are
+	 * finished.
+	 */
+	psm->npkgs_installed = rpmdbCountPackages(rpmtsGetRdb(ts), rpmteN(psm->te));
+	if (psm->npkgs_installed < 0) {
+	    rc = RPMRC_FAIL;
+	    break;
+	}
+
+	/* Adjust package count on rollback downgrade. */
+assert(psm->te != NULL);
+	if (rpmtsType(ts) == RPMTRANS_TYPE_AUTOROLLBACK &&
+	    (psm->goal & ~(PSM_PKGSAVE|PSM_PKGERASE)))
+	{
+	    if (psm->te->downgrade)
+		psm->npkgs_installed--;
+	}
+
+	if (psm->goal == PSM_PKGINSTALL) {
+	    int fc = rpmfiFC(fi);
+	    const char * hdrid;
+
+	    /* Add per-transaction data to install header. */
+	    xx = populateInstallHeader(ts, psm->te, fi);
+
+	    psm->scriptArg = psm->npkgs_installed + 1;
+
+assert(psm->mi == NULL);
+	    hdrid = rpmteHdrid(psm->te);
+	    if (hdrid != NULL) {
+		/* XXX should use RPMTAG_HDRID not RPMTAG_SHA1HEADER */
+		psm->mi = rpmtsInitIterator(ts, RPMTAG_SHA1HEADER, hdrid, 0);
+	    } else {
+		psm->mi = rpmtsInitIterator(ts, RPMTAG_NAME, rpmteN(psm->te),0);
+		xx = rpmmiAddPattern(psm->mi, RPMTAG_EPOCH, RPMMIRE_STRCMP,
+			rpmteE(psm->te));
+		xx = rpmmiAddPattern(psm->mi, RPMTAG_VERSION, RPMMIRE_STRCMP,
+			rpmteV(psm->te));
+		xx = rpmmiAddPattern(psm->mi, RPMTAG_RELEASE, RPMMIRE_STRCMP,
+			rpmteR(psm->te));
+#ifdef	RPM_VENDOR_MANDRIVA
+		xx = rpmmiAddPattern(psm->mi, RPMTAG_DISTEPOCH, RPMMIRE_STRCMP,
+			rpmteD(psm->te));
+#endif
+		if (tscolor) {
+		    xx = rpmmiAddPattern(psm->mi,RPMTAG_ARCH, RPMMIRE_STRCMP,
+			rpmteA(psm->te));
+		    xx = rpmmiAddPattern(psm->mi, RPMTAG_OS, RPMMIRE_STRCMP,
+			rpmteO(psm->te));
+		}
+	    }
+
+	    while ((psm->oh = rpmmiNext(psm->mi)) != NULL) {
+		fi->record = rpmmiInstance(psm->mi);
+		psm->oh = NULL;
+		/*@loopbreak@*/ break;
+	    }
+	    psm->mi = rpmmiFree(psm->mi);
+
+	    rc = RPMRC_OK;
+
+	    /* XXX lazy alloc here may need to be done elsewhere. */
+	    if (fi->fstates == NULL && fc > 0) {
+		fi->fstates = xmalloc(sizeof(*fi->fstates) * fc);
+		memset(fi->fstates, RPMFILE_STATE_NORMAL, fc);
+	    }
+
+	    xx = rpmtxnBegin(rpmtsGetRdb(ts), ts->txn, &psm->te->txn);
+
+	    if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB)	break;
+	    if (fc <= 0)				break;
+	
+	    /*
+	     * Old format relocatable packages need the entire default
+	     * prefix stripped to form the cpio list, while all other packages
+	     * need the leading / stripped.
+	     */
+	    he->tag = RPMTAG_DEFAULTPREFIX;
+	    xx = headerGet(fi->h, he, 0);
+	    fi->striplen = (xx && he->p.str ? strlen(he->p.str) + 1 : 1);
+	    he->p.ptr = _free(he->p.ptr);
+	    fi->mapflags =
+		IOSM_MAP_PATH | IOSM_MAP_MODE | IOSM_MAP_UID | IOSM_MAP_GID | (fi->mapflags & IOSM_SBIT_CHECK);
+	
+	    if (headerIsEntry(fi->h, RPMTAG_ORIGBASENAMES))
+		he->tag = RPMTAG_ORIGPATHS;
+	    else
+		he->tag = RPMTAG_FILEPATHS;
+	    xx = headerGet(fi->h, he, 0);
+assert(he->p.argv != NULL);
+	    fi->apath = he->p.argv;
+	
+	    if (fi->fuser == NULL) {
+		he->tag = RPMTAG_FILEUSERNAME;
+		xx = headerGet(fi->h, he, 0);
+		fi->fuser = he->p.argv;
+	    }
+	    if (fi->fgroup == NULL) {
+		he->tag = RPMTAG_FILEGROUPNAME;
+		xx = headerGet(fi->h, he, 0);
+		fi->fgroup = he->p.argv;
+	    }
+	    rc = RPMRC_OK;
+	}
+	if (psm->goal == PSM_PKGERASE || psm->goal == PSM_PKGSAVE) {
+	    psm->scriptArg = psm->npkgs_installed - 1;
+	
+	    /* XXX FIXME: PSM_PKGSAVE needs to be transactionally protected. */
+	    if (psm->goal == PSM_PKGERASE)
+		xx = rpmtxnBegin(rpmtsGetRdb(ts), ts->txn, &psm->te->txn);
+
+	    /* Retrieve installed header. */
+	    rc = rpmpsmNext(psm, PSM_RPMDB_LOAD);
+	    if (rc == RPMRC_OK && psm->te)
+		(void) rpmteSetHeader(psm->te, fi->h);
+	}
+	if (psm->goal == PSM_PKGSAVE) {
+	    /* Open output package for writing. */
+	    {	char tiddn[32];
+		const char * bfmt;
+		const char * pkgdn;
+		const char * pkgbn;
+		char * pkgdn_buf;
+
+		xx = snprintf(tiddn, sizeof(tiddn), "%d", rpmtsGetTid(ts));
+		bfmt = rpmGetPath(tiddn, "/", "%{_repackage_name_fmt}", NULL);
+		pkgbn = headerSprintf(fi->h, bfmt,
+					NULL, rpmHeaderFormats, NULL);
+		bfmt = _free(bfmt);
+		psm->pkgURL = rpmGenPath("%{?_repackage_root}",
+					 "%{?_repackage_dir}",
+					pkgbn);
+		pkgbn = _free(pkgbn);
+		(void) urlPath(psm->pkgURL, &psm->pkgfn);
+		pkgdn_buf = xstrdup(psm->pkgfn);
+/*@-moduncon@*/
+		pkgdn = dirname(pkgdn_buf);
+/*@=moduncon@*/
+		rc = rpmMkdirPath(pkgdn, "_repackage_dir");
+		pkgdn_buf = _free(pkgdn_buf);
+		if (rc == RPMRC_FAIL)
+		    break;
+		psm->fd = Fopen(psm->pkgfn, "w.fdio");
+		if (psm->fd == NULL || Ferror(psm->fd)) {
+		    rc = RPMRC_FAIL;
+		    break;
+		}
+	    }
+	}
+	break;
+    case PSM_PRE:
+	if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)	break;
+
+/* XXX insure that trigger index is opened before entering chroot. */
+#ifdef	NOTYET
+ { static int oneshot = 0;
+   dbiIndex dbi;
+   if (!oneshot) {
+     dbi = dbiOpen(rpmtsGetRdb(ts), RPMTAG_TRIGGERNAME, 0);
+     oneshot++;
+   }
+ }
+#endif
+
+	/* Change root directory if requested and not already done. */
+	rc = rpmpsmNext(psm, PSM_CHROOT_IN);
+
+	if (psm->goal == PSM_PKGINSTALL) {
+	    psm->scriptTag = RPMTAG_PREIN;
+	    psm->progTag = RPMTAG_PREINPROG;
+	    psm->sense = RPMSENSE_TRIGGERPREIN;
+	    psm->countCorrection = 0;	/* XXX is this correct?!? */
+
+	    if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERPREIN)) {
+
+		/* Run triggers in other package(s) this package sets off. */
+		rc = rpmpsmNext(psm, PSM_TRIGGERS);
+		if (rc) break;
+
+		/* Run triggers in this package other package(s) set off. */
+		rc = rpmpsmNext(psm, PSM_IMMED_TRIGGERS);
+		if (rc) break;
+	    }
+
+	    if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPRE)) {
+		rc = rpmpsmNext(psm, PSM_SCRIPT);
+		if (rc != RPMRC_OK) {
+		    rpmlog(RPMLOG_ERR,
+			_("%s: %s scriptlet failed (%d), skipping %s\n"),
+			psm->stepName, tag2sln(psm->scriptTag), rc,
+			rpmteNEVR(psm->te));
+		    break;
+		}
+	    }
+	}
+
+	if (psm->goal == PSM_PKGERASE) {
+	    psm->scriptTag = RPMTAG_PREUN;
+	    psm->progTag = RPMTAG_PREUNPROG;
+	    psm->sense = RPMSENSE_TRIGGERUN;
+	    psm->countCorrection = -1;
+
+	    if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERUN)) {
+		/* Run triggers in this package other package(s) set off. */
+		rc = rpmpsmNext(psm, PSM_IMMED_TRIGGERS);
+		if (rc) break;
+
+		/* Run triggers in other package(s) this package sets off. */
+		rc = rpmpsmNext(psm, PSM_TRIGGERS);
+		if (rc) break;
+	    }
+
+	    if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPREUN))
+		rc = rpmpsmNext(psm, PSM_SCRIPT);
+	}
+	if (psm->goal == PSM_PKGSAVE) {
+	    int noArchiveSize = 0;
+	    const char * origin = NULL;
+	    const char * digest = NULL;
+	    const struct stat * st = NULL;
+	    size_t nstbytes = 0;
+
+	    /* Regenerate original header. */
+	    {	void * uh = NULL;
+
+		/* Save original header's origin/digest/stat (i.e. URL) */
+		he->tag = RPMTAG_PACKAGEORIGIN;
+		xx = headerGet(fi->h, he, 0);
+		origin = he->p.str;
+		he->tag = RPMTAG_PACKAGEDIGEST;
+		xx = headerGet(fi->h, he, 0);
+		if (xx && he->p.str != NULL)
+		    digest = he->p.str;
+		he->tag = RPMTAG_PACKAGESTAT;
+		xx = headerGet(fi->h, he, 0);
+		if (xx && he->p.ptr != NULL && (size_t)he->c == sizeof(*st)) {
+		    st = he->p.ptr;
+		    nstbytes = he->c;
+		}
+
+		/* Retrieve original header blob. */
+		he->tag = RPMTAG_HEADERIMMUTABLE;
+		xx = headerGet(fi->h, he, 0);
+		uh = he->p.ptr;
+		if (xx && uh != NULL) {
+		    psm->oh = headerCopyLoad(uh);
+		    uh = _free(uh);
+		} else {
+		    he->tag = RPMTAG_HEADERIMAGE;
+		    xx = headerGet(fi->h, he, 0);
+		    uh = he->p.ptr;
+		    if (xx && uh != NULL) {
+			HeaderIterator hi;
+			Header oh;
+
+			/* Load the original header from the blob. */
+			oh = headerCopyLoad(uh);
+
+			/* XXX this is headerCopy w/o headerReload() */
+			psm->oh = headerNew();
+
+			for (hi = headerInit(oh);
+			     headerNext(hi, he, 0);
+			     he->p.ptr = _free(he->p.ptr))
+			{
+			    if (he->tag == RPMTAG_ARCHIVESIZE)
+				noArchiveSize = 1;
+			    xx = headerPut(psm->oh, he, 0);
+			}
+			hi = headerFini(hi);
+
+			(void)headerFree(oh);
+			oh = NULL;
+			uh = _free(uh);
+		    } else
+			break;	/* XXX shouldn't ever happen */
+		}
+	    }
+
+	    /* Retrieve type of payload compression. */
+	    /*@-nullstate@*/	/* FIX: psm->oh may be NULL */
+	    rc = rpmpsmNext(psm, PSM_RPMIO_FLAGS);
+	    /*@=nullstate@*/
+
+	    /* Write the lead section into the package. */
+	    {	static const char item[] = "Lead";
+		const char * NEVR = rpmteNEVR(psm->te);
+		size_t nb = rpmpkgSizeof(item, NULL);
+	
+		if (nb == 0)
+		    rc = RPMRC_FAIL;
+		else {
+		    void * l = alloca(nb);
+		    memset(l, 0, nb);
+		    rc = rpmpkgWrite(item, psm->fd, l, &NEVR);
+		}
+		if (rc != RPMRC_OK) {
+		    rpmlog(RPMLOG_ERR, _("Unable to write package: %s\n"),
+				Fstrerror(psm->fd));
+		    break;
+		}
+	    }
+
+	    /* Write the signature section into the package. */
+	    /* XXX rpm-4.1 and later has archive size in signature header. */
+	    {	static const char item[] = "Signature";
+		Header sigh = headerRegenSigHeader(fi->h, noArchiveSize);
+		/* Reallocate the signature into one contiguous region. */
+		sigh = headerReload(sigh, RPMTAG_HEADERSIGNATURES);
+		if (sigh == NULL) {
+		    rpmlog(RPMLOG_ERR, _("Unable to reload signature header\n"));
+		    rc = RPMRC_FAIL;
+		    break;
+		}
+		rc = rpmpkgWrite(item, psm->fd, sigh, NULL);
+		(void)headerFree(sigh);
+		sigh = NULL;
+		if (rc != RPMRC_OK) {
+		    break;
+		}
+	    }
+
+	    /* Add remove transaction id to header. */
+	    if (psm->oh != NULL)
+	    {	rpmuint32_t tid = rpmtsGetTid(ts);
+
+		he->tag = RPMTAG_REMOVETID;
+		he->t = RPM_UINT32_TYPE;
+		he->p.ui32p = &tid;
+		he->c = 1;
+		xx = headerPut(psm->oh, he, 0);
+
+		/* Add original header's origin/digest/stat (i.e. URL) */
+		if (origin != NULL) {
+		    he->tag = RPMTAG_PACKAGEORIGIN;
+		    he->t = RPM_STRING_TYPE;
+		    he->p.str = origin;
+		    he->c = 1;
+		    xx = headerPut(psm->oh, he, 0);
+		    origin = _free(origin);
+		}
+		if (digest != NULL) {
+		    he->tag = RPMTAG_PACKAGEDIGEST;
+		    he->t = RPM_STRING_TYPE;
+		    he->p.str = digest;
+		    he->c = 1;
+		    xx = headerPut(psm->oh, he, 0);
+		    digest = _free(digest);
+		}
+		if (st != NULL) {
+		    he->tag = RPMTAG_PACKAGESTAT;
+		    he->t = RPM_BIN_TYPE;
+		    he->p.ptr = (void *)st;
+		    he->c = (rpmTagCount)nstbytes;
+		    xx = headerPut(psm->oh, he, 0);
+		    st = _free(st);
+		}
+
+		/* Copy upgrade chain link tags. */
+		xx = hCopyTag(fi->h, psm->oh, RPMTAG_INSTALLTID);
+		xx = hCopyTag(fi->h, psm->oh, RPMTAG_BLINKPKGID);
+		xx = hCopyTag(fi->h, psm->oh, RPMTAG_BLINKHDRID);
+		xx = hCopyTag(fi->h, psm->oh, RPMTAG_BLINKNEVRA);
+
+assert(psm->te != NULL);
+		xx = hSaveFlinks(psm->oh, &psm->te->flink);
+	    }
+
+	    /* Write the metadata section into the package. */
+	    {	const char item[] = "Header";
+		const char * msg = NULL;
+		rc = rpmpkgWrite(item, psm->fd, psm->oh, &msg);
+		if (rc != RPMRC_OK) {
+		    rpmlog(RPMLOG_ERR, "%s: %s: %s", psm->pkgfn, item,
+			(msg && *msg ? msg : "write failed\n"));
+		    msg = _free(msg);
+		}
+	    }
+	}
+	break;
+    case PSM_PROCESS:
+	if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)	break;
+
+	if (psm->goal == PSM_PKGINSTALL) {
+
+	    if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB)	break;
+
+	    /* XXX Synthesize callbacks for packages with no files. */
+	    if (rpmfiFC(fi) <= 0) {
+		void * ptr;
+		ptr = rpmtsNotify(ts, fi->te, RPMCALLBACK_INST_START, 0, 100);
+		ptr = rpmtsNotify(ts, fi->te, RPMCALLBACK_INST_PROGRESS, 100, 100);
+		break;
+	    }
+
+	    /* Retrieve type of payload compression. */
+	    rc = rpmpsmNext(psm, PSM_RPMIO_FLAGS);
+
+	    if (rpmteFd(fi->te) == NULL) {	/* XXX can't happen */
+		rc = RPMRC_FAIL;
+		break;
+	    }
+
+	    /*@-nullpass@*/	/* LCL: fi->fd != NULL here. */
+	    psm->cfd = Fdopen(fdDup(Fileno(rpmteFd(fi->te))), psm->rpmio_flags);
+	    /*@=nullpass@*/
+	    if (psm->cfd == NULL) {	/* XXX can't happen */
+		rc = RPMRC_FAIL;
+		break;
+	    }
+
+	    xx = rpmtxnBegin(rpmtsGetRdb(ts), psm->te->txn, NULL);
+
+	    rc = fsmSetup(fi->fsm, IOSM_PKGINSTALL, psm->payload_format, ts, fi,
+			psm->cfd, NULL, &psm->failedFile);
+	    (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_UNCOMPRESS),
+			fdstat_op(psm->cfd, FDSTAT_READ));
+	    (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST),
+			fdstat_op(psm->cfd, FDSTAT_DIGEST));
+	    xx = fsmTeardown(fi->fsm);
+
+	    saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
+	    xx = Fclose(psm->cfd);
+	    psm->cfd = NULL;
+	    /*@-mods@*/
+	    errno = saveerrno; /* XXX FIXME: Fclose with libio destroys errno */
+	    /*@=mods@*/
+
+	    if (!rc)
+		rc = rpmpsmNext(psm, PSM_COMMIT);
+
+	    /* Commit/abort the SRPM install transaction. */
+	    /* XXX move into the PSM package state machine w PSM_COMMIT */
+	{   rpmdb db = rpmtsGetRdb(ts);
+	    rpmtxn _txn = (db ? db->db_txn : NULL);
+	    if (_txn != NULL) {
+		if (rc)
+		    xx = rpmtxnAbort(_txn);
+		else
+		    xx = rpmtxnCommit(_txn);
+		db->db_txn = NULL;
+	    }
+	}
+
+	    /* XXX make sure progress is closed out */
+	    psm->what = RPMCALLBACK_INST_PROGRESS;
+	    psm->amount = (fi->archiveSize ? fi->archiveSize : 100);
+	    psm->total = psm->amount;
+	    xx = rpmpsmNext(psm, PSM_NOTIFY);
+
+	    if (rc) {
+		const char * msg = iosmStrerror(rc);
+		rpmlog(RPMLOG_ERR,
+			_("unpacking of archive failed%s%s: %s\n"),
+			(psm->failedFile != NULL ? _(" on file ") : ""),
+			(psm->failedFile != NULL ? psm->failedFile : ""),
+			msg);
+		msg = _free(msg);
+		rc = RPMRC_FAIL;
+
+		/* XXX notify callback on error. */
+		psm->what = RPMCALLBACK_UNPACK_ERROR;
+		psm->amount = 0;
+		psm->total = 0;
+		xx = rpmpsmNext(psm, PSM_NOTIFY);
+
+		break;
+	    }
+	}
+	if (psm->goal == PSM_PKGERASE) {
+	    int fc = rpmfiFC(fi);
+
+	    if (rpmtsFlags(ts) & RPMTRANS_FLAG_JUSTDB)	break;
+	    if (rpmtsFlags(ts) & RPMTRANS_FLAG_APPLYONLY)	break;
+
+	    psm->what = RPMCALLBACK_UNINST_START;
+	    psm->amount = fc;
+	    psm->total = (fc ? fc : 100);
+	    xx = rpmpsmNext(psm, PSM_NOTIFY);
+
+	    if (fc > 0) {
+		rc = fsmSetup(fi->fsm, IOSM_PKGERASE, psm->payload_format, ts, fi,
+			NULL, NULL, &psm->failedFile);
+		xx = fsmTeardown(fi->fsm);
+	    }
+
+	    psm->what = RPMCALLBACK_UNINST_STOP;
+	    psm->amount = (fc ? fc : 100);
+	    psm->total = (fc ? fc : 100);
+	    xx = rpmpsmNext(psm, PSM_NOTIFY);
+
+	}
+	if (psm->goal == PSM_PKGSAVE) {
+	    iosmFileAction * actions = (iosmFileAction *) fi->actions;
+	    iosmFileAction action = (iosmFileAction) fi->action;
+
+	    fi->action = FA_COPYOUT;
+	    fi->actions = NULL;
+
+	    if (psm->fd == NULL) {	/* XXX can't happen */
+		rc = RPMRC_FAIL;
+		break;
+	    }
+	    /*@-nullpass@*/	/* FIX: fdDup mey return NULL. */
+	    xx = Fflush(psm->fd);
+	    psm->cfd = Fdopen(fdDup(Fileno(psm->fd)), psm->rpmio_flags);
+	    /*@=nullpass@*/
+	    if (psm->cfd == NULL) {	/* XXX can't happen */
+		rc = RPMRC_FAIL;
+		break;
+	    }
+
+	    rc = fsmSetup(fi->fsm, IOSM_PKGBUILD, psm->payload_format, ts, fi,
+			psm->cfd, NULL, &psm->failedFile);
+	    (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_COMPRESS),
+			fdstat_op(psm->cfd, FDSTAT_WRITE));
+	    (void) rpmswAdd(rpmtsOp(ts, RPMTS_OP_DIGEST),
+			fdstat_op(psm->cfd, FDSTAT_DIGEST));
+	    xx = fsmTeardown(fi->fsm);
+
+	    saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
+	    xx = Fclose(psm->cfd);
+	    psm->cfd = NULL;
+	    /*@-mods@*/
+	    errno = saveerrno;
+	    /*@=mods@*/
+
+	    /* XXX make sure progress is closed out */
+	    psm->what = RPMCALLBACK_INST_PROGRESS;
+	    psm->amount = (fi->archiveSize ? fi->archiveSize : 100);
+	    psm->total = psm->amount;
+	    xx = rpmpsmNext(psm, PSM_NOTIFY);
+
+	    fi->action = (int) action;
+	    fi->actions = (int *) actions;
+	}
+	break;
+    case PSM_POST:
+	if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)	break;
+
+	if (psm->goal == PSM_PKGINSTALL) {
+
+	    psm->scriptTag = RPMTAG_POSTIN;
+	    psm->progTag = RPMTAG_POSTINPROG;
+	    psm->sense = RPMSENSE_TRIGGERIN;
+	    psm->countCorrection = 0;
+
+	    if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOST)) {
+		rc = rpmpsmNext(psm, PSM_SCRIPT);
+		if (rc) break;
+	    }
+	    if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERIN)) {
+		/* Run triggers in other package(s) this package sets off. */
+		rc = rpmpsmNext(psm, PSM_TRIGGERS);
+		if (rc) break;
+
+		/* Run triggers in this package other package(s) set off. */
+		rc = rpmpsmNext(psm, PSM_IMMED_TRIGGERS);
+		if (rc) break;
+	    }
+
+	    /*
+	     * If this header has already been installed, remove it from
+	     * the database before adding the new header.
+	     */
+	    if (fi->record && !(rpmtsFlags(ts) & RPMTRANS_FLAG_APPLYONLY)) {
+		rc = rpmpsmNext(psm, PSM_RPMDB_REMOVE);
+		if (rc) break;
+	    }
+
+	    /* Add scriptlet/file states to install header. */
+	    xx = postPopulateInstallHeader(ts, psm, fi);
+
+	    rc = rpmpsmNext(psm, PSM_RPMDB_ADD);
+	    if (rc) break;
+
+#ifdef	DYING
+	    if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_APPLYONLY))
+		rc = markReplacedFiles(psm);
+#endif
+
+	}
+	if (psm->goal == PSM_PKGERASE) {
+
+	    psm->scriptTag = RPMTAG_POSTUN;
+	    psm->progTag = RPMTAG_POSTUNPROG;
+	    psm->sense = RPMSENSE_TRIGGERPOSTUN;
+	    psm->countCorrection = -1;
+
+	    if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOPOSTUN)) {
+		rc = rpmpsmNext(psm, PSM_SCRIPT);
+		if (rc) break;
+	    }
+
+	    if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_NOTRIGGERPOSTUN)) {
+		/* Run triggers in other package(s) this package sets off. */
+		rc = rpmpsmNext(psm, PSM_TRIGGERS);
+		if (rc) break;
+
+		/* Run triggers in this package other package(s) set off. */
+		rc = rpmpsmNext(psm, PSM_IMMED_TRIGGERS);
+		if (rc) break;
+	    }
+
+	    if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_APPLYONLY))
+		rc = rpmpsmNext(psm, PSM_RPMDB_REMOVE);
+	}
+	if (psm->goal == PSM_PKGSAVE) {
+	}
+
+	/* Restore root directory if changed. */
+	xx = rpmpsmNext(psm, PSM_CHROOT_OUT);
+	break;
+    case PSM_UNDO:
+	break;
+    case PSM_FINI:
+	/* Restore root directory if changed. */
+	xx = rpmpsmNext(psm, PSM_CHROOT_OUT);
+
+	if (psm->fd != NULL) {
+	    saveerrno = errno; /* XXX FIXME: Fclose with libio destroys errno */
+	    xx = Fclose(psm->fd);
+	    psm->fd = NULL;
+	    /*@-mods@*/
+	    errno = saveerrno;
+	    /*@=mods@*/
+	}
+
+	if (psm->goal == PSM_PKGSAVE) {
+	    if (!rc && ts && ts->notify == NULL) {
+		rpmlog(RPMLOG_INFO, _("Wrote: %s\n"),
+			(psm->pkgURL ? psm->pkgURL : "???"));
+	    }
+	}
+
+	if (rc) {
+	    const char * msg = iosmStrerror(rc);
+	    if (psm->failedFile)
+		rpmlog(RPMLOG_ERR,
+			_("%s failed on file %s: %s\n"),
+			psm->stepName, psm->failedFile, msg);
+	    else
+		rpmlog(RPMLOG_ERR, _("%s failed: %s\n"),
+			psm->stepName, msg);
+	    msg = _free(msg);
+
+	    /* XXX notify callback on error. */
+	    psm->what = RPMCALLBACK_CPIO_ERROR;
+	    psm->amount = 0;
+	    psm->total = 0;
+	    /*@-nullstate@*/ /* FIX: psm->fd may be NULL. */
+	    xx = rpmpsmNext(psm, PSM_NOTIFY);
+	    /*@=nullstate@*/
+	    if (psm->te->txn != NULL) {
+		xx = rpmtxnAbort(psm->te->txn);
+		psm->te->txn = NULL;
+	    }
+	} else {
+	    if (psm->te->txn != NULL) {
+		xx = rpmtxnCommit(psm->te->txn);
+		psm->te->txn = NULL;
+	    }
+	}
+
+	if (psm->goal == PSM_PKGERASE || psm->goal == PSM_PKGSAVE) {
+	    if (psm->te != NULL)
+		(void) rpmteSetHeader(psm->te, NULL);
+	    if (fi->h != NULL) {
+		(void)headerFree(fi->h);
+		fi->h = NULL;
+	    }
+ 	}
+	(void)headerFree(psm->oh);
+	psm->oh = NULL;
+	psm->pkgURL = _free(psm->pkgURL);
+	psm->rpmio_flags = _free(psm->rpmio_flags);
+	psm->payload_format = _free(psm->payload_format);
+	psm->failedFile = _free(psm->failedFile);
+
+	fi->fgroup = _free(fi->fgroup);
+	fi->fuser = _free(fi->fuser);
+	fi->apath = _free(fi->apath);
+	fi->fstates = _free(fi->fstates);
+	break;
+
+    case PSM_PKGINSTALL:
+    case PSM_PKGERASE:
+    case PSM_PKGSAVE:
+	psm->goal = stage;
+	psm->rc = RPMRC_OK;
+	psm->stepName = pkgStageString(stage);
+
+	rc = rpmpsmNext(psm, PSM_INIT);
+	if (!rc) rc = rpmpsmNext(psm, PSM_PRE);
+	if (!rc) rc = rpmpsmNext(psm, PSM_PROCESS);
+	if (!rc) rc = rpmpsmNext(psm, PSM_POST);
+	xx = rpmpsmNext(psm, PSM_FINI);
+	break;
+    case PSM_PKGCOMMIT:
+	break;
+
+    case PSM_CREATE:
+	break;
+    case PSM_NOTIFY:
+    {	void * ptr;
+/*@-nullpass@*/ /* FIX: psm->te may be NULL */
+	ptr = rpmtsNotify(ts, psm->te, psm->what, psm->amount, psm->total);
+/*@-nullpass@*/
+    }	break;
+    case PSM_DESTROY:
+	break;
+    case PSM_COMMIT:
+	if (!(rpmtsFlags(ts) & RPMTRANS_FLAG_PKGCOMMIT)) break;
+	if (rpmtsFlags(ts) & RPMTRANS_FLAG_APPLYONLY) break;
+
+	rc = fsmSetup(fi->fsm, IOSM_PKGCOMMIT, psm->payload_format, ts, fi,
+			NULL, NULL, &psm->failedFile);
+	xx = fsmTeardown(fi->fsm);
+	break;
+
+    case PSM_CHROOT_IN:
+    {	const char * rootDir = rpmtsRootDir(ts);
+	/* Change root directory if requested and not already done. */
+	if (rootDir != NULL && !(rootDir[0] == '/' && rootDir[1] == '\0')
+	 && !rpmtsChrootDone(ts) && !F_ISSET(psm, CHROOTDONE))
+	{
+	    static int _pw_loaded = 0;
+	    static int _gr_loaded = 0;
+
+	    if (!_pw_loaded) {
+		(void)getpwnam("root");
+		endpwent();
+		_pw_loaded++;
+	    }
+	    if (!_gr_loaded) {
+		(void)getgrnam("root");
+		endgrent();
+		_gr_loaded++;
+	    }
+
+	    xx = Chdir("/");
+	    /*@-modobserver@*/
+	    if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
+		rc = Chroot(rootDir);
+	    /*@=modobserver@*/
+	    F_SET(psm, CHROOTDONE);
+	    (void) rpmtsSetChrootDone(ts, 1);
+	}
+    }	break;
+    case PSM_CHROOT_OUT:
+	/* Restore root directory if changed. */
+	if (F_ISSET(psm, CHROOTDONE)) {
+	    const char * rootDir = rpmtsRootDir(ts);
+	    const char * currDir = rpmtsCurrDir(ts);
+	    /*@-modobserver@*/
+	    if (rootDir != NULL && strcmp(rootDir, "/") && *rootDir == '/')
+		rc = Chroot(".");
+	    /*@=modobserver@*/
+	    F_CLR(psm, CHROOTDONE);
+	    (void) rpmtsSetChrootDone(ts, 0);
+	    if (currDir != NULL)	/* XXX can't happen */
+		xx = Chdir(currDir);
+	}
+	break;
+    case PSM_SCRIPT:	/* Run current package scriptlets. */
+	/* XXX running %verifyscript/%sanitycheck doesn't have psm->te */
+    {	rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL);
+
+	rc = rpmpsmNext(psm, PSM_CHROOT_OUT);
+
+	xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL);
+	rc = runInstScript(psm);
+	if (rc)
+	     xx = rpmtxnAbort(rpmtsGetRdb(ts)->db_txn);
+	else
+	     xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
+	rpmtsGetRdb(ts)->db_txn = NULL;
+	rc = rpmpsmNext(psm, PSM_CHROOT_IN);
+    }	break;
+    case PSM_TRIGGERS:
+	/* Run triggers in other package(s) this package sets off. */
+	if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)	break;
+	rc = runTriggers(psm);
+	break;
+    case PSM_IMMED_TRIGGERS:
+	/* Run triggers in this package other package(s) set off. */
+	if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)	break;
+	if (!F_ISSET(psm, GOTTRIGGERS)) {
+	    psm->triggers = rpmdsNew(fi->h, RPMTAG_TRIGGERNAME, 0);
+	    F_SET(psm, GOTTRIGGERS);
+	}
+	if (psm->triggers != NULL)
+	    rc = runImmedTriggers(psm);
+	break;
+
+    case PSM_RPMIO_FLAGS:
+    {	const char * payload_compressor = NULL;
+	const char * payload_format = NULL;
+	char * t;
+
+	he->tag = RPMTAG_PAYLOADCOMPRESSOR;
+	xx = headerGet(fi->h, he, 0);
+	payload_compressor = he->p.str;
+	if (payload_compressor == NULL)
+	    payload_compressor = xstrdup("gzip");
+
+	psm->rpmio_flags = t = xmalloc(sizeof("w9.gzdio"));
+	*t = '\0';
+	t = stpcpy(t, ((psm->goal == PSM_PKGSAVE) ? "w9" : "r"));
+	if (!strcmp(payload_compressor, "gzip"))
+	    t = stpcpy(t, ".gzdio");
+	if (!strcmp(payload_compressor, "bzip2"))
+	    t = stpcpy(t, ".bzdio");
+	if (!strcmp(payload_compressor, "lzma"))
+	    t = stpcpy(t, ".lzdio");
+	if (!strcmp(payload_compressor, "xz"))
+	    t = stpcpy(t, ".xzdio");
+	payload_compressor = _free(payload_compressor);
+
+	he->tag = RPMTAG_PAYLOADFORMAT;
+	xx = headerGet(fi->h, he, 0);
+	payload_format = he->p.str;
+	if (!xx || payload_format == NULL || !(
+	  !strcmp(payload_format, "tar") || !strcmp(payload_format, "ustar")
+#if defined(SUPPORT_AR_PAYLOADS)
+	 || !strcmp(payload_format, "ar")
+#endif
+	   ))
+	{
+	    payload_format = _free(payload_format);
+	    payload_format = xstrdup("cpio");
+	}
+	psm->payload_format = _free(psm->payload_format);
+	psm->payload_format = payload_format;
+	rc = RPMRC_OK;
+    }	break;
+
+    case PSM_RPMDB_LOAD:
+assert(psm->mi == NULL);
+	psm->mi = rpmtsInitIterator(ts, RPMDBI_PACKAGES,
+				&fi->record, sizeof(fi->record));
+	fi->h = rpmmiNext(psm->mi);
+/*@-castexpose@*/
+	if (fi->h != NULL)
+	    fi->h = headerLink(fi->h);
+/*@=castexpose@*/
+	psm->mi = rpmmiFree(psm->mi);
+
+	if (fi->h != NULL) {
+	    (void) headerSetInstance(fi->h, fi->record);
+	    rc = RPMRC_OK;
+	} else
+	    rc = RPMRC_FAIL;
+	break;
+    case PSM_RPMDB_ADD:
+	if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)	break;
+	if (rpmtsFlags(ts) & RPMTRANS_FLAG_NORPMDB)	break;
+	if (fi->isSource)	break;	/* XXX never add SRPM's */
+	if (fi->h == NULL)	break;	/* XXX can't happen */
+
+	xx = rpmtxnBegin(rpmtsGetRdb(ts), psm->te->txn, NULL);
+
+	/* Add header to db, doing header check if requested */
+	/* XXX rollback headers propagate the previous transaction id. */
+	{   rpmuint32_t tid = ((rpmtsType(ts) == RPMTRANS_TYPE_ROLLBACK)
+		? hLoadTID(fi->h, RPMTAG_INSTALLTID) : rpmtsGetTid(ts));
+	    (void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_DBADD), 0);
+	    if (!(rpmtsVSFlags(ts) & RPMVSF_NOHDRCHK))
+		rc = rpmdbAdd(rpmtsGetRdb(ts), tid, fi->h, ts);
+	    else
+		rc = rpmdbAdd(rpmtsGetRdb(ts), tid, fi->h, NULL);
+	    (void) rpmswExit(rpmtsOp(ts, RPMTS_OP_DBADD), 0);
+	}
+
+	if (rc != RPMRC_OK) {
+	    xx = rpmtxnAbort(rpmtsGetRdb(ts)->db_txn);
+	    rpmtsGetRdb(ts)->db_txn = NULL;
+	    break;
+	} else
+	    xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
+	rpmtsGetRdb(ts)->db_txn = NULL;
+
+assert(psm->te != NULL);
+	/* Mark non-rollback elements as installed. */
+	if (rpmtsType(ts) != RPMTRANS_TYPE_ROLLBACK)
+	    psm->te->installed = 1;
+
+	/* Set the database instance for (possible) rollbacks. */
+	rpmteSetDBInstance(psm->te, headerGetInstance(fi->h));
+
+	break;
+    case PSM_RPMDB_REMOVE:
+    {	
+	if (rpmtsFlags(ts) & RPMTRANS_FLAG_TEST)	break;
+	if (rpmtsFlags(ts) & RPMTRANS_FLAG_NORPMDB)	break;
+
+	xx = rpmtxnBegin(rpmtsGetRdb(ts), psm->te->txn, NULL);
+
+	(void) rpmswEnter(rpmtsOp(ts, RPMTS_OP_DBREMOVE), 0);
+	rc = rpmdbRemove(rpmtsGetRdb(ts), rpmtsGetTid(ts), fi->record, NULL);
+	(void) rpmswExit(rpmtsOp(ts, RPMTS_OP_DBREMOVE), 0);
+
+	if (rc != RPMRC_OK) {
+	    xx = rpmtxnAbort(rpmtsGetRdb(ts)->db_txn);
+	    rpmtsGetRdb(ts)->db_txn = NULL;
+	    break;
+	} else
+	    xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
+	rpmtsGetRdb(ts)->db_txn = NULL;
+
+	/* Forget the offset of a successfully removed header. */
+	if (psm->te != NULL)	/* XXX can't happen */
+	    psm->te->u.removed.dboffset = 0;
+
+    }	break;
+
+    default:
+	break;
+/*@i@*/    }
+
+/*@-nullstate@*/	/* FIX: psm->oh and psm->fi->h may be NULL. */
+    return rc;
+/*@=nullstate@*/
+}
+/*@=nullpass@*/
diff --git a/meta/recipes-devtools/rpm/rpm/hacktastic.patch b/meta/recipes-devtools/rpm/rpm/hacktastic.patch
new file mode 100644
index 0000000..de4abcb
--- /dev/null
+++ b/meta/recipes-devtools/rpm/rpm/hacktastic.patch
@@ -0,0 +1,62 @@
+Index: rpm-5.4.0/lib/psm.c
+===================================================================
+--- rpm-5.4.0.orig/lib/psm.c	2011-11-08 00:52:35.732425242 +0000
++++ rpm-5.4.0/lib/psm.c	2011-11-08 00:51:08.000000000 +0000
+@@ -929,11 +929,11 @@
+ 	xx = Fclose(fd);
+ 
+ 	{   const char * sn = fn;
+-	    if (!rpmtsChrootDone(ts) && rootDir != NULL &&
+-		!(rootDir[0] == '/' && rootDir[1] == '\0'))
+-	    {
+-		sn += strlen(rootDir)-1;
+-	    }
++//	    if (!rpmtsChrootDone(ts) && rootDir != NULL &&
++//		!(rootDir[0] == '/' && rootDir[1] == '\0'))
++//	    {
++//		sn += strlen(rootDir)-1;
++//	    }
+ 	    argv[argc++] = sn;
+ 	}
+ 
+@@ -1050,20 +1050,14 @@
+ 	}
+ 
+ 	{   const char * rootDir = rpmtsRootDir(ts);
+-	    if (!rpmtsChrootDone(ts) && rootDir != NULL &&
+-		!(rootDir[0] == '/' && rootDir[1] == '\0'))
+-	    {
+-		/*@-modobserver@*/
+-		xx = Chroot(rootDir);
+-		/*@=modobserver@*/
+-	    }
+-	    xx = Chdir("/");
++        xx = Chdir(rootDir);
+ 	    rpmlog(RPMLOG_DEBUG, D_("%s: %s(%s)\texecv(%s) pid %d\n"),
+ 			psm->stepName, sln, NVRA,
+ 			argv[0], (unsigned)getpid());
+ 
+ 	    /* XXX Don't mtrace into children. */
+ 	    unsetenv("MALLOC_CHECK_");
++	    setenv("D", rootDir, 0);
+ 
+ 	    if (ssp != NULL)
+ 		*ssp |= RPMSCRIPT_STATE_EXEC;
+@@ -2961,6 +2955,9 @@
+     case PSM_SCRIPT:	/* Run current package scriptlets. */
+ 	/* XXX running %verifyscript/%sanitycheck doesn't have psm->te */
+     {	rpmtxn _parent = (psm && psm->te ? psm->te->txn : NULL);
++
++	rc = rpmpsmNext(psm, PSM_CHROOT_OUT);
++
+ 	xx = rpmtxnBegin(rpmtsGetRdb(ts), _parent, NULL);
+ 	rc = runInstScript(psm);
+ 	if (rc)
+@@ -2968,6 +2965,7 @@
+ 	else
+ 	     xx = rpmtxnCommit(rpmtsGetRdb(ts)->db_txn);
+ 	rpmtsGetRdb(ts)->db_txn = NULL;
++	rc = rpmpsmNext(psm, PSM_CHROOT_IN);
+     }	break;
+     case PSM_TRIGGERS:
+ 	/* Run triggers in other package(s) this package sets off. */
diff --git a/meta/recipes-devtools/rpm/rpm_5.4.0.bb b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
index bbef0be..000af23 100644
--- a/meta/recipes-devtools/rpm/rpm_5.4.0.bb
+++ b/meta/recipes-devtools/rpm/rpm_5.4.0.bb
@@ -45,7 +45,7 @@ LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
 DEPENDS = "bzip2 zlib db openssl elfutils expat libpcre attr acl popt ${extrarpmdeps}"
 extrarpmdeps = "python perl"
 extrarpmdeps_virtclass-native = "file-native"
-PR = "r22"
+PR = "r23"
 
 # rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
 # in order to extract the distribution SRPM into a format we can extract...
@@ -64,6 +64,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.0-0.20101229.src.rpm;ex
 	   file://rpm-canonarch.patch \
 	   file://rpm-no-loopmsg.patch \
 	   file://pythondeps.sh \
+	   file://hacktastic.patch \
 	  "
 
 #	   file://rpm-autoconf.patch \
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 28/33] bitbake.conf: Unload pseudo when its not required for a given task
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (26 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 27/33] hacktastic patch to fix adduser under rpm Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 29/33] scripts/qemuimage-testlib: Output a slightly better error if expect is missing Saul Wold
                   ` (5 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

This yields a small performance boost due to the lack of the
preload overhead on each task execution.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/conf/bitbake.conf |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index d405b6a..44b8f31 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -586,6 +586,7 @@ export PSEUDO_DISABLED = "1"
 #export PSEUDO_BINDIR = "${STAGING_DIR_NATIVE}${bindir_native}"
 #export PSEUDO_LIBDIR = "${STAGING_DIR_NATIVE}$PSEUDOBINDIR/../lib/pseudo/lib
 FAKEROOTENV = "PSEUDO_PREFIX=${STAGING_DIR_NATIVE}${prefix_native} PSEUDO_LOCALSTATEDIR=${PSEUDO_LOCALSTATEDIR} PSEUDO_PASSWD=${STAGING_DIR_TARGET} PSEUDO_NOSYMLINKEXP=1 PSEUDO_DISABLED=0"
+FAKEROOTNOENV = "PSEUDO_UNLOAD=1"
 FAKEROOTDIRS = "${PSEUDO_LOCALSTATEDIR}"
 PREFERRED_PROVIDER_virtual/fakeroot-native ?= "pseudo-native"
 
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 29/33] scripts/qemuimage-testlib: Output a slightly better error if expect is missing
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (27 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 28/33] bitbake.conf: Unload pseudo when its not required for a given task Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 30/33] classes: Remove various bashisms Saul Wold
                   ` (4 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 scripts/qemuimage-testlib |   14 ++++++++++++++
 1 files changed, 14 insertions(+), 0 deletions(-)

diff --git a/scripts/qemuimage-testlib b/scripts/qemuimage-testlib
index 6a1b900..d0d1b74 100644
--- a/scripts/qemuimage-testlib
+++ b/scripts/qemuimage-testlib
@@ -96,6 +96,13 @@ expect {
     eof          { exit [ lindex [wait] 3 ] }
 }
 EOF`
+
+	expect=`which expect`
+	if [ ! -x "$expect" ]; then
+		Test_Error "ERROR: Please install expect"
+		return 1
+	fi
+
 	expect -c "$exp_cmd"
 	ret=$?
 	rm -rf $tmpfile
@@ -120,6 +127,13 @@ expect {
     eof          { exit [ lindex [wait] 3 ] }
 }
 EOF`
+
+	expect=`which expect`
+	if [ ! -x "$expect" ]; then
+		Test_Error "ERROR: Please install expect"
+		return 1
+	fi
+
 	expect -c "$exp_cmd"
 	ret=$?
 	rm -rf $tmpfile
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 30/33] classes: Remove various bashisms
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (28 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 29/33] scripts/qemuimage-testlib: Output a slightly better error if expect is missing Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 31/33] Allow use of dash as /bin/sh Saul Wold
                   ` (3 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/image-prelink.bbclass |    2 +-
 meta/classes/kernel.bbclass        |    2 +-
 meta/classes/package_rpm.bbclass   |   18 +++++++++---------
 3 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/meta/classes/image-prelink.bbclass b/meta/classes/image-prelink.bbclass
index 350c29d..53ef47e 100644
--- a/meta/classes/image-prelink.bbclass
+++ b/meta/classes/image-prelink.bbclass
@@ -24,7 +24,7 @@ prelink_image () {
 	${STAGING_DIR_NATIVE}${sbindir_native}/prelink --root ${IMAGE_ROOTFS} -amR -N -c ${sysconfdir}/prelink.conf
 
 	# Remove the prelink.conf if we had to add it.
-	if [ "$dummy_prelink_conf" == "true" ]; then
+	if [ "$dummy_prelink_conf" = "true" ]; then
 		rm -f ${IMAGE_ROOTFS}${sysconfdir}/prelink.conf
 	fi
 
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index 42543e0..dc711f2 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -152,7 +152,7 @@ kernel_do_install() {
 	#
 	cp -fR * $kerneldir
 	cp .config $kerneldir
-	if [ ! "${S}" == "${B}" ]; then
+	if [ "${S}" != "${B}" ]; then
 		cp -fR ${S}/* $kerneldir
 	fi
 	install -m 0644 ${KERNEL_OUTPUT} $kerneldir/${KERNEL_IMAGETYPE}
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index c01863e..f122c70 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -87,22 +87,22 @@ package_generate_rpm_conf_common() {
 	shift
 
 	printf "_solve_dbpath " > ${rpmconf_base}.macro
-	o_colon=false
+	o_colon="false"
 
 	for archvar in "$@"; do
 		printf "_solve_dbpath " > ${rpmconf_base}-${archvar}.macro
-		colon=false
+		colon="false"
 		for each in `cat ${rpmconf_base}-${archvar}.conf` ; do
-			if [ "$o_colon" == true ]; then
+			if [ "$o_colon" = "true" ]; then
 				printf ":" >> ${rpmconf_base}.macro
 			fi
-			if [ "$colon" == true ]; then
+			if [ "$colon" = "true" ]; then
 				printf ":" >> ${rpmconf_base}-${archvar}.macro
 			fi
 			printf "%s" $each >> ${rpmconf_base}.macro
-			o_colon=true
+			o_colon="true"
 			printf "%s" $each >> ${rpmconf_base}-${archvar}.macro
-			colon=true
+			colon="true"
 		done
 		printf "\n" >> ${rpmconf_base}-${archvar}.macro
 	done
@@ -214,7 +214,7 @@ package_install_internal_rpm () {
 				ml_prefix=`echo ${pkg} | cut -d'-' -f1`
 				ml_pkg=$pkg
 				for i in ${MULTILIB_PREFIX_LIST} ; do
-					if [ ${ml_prefix} == ${i} ]; then
+					if [ ${ml_prefix} = ${i} ]; then
 						ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
 						archvar=ml_archs
 						manifest=install_multilib.manifest
@@ -240,7 +240,7 @@ package_install_internal_rpm () {
 			ml_prefix=`echo ${pkg} | cut -d'-' -f1`
 			ml_pkg=$pkg
 			for i in ${MULTILIB_PREFIX_LIST} ; do
-				if [ ${ml_prefix} == ${i} ]; then
+				if [ ${ml_prefix} = ${i} ]; then
 					ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
 					archvar=ml_archs
 					manifest=install_multilib.manifest
@@ -276,7 +276,7 @@ package_install_internal_rpm () {
 			ml_prefix=`echo ${pkg} | cut -d'-' -f1`
 			ml_pkg=$pkg
 			for i in ${MULTILIB_PREFIX_LIST} ; do
-				if [ ${ml_prefix} == ${i} ]; then
+				if [ ${ml_prefix} = ${i} ]; then
 					ml_pkg=$(echo ${pkg} | sed "s,^${ml_prefix}-\(.*\),\1,")
 					archvar=ml_archs
 					break
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 31/33] Allow use of dash as /bin/sh
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (29 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 30/33] classes: Remove various bashisms Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 32/33] qemu: Ensure an internal qemugl script uses bash as it has bashisms Saul Wold
                   ` (2 subsequent siblings)
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

We've had the check for dash as /bin/sh for a long time. Dash has been
around long enough now that most major issues have been identified and
fixed from  build perspective.

This patch fixes a bashism in the openjade-native recipe. It also
adjusts libtool so that the header at the script is used and not the
value of $SHELL. This is because many Makefiles change $SHELL so dash
can get used to execute what is otherwise configured as a bash shell
script. Since we don't need to execute scripts this way on any system I'm
aware of us building upon, the simplest fix is just to remove $SHELL.

With these two changes the dash check can be removed and we can allow
builds with dash as /bin/sh

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

[Note: I know I need to add the description of the libtool change above
into the prefix.patch]
---
 meta/classes/sanity.bbclass                        |    3 ---
 meta/recipes-devtools/libtool/libtool/prefix.patch |   11 ++++++++++-
 .../openjade/openjade-native_1.3.2.bb              |    4 +++-
 3 files changed, 13 insertions(+), 5 deletions(-)

diff --git a/meta/classes/sanity.bbclass b/meta/classes/sanity.bbclass
index 3f42b4f..838448f 100644
--- a/meta/classes/sanity.bbclass
+++ b/meta/classes/sanity.bbclass
@@ -331,9 +331,6 @@ def check_sanity(e):
     if not data.getVar( 'DISPLAY', e.data, True ) and data.getVar( 'IMAGETEST', e.data, True ) == 'qemu':
         messages = messages + 'qemuimagetest needs a X desktop to start qemu, please set DISPLAY correctly (e.g. DISPLAY=:1.0)\n'
 
-    if os.path.basename(os.readlink('/bin/sh')) == 'dash':
-        messages = messages + "Using dash as /bin/sh causes various subtle build problems, please use bash instead (e.g. 'dpkg-reconfigure dash' on an Ubuntu system.\n"
-
     omask = os.umask(022)
     if omask & 0755:
         messages = messages + "Please use a umask which allows a+rx and u+rwx\n"
diff --git a/meta/recipes-devtools/libtool/libtool/prefix.patch b/meta/recipes-devtools/libtool/libtool/prefix.patch
index 1b20324..e6eca1f 100644
--- a/meta/recipes-devtools/libtool/libtool/prefix.patch
+++ b/meta/recipes-devtools/libtool/libtool/prefix.patch
@@ -8,6 +8,15 @@ Originally by: RP
 Updated: Date: 2010/06/28
 Nitin A Kamble <nitin.a.kamble@intel.com>
 
+It also adjusts libtool so that the header at the script is used for 
+script execution and not thevalue of $SHELL. This is because many 
+Makefiles change $SHELL so dash can get used to execute what is 
+otherwise configured as a bash shell script. Since we don't need to 
+execute scipts this way on any system I'm aware of us building upon, 
+the simplest fix is just to remove $SHELL.
+
+Updated: Date: 2011/11/09
+RP
 
 Index: libtool-2.4/libltdl/m4/libtool.m4
 ===================================================================
@@ -18,7 +27,7 @@ Index: libtool-2.4/libltdl/m4/libtool.m4
  
  # Always use our own libtool.
 -LIBTOOL='$(SHELL) $(top_builddir)/libtool'
-+LIBTOOL='$(SHELL) $(top_builddir)'
++LIBTOOL='$(top_builddir)'
 +LIBTOOL="$LIBTOOL/${host_alias}-libtool"
  AC_SUBST(LIBTOOL)dnl
  
diff --git a/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb b/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
index 6cc6bb5..0cce46e 100644
--- a/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
+++ b/meta/recipes-devtools/openjade/openjade-native_1.3.2.bb
@@ -53,7 +53,9 @@ do_install() {
 
 	install -d ${D}${datadir}/sgml/openjade-${PV}
 	install -m 644 dsssl/catalog ${D}${datadir}/sgml/openjade-${PV}
-	install -m 644 dsssl/*.{dtd,dsl,sgm} ${D}${datadir}/sgml/openjade-${PV}
+	install -m 644 dsssl/*.dtd ${D}${datadir}/sgml/openjade-${PV}
+	install -m 644 dsssl/*.dsl ${D}${datadir}/sgml/openjade-${PV}
+	install -m 644 dsssl/*.sgm ${D}${datadir}/sgml/openjade-${PV}
 
 	install -d ${datadir}/sgml/openjade-${PV}
 	install -m 644 dsssl/catalog ${datadir}/sgml/openjade-${PV}/catalog
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 32/33] qemu: Ensure an internal qemugl script uses bash as it has bashisms
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (30 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 31/33] Allow use of dash as /bin/sh Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 33/33] useradd: Add missing DEPEND on shadow Saul Wold
  2011-11-10 12:14 ` [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Richard Purdie
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 .../qemu/qemu-0.14.0/qemu-git-qemugl-host.patch    |    2 +-
 .../qemu/qemu-0.15.0/qemu-git-qemugl-host.patch    |    2 +-
 .../qemu/qemu-git/qemu-git-qemugl-host.patch       |    2 +-
 meta/recipes-devtools/qemu/qemu_0.14.0.bb          |    2 +-
 meta/recipes-devtools/qemu/qemu_0.15.0.bb          |    2 +-
 meta/recipes-devtools/qemu/qemu_git.bb             |    2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-git-qemugl-host.patch b/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-git-qemugl-host.patch
index bbc9c9e..4fb972a 100644
--- a/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-git-qemugl-host.patch
+++ b/meta/recipes-devtools/qemu/qemu-0.14.0/qemu-git-qemugl-host.patch
@@ -280,7 +280,7 @@ Index: qemu-0.14.0/target-i386/beginend_funcs.sh
 --- /dev/null
 +++ qemu-0.14.0/target-i386/beginend_funcs.sh
 @@ -0,0 +1,23 @@
-+#! /bin/sh
++#! /bin/bash
 +# Copyright 2008 (C) Intel Corporation
 +#
 +# echo names of functions that are legal between a glBegin and glEnd pair.
diff --git a/meta/recipes-devtools/qemu/qemu-0.15.0/qemu-git-qemugl-host.patch b/meta/recipes-devtools/qemu/qemu-0.15.0/qemu-git-qemugl-host.patch
index bbc9c9e..4fb972a 100644
--- a/meta/recipes-devtools/qemu/qemu-0.15.0/qemu-git-qemugl-host.patch
+++ b/meta/recipes-devtools/qemu/qemu-0.15.0/qemu-git-qemugl-host.patch
@@ -280,7 +280,7 @@ Index: qemu-0.14.0/target-i386/beginend_funcs.sh
 --- /dev/null
 +++ qemu-0.14.0/target-i386/beginend_funcs.sh
 @@ -0,0 +1,23 @@
-+#! /bin/sh
++#! /bin/bash
 +# Copyright 2008 (C) Intel Corporation
 +#
 +# echo names of functions that are legal between a glBegin and glEnd pair.
diff --git a/meta/recipes-devtools/qemu/qemu-git/qemu-git-qemugl-host.patch b/meta/recipes-devtools/qemu/qemu-git/qemu-git-qemugl-host.patch
index bbc9c9e..4fb972a 100644
--- a/meta/recipes-devtools/qemu/qemu-git/qemu-git-qemugl-host.patch
+++ b/meta/recipes-devtools/qemu/qemu-git/qemu-git-qemugl-host.patch
@@ -280,7 +280,7 @@ Index: qemu-0.14.0/target-i386/beginend_funcs.sh
 --- /dev/null
 +++ qemu-0.14.0/target-i386/beginend_funcs.sh
 @@ -0,0 +1,23 @@
-+#! /bin/sh
++#! /bin/bash
 +# Copyright 2008 (C) Intel Corporation
 +#
 +# echo names of functions that are legal between a glBegin and glEnd pair.
diff --git a/meta/recipes-devtools/qemu/qemu_0.14.0.bb b/meta/recipes-devtools/qemu/qemu_0.14.0.bb
index 03519ad..5a0cd55 100644
--- a/meta/recipes-devtools/qemu/qemu_0.14.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_0.14.0.bb
@@ -3,7 +3,7 @@ require qemu.inc
 LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
                     file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
 
-PR = "r3"
+PR = "r4"
 
 FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
 FILESDIR = "${WORKDIR}"
diff --git a/meta/recipes-devtools/qemu/qemu_0.15.0.bb b/meta/recipes-devtools/qemu/qemu_0.15.0.bb
index baeb4e9..e2e1340 100644
--- a/meta/recipes-devtools/qemu/qemu_0.15.0.bb
+++ b/meta/recipes-devtools/qemu/qemu_0.15.0.bb
@@ -3,7 +3,7 @@ require qemu.inc
 LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
                     file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
 
-PR = "r0"
+PR = "r1"
 
 FILESPATH = "${FILE_DIRNAME}/qemu-${PV}"
 FILESDIR = "${WORKDIR}"
diff --git a/meta/recipes-devtools/qemu/qemu_git.bb b/meta/recipes-devtools/qemu/qemu_git.bb
index 59fc7f1..3b4369b 100644
--- a/meta/recipes-devtools/qemu/qemu_git.bb
+++ b/meta/recipes-devtools/qemu/qemu_git.bb
@@ -6,7 +6,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
                     file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
 
 PV = "0.14.0"
-PR = "r1"
+PR = "r2"
 
 FILESPATH = "${FILE_DIRNAME}/qemu-${PV}/:${FILE_DIRNAME}/qemu-git/"
 FILESDIR = "${WORKDIR}"
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* [CONSOLIDATED PULL (v2) 33/33] useradd: Add missing DEPEND on shadow
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (31 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 32/33] qemu: Ensure an internal qemugl script uses bash as it has bashisms Saul Wold
@ 2011-11-10  7:43 ` Saul Wold
  2011-11-10 12:14 ` [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Richard Purdie
  33 siblings, 0 replies; 35+ messages in thread
From: Saul Wold @ 2011-11-10  7:43 UTC (permalink / raw)
  To: openembedded-core

From: Richard Purdie <richard.purdie@linuxfoundation.org>

Without this rootfs generation fails as an RDEPENDS is added
but the package might not have bneen built.

Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
---
 meta/classes/useradd.bbclass |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass
index ae7349b..49a3d3f 100644
--- a/meta/classes/useradd.bbclass
+++ b/meta/classes/useradd.bbclass
@@ -2,7 +2,7 @@
 # target sysroot, and shadow -native and -sysroot provide the utilities
 # and support files needed to add and modify user and group accounts
 DEPENDS_append = "${USERADDDEPENDS}"
-USERADDDEPENDS = " base-passwd shadow-native shadow-sysroot"
+USERADDDEPENDS = " base-passwd shadow-native shadow-sysroot shadow"
 USERADDDEPENDS_virtclass-nativesdk = ""
 
 # This preinstall function will be run in two contexts: once for the
-- 
1.7.6.4




^ permalink raw reply related	[flat|nested] 35+ messages in thread

* Re: [CONSOLIDATED PULL (v2) 00/33] Loads of Change!
  2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
                   ` (32 preceding siblings ...)
  2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 33/33] useradd: Add missing DEPEND on shadow Saul Wold
@ 2011-11-10 12:14 ` Richard Purdie
  33 siblings, 0 replies; 35+ messages in thread
From: Richard Purdie @ 2011-11-10 12:14 UTC (permalink / raw)
  To: Patches and discussions about the oe-core layer

On Wed, 2011-11-09 at 23:42 -0800, Saul Wold wrote:
> Richard,
> 
> This set of changes is currently being built on the Autobuilder
> along with some change I dropped for this request. Based on the
> initial builds, I believe that most of these changes are correct
> and buildable.
> 
> I an attempt to clear the decks and move things forward I am suggesting
> we take these changes in.  I dropped Martin's SDL changes since they are
> causing some of the Autobuilder failures currently
> 
> There still seems to be an issue with connman sanity,
> and shadow (populate_sysroot_setscene):
> 
> ERROR: Task 3037 (/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-ppc/build/meta/recipes-extended/shadow/shadow-sysroot_4.1.4.3.bb, do_populate_sysroot_setscene) failed with exit code '1'
> 
> I included many of your patches in this to verify them as part of
> this build.

We still need some patches Mark is working on to resolve the connman
regression. I've not taken my "hacktastic" patch since its incomplete
and Mark's version will be better. I think most other things are now in.

I did not take the link reordering alphabetically patch since I didn't
see that until I'd taken the version queued in master-next. If anyone
wants to submit a followup that would be fine. I can't say its a big
issue whether its sorted or not though (and it does make sense to
separate out a function change from a cosmetic one IMO).

Cheers,

Richard




^ permalink raw reply	[flat|nested] 35+ messages in thread

end of thread, other threads:[~2011-11-10 12:20 UTC | newest]

Thread overview: 35+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-10  7:42 [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 01/33] local.conf.sample.extended: Fix bug 1674 Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 02/33] libxml2: use Copyright in LIC_FILES_CHKSUM instead of COPYING Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 03/33] Introduce new SERIAL_CONSOLES to add multiple consoles for your MACHINE Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 04/33] libarchive: Remove obsolete comment and empty line at the end Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 05/33] Distro_tracking: Update Manual Check Date Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 06/33] libtasn1: update to 2.10 Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 07/33] ncurses: refactor configure to avoid configuring widec when disabled Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 08/33] python: bump PR Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 09/33] lame: update to 3.99.1 Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 10/33] kbd: import from meta-oe Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 11/33] kbd: add RREPLACES/RCONFLICTS/RPROVIDES for upgradeable path from console-tools Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 12/33] task-core-boot, keymaps: add another VIRTUAL-RUNTIME to allow distributions to use different set of initscripts or no initscripts at all Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 13/33] keymaps: depend on kbd instead of console-tools Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 14/33] task-core-x11: use VIRTUAL-RUNTIME variables for xserver_common and graphical_init_manager Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 15/33] classes/package_rpm: disable uninstall scripts for upgrades Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 16/33] busybox: add grep to temporary links during uninstall Saul Wold
2011-11-10  7:42 ` [CONSOLIDATED PULL (v2) 17/33] linux-yocto: config cleanups + romely rt support Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 18/33] udev-extraconf: blacklist /dev/md Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 19/33] shared-mime-info: package runtime data separately Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 20/33] classes/[gnome|gnomebase|mime]: enhance gnome related classes Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 21/33] gconf: add upstream GNOME gconf 3.2.3 and drop gconf-dbus Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 22/33] xinit: Fix `startx` looking for `mcookie` in sysroot Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 23/33] useradd.bbclass: only modify packages in USERADD_PACKAGES Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 24/33] useradd.bbclass: do not modify -nativesdk packages Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 25/33] useradd-example.bb: update example documentation comments Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 26/33] avahi: remove USERADDPN Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 27/33] hacktastic patch to fix adduser under rpm Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 28/33] bitbake.conf: Unload pseudo when its not required for a given task Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 29/33] scripts/qemuimage-testlib: Output a slightly better error if expect is missing Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 30/33] classes: Remove various bashisms Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 31/33] Allow use of dash as /bin/sh Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 32/33] qemu: Ensure an internal qemugl script uses bash as it has bashisms Saul Wold
2011-11-10  7:43 ` [CONSOLIDATED PULL (v2) 33/33] useradd: Add missing DEPEND on shadow Saul Wold
2011-11-10 12:14 ` [CONSOLIDATED PULL (v2) 00/33] Loads of Change! Richard Purdie

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox