* [PATCH 0/6] Integrate Smart for RPM image generation
@ 2012-12-04 19:49 Mark Hatle
2012-12-04 19:49 ` [PATCH 1/6] rootfs_rpm.bbclass: Revert to default shell logging behavior Mark Hatle
` (8 more replies)
0 siblings, 9 replies; 17+ messages in thread
From: Mark Hatle @ 2012-12-04 19:49 UTC (permalink / raw)
To: openembedded-core
The following patch set relies on the previous "Misc fixes" sent out earlier
today.
The set replaces the existing rootfs generation with one based on Smart.
The work was tested using buildhistory over a wide range of image types:
core-image-minimal
core-image-base
core-image-basic
core-image-lsb
core-image-sato
build-appliance
Each of which contained minor changes from the former version, but the changes
can all be explained by a different package resolver.
Multilib configurations of each of the above images were also verified on
qemux86_64 configuration with a few lib32 items added to the mix. This was
shown, by buildhistory, to result in a more compact install solution.
"populate_sdk" was also verified after this patch. Buildhistory does not
verify SDKs, so these were verified by hand. The target items all appeared
to match the expected image components.
The incremental RPM installation code was verified as well.. This code was
verified in both multilib and non-multilib configurations.
Finally, each of these were verified on: qemux86_64, qemumips, qemuppc, qemuarm,
and qemuarm configured w/ hardware float API. This verifies that both the
ARM specific "gnueabi" issues and the _ to - in the arch names both work
properly.
The following changes since commit 0c69e555dda2fa412ba12fa90886b0b92dc60e44:
license.bbclass: Avoid grep error message (2012-12-04 11:10:18 -0600)
are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mhatle/smart
http://git.yoctoproject.org/cgit.cgi//log/?h=mhatle/smart
Mark Hatle (4):
rootfs_rpm.bbclass: Revert to default shell logging behavior
package_rpm: Update the way the multilib package names are translated
package_rpm.bbclass: Add additional logging
package_rpm.bbclass: Add support for incremental installs
Paul Eggleton (2):
classes/*_rpm: integrate Smart into RPM filesystem construction
classes/rootfs_rpm: install smart instead of zypper in rpm-based
images
meta/classes/package_rpm.bbclass | 691 +++++++++++++--------------------
meta/classes/populate_sdk_rpm.bbclass | 74 ++---
meta/classes/rootfs_rpm.bbclass | 86 ++---
3 files changed, 338 insertions(+), 513 deletions(-)
--
1.7.3.4
^ permalink raw reply [flat|nested] 17+ messages in thread
* [PATCH 1/6] rootfs_rpm.bbclass: Revert to default shell logging behavior
2012-12-04 19:49 [PATCH 0/6] Integrate Smart for RPM image generation Mark Hatle
@ 2012-12-04 19:49 ` Mark Hatle
2012-12-04 19:49 ` [PATCH 2/6] classes/*_rpm: integrate Smart into RPM filesystem construction Mark Hatle
` (7 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Mark Hatle @ 2012-12-04 19:49 UTC (permalink / raw)
To: openembedded-core
Remove the set +x, and revert to the normal logging behavior.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/rootfs_rpm.bbclass | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index c4fb470..2bb1b08 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -40,8 +40,6 @@ RPM="rpm ${RPMOPTS}"
do_rootfs[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
fakeroot rootfs_rpm_do_rootfs () {
- set +x
-
${RPM_PREPROCESS_COMMANDS}
#createrepo "${DEPLOY_DIR_RPM}"
--
1.7.3.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 2/6] classes/*_rpm: integrate Smart into RPM filesystem construction
2012-12-04 19:49 [PATCH 0/6] Integrate Smart for RPM image generation Mark Hatle
2012-12-04 19:49 ` [PATCH 1/6] rootfs_rpm.bbclass: Revert to default shell logging behavior Mark Hatle
@ 2012-12-04 19:49 ` Mark Hatle
2012-12-06 15:31 ` Richard Purdie
2012-12-04 19:49 ` [PATCH 3/6] classes/rootfs_rpm: install smart instead of zypper in rpm-based images Mark Hatle
` (6 subsequent siblings)
8 siblings, 1 reply; 17+ messages in thread
From: Mark Hatle @ 2012-12-04 19:49 UTC (permalink / raw)
To: openembedded-core
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Use Smart to construct the root filesystem for images and the contents
of SDKs rather than the custom scripts around rpm we had previously.
This ensures the result when producing an updated image will be the
same as upgrading to the same package versions from an older image on
the target, as well as allowing us to remove a substantial amount of
code making the rpm classes much easier to follow.
Some bugfixes from Bogdan Marinescu <bogdan.marinescu@intel.com>.
SDK implementation and testing as well as a number of bugfixes from
Mark Hatle <mark.hatle@windriver.com>.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/package_rpm.bbclass | 533 ++++++---------------------------
meta/classes/populate_sdk_rpm.bbclass | 48 +---
meta/classes/rootfs_rpm.bbclass | 31 +-
3 files changed, 117 insertions(+), 495 deletions(-)
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 200a941..aa5b156 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -8,6 +8,8 @@ RPMBUILD="rpmbuild"
PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms"
PKGWRITEDIRSRPM = "${DEPLOY_DIR}/sources/deploy-srpm"
+EXTRANATIVEPATH += "python-native"
+
python package_rpm_fn () {
d.setVar('PKGFN', d.getVar('PKG'))
}
@@ -16,88 +18,27 @@ python package_rpm_install () {
bb.fatal("package_rpm_install not implemented!")
}
-RPMCONF_TARGET_BASE = "${DEPLOY_DIR_RPM}/solvedb"
-RPMCONF_HOST_BASE = "${DEPLOY_DIR_RPM}/solvedb-sdk"
#
-# Update the Packages depsolver db in ${DEPLOY_DIR_RPM}
+# Update the packages indexes ${DEPLOY_DIR_RPM}
#
package_update_index_rpm () {
if [ ! -z "${DEPLOY_KEEP_PACKAGES}" -o ! -e "${DEPLOY_DIR_RPM}" ]; then
return
fi
- # Update target packages
base_archs="`echo ${PACKAGE_ARCHS} | sed 's/-/_/g'`"
ml_archs="`echo ${MULTILIB_PACKAGE_ARCHS} | sed 's/-/_/g'`"
- package_update_index_rpm_common "${RPMCONF_TARGET_BASE}" base_archs ml_archs
-
- # Update SDK packages
- base_archs="`echo ${SDK_PACKAGE_ARCHS} | sed 's/-/_/g'`"
- package_update_index_rpm_common "${RPMCONF_HOST_BASE}" base_archs
-}
-
-package_update_index_rpm_common () {
- rpmconf_base="$1"
- shift
-
- createdirs=""
- for archvar in "$@"; do
- eval archs=\${${archvar}}
- packagedirs=""
- for arch in $archs; do
- packagedirs="${DEPLOY_DIR_RPM}/$arch $packagedirs"
- rm -rf ${DEPLOY_DIR_RPM}/$arch/solvedb.done
- done
-
- cat /dev/null > ${rpmconf_base}-${archvar}.conf
- for pkgdir in $packagedirs; do
- if [ -e $pkgdir/ ]; then
- echo "Generating solve db for $pkgdir..."
- echo $pkgdir/solvedb >> ${rpmconf_base}-${archvar}.conf
- createdirs="$createdirs $pkgdir"
- fi
- done
- done
- rpm-createsolvedb.py "${RPM}" $createdirs
-}
-
-#
-# Generate an rpm configuration suitable for use against the
-# generated depsolver db's...
-#
-package_generate_rpm_conf () {
- # Update target packages
- package_generate_rpm_conf_common "${RPMCONF_TARGET_BASE}" base_archs ml_archs
-
- # Update SDK packages
- package_generate_rpm_conf_common "${RPMCONF_HOST_BASE}" base_archs
-}
-
-package_generate_rpm_conf_common() {
- rpmconf_base="$1"
- shift
+ sdk_archs="`echo ${SDK_PACKAGE_ARCHS} | sed 's/-/_/g'`"
- printf "_solve_dbpath " > ${rpmconf_base}.macro
- o_colon="false"
+ archs=`for arch in $base_archs $ml_archs $sdk_archs ; do
+ echo $arch
+ done | sort | uniq`
- for archvar in "$@"; do
- printf "_solve_dbpath " > ${rpmconf_base}-${archvar}.macro
- colon="false"
- for each in `cat ${rpmconf_base}-${archvar}.conf` ; do
- if [ "$o_colon" = "true" ]; then
- printf ":" >> ${rpmconf_base}.macro
- fi
- if [ "$colon" = "true" ]; then
- printf ":" >> ${rpmconf_base}-${archvar}.macro
- fi
- printf "%s" $each >> ${rpmconf_base}.macro
- o_colon="true"
- printf "%s" $each >> ${rpmconf_base}-${archvar}.macro
- colon="true"
- done
- printf "\n" >> ${rpmconf_base}-${archvar}.macro
+ for arch in $archs; do
+ if [ -d ${DEPLOY_DIR_RPM}/$arch ] ; then
+ createrepo --update -q ${DEPLOY_DIR_RPM}/$arch
+ fi
done
- printf "\n" >> ${rpmconf_base}.macro
}
rpm_log_check() {
@@ -122,150 +63,23 @@ rpm_log_check() {
#
-# Resolve package names to filepaths
-# resolve_pacakge <pkgname> <solvdb conffile>
-#
-resolve_package_rpm () {
- local conffile="$1"
- shift
- local pkg_name=""
- for solve in `cat ${conffile}`; do
- pkg_name=$(${RPM} -D "_dbpath $solve" -D "__dbi_txn create nofsync" -q --qf "%{packageorigin}\n" "$@" | grep -v "is not installed" || true)
- if [ -n "$pkg_name" -a "$pkg_name" != "(none)" ]; then
- echo $pkg_name
- break;
- fi
- done
-}
-
-# rpm common command and options
-rpm_common_comand () {
-
- local target_rootfs="${INSTALL_ROOTFS_RPM}"
-
- ${RPM} --root ${target_rootfs} \
- --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
- --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
- -D "_var ${localstatedir}" \
- -D "_dbpath ${rpmlibdir}" \
- -D "_tmppath /install/tmp" \
- --noparentdirs --nolinktos \
- -D "__dbi_txn create nofsync private" \
- -D "_cross_scriptlet_wrapper ${WORKDIR}/scriptlet_wrapper" $@
-}
-
-# install or remove the pkg
-rpm_update_pkg () {
-
- manifest=$1
- # The manifest filename, e.g. total_solution.manifest
- m_name=${manifest##/*/}
- local target_rootfs="${INSTALL_ROOTFS_RPM}"
- installdir=$target_rootfs/install
- pre_btmanifest=$installdir/pre_bt.manifest
- cur_btmanifest=$installdir/cur_bt.manifest
-
- # Install/remove the different pkgs when total_solution.manifest is
- # comming and incremental image generation is enabled.
- if [ "${INC_RPM_IMAGE_GEN}" = "1" -a -d "${target_rootfs}${rpmlibdir}" \
- -a "$m_name" = "total_solution.manifest" \
- -a "${INSTALL_COMPLEMENTARY_RPM}" != "1" ]; then
- # Get the previous installed list
- rpm --root $target_rootfs --dbpath ${rpmlibdir} \
- -qa --qf '%{PACKAGEORIGIN} %{BUILDTIME}\n' | sort -u -o $pre_btmanifest
- # Get the current installed list (based on install/var/lib/rpm)
- rpm --root $installdir -D "_dbpath $installdir" \
- -qa --qf '%{PACKAGEORIGIN} %{BUILDTIME}\n' | sort -u -o $cur_btmanifest
- comm -1 -3 $cur_btmanifest $pre_btmanifest | sed 's#.*/\(.*\)\.rpm .*#\1#' > \
- $installdir/remove.manifest
- comm -2 -3 $cur_btmanifest $pre_btmanifest | awk '{print $1}' > \
- $installdir/incremental.manifest
-
- # Attempt to remove unwanted pkgs, the scripts(pre, post, etc.) has not
- # been run by now, so don't have to run them(preun, postun, etc.) when
- # erase the pkg
- if [ -s $installdir/remove.manifest ]; then
- rpm_common_comand --noscripts --nodeps \
- -e `cat $installdir/remove.manifest`
- fi
-
- # Attempt to install the incremental pkgs
- if [ -s $installdir/incremental.manifest ]; then
- rpm_common_comand --replacefiles --replacepkgs \
- -Uvh $installdir/incremental.manifest
- fi
- else
- # Attempt to install
- rpm_common_comand --replacepkgs -Uhv $manifest
- fi
-}
-
-process_pkg_list_rpm() {
- local insttype=$1
- shift
- # $@ is special POSIX linear array can not be assigned
- # to a local variable directly in dash since its separated by
- # space and dash expands it before assignment
- # and local x=1 2 3 and not x="1 2 3"
- local pkgs
- pkgs="$@"
- local confbase=${INSTALL_CONFBASE_RPM}
-
- printf "" > ${target_rootfs}/install/base_archs.pkglist
- printf "" > ${target_rootfs}/install/ml_archs.pkglist
-
- for pkg in $pkgs; do
- echo "Processing $pkg..."
-
- archvar=base_archs
- ml_pkg=$pkg
- for i in ${MULTILIB_PREFIX_LIST} ; do
- subst=${pkg#${i}-}
- if [ $subst != $pkg ] ; then
- ml_pkg=$subst
- archvar=ml_archs
- break
- fi
- done
-
- echo $ml_pkg >> ${target_rootfs}/install/$archvar.pkglist
- done
-
- local manifestpfx="install"
- local extraopt=""
- if [ "$insttype" = "attemptonly" ] ; then
- manifestpfx="install_attemptonly"
- extraopt="-i"
- fi
-
- rpmresolve $extraopt ${confbase}-base_archs.conf ${target_rootfs}/install/base_archs.pkglist -o ${target_rootfs}/install/${manifestpfx}.manifest
- if [ -s ${target_rootfs}/install/ml_archs.pkglist ] ; then
- rpmresolve $extraopt ${confbase}-ml_archs.conf ${target_rootfs}/install/ml_archs.pkglist -o ${target_rootfs}/install/${manifestpfx}_multilib.manifest
- fi
-}
-
-#
# Install a bunch of packages using rpm.
-# There are 3 solutions in an image's FRESH generation:
-# 1) initial_solution
-# 2) total_solution
-# 3) COMPLEMENTARY solution
+# There are two solutions in an image's FRESH generation:
+# 1) main package solution
+# 2) complementary solution
#
-# It is different when incremental image generation is enabled in the
-# SECOND generation:
-# 1) The initial_solution is skipped.
-# 2) The incremental image generation takes action during the total_solution
-# installation, the previous installed COMPLEMENTARY pkgs usually would be
-# removed here, the new COMPLEMENTARY ones would be installed in the next
-# step.
-# 3) The COMPLEMENTARY would always be installed since it is
-# generated based on the second step's image.
+# It is different when incremental image generation is enabled:
+# 1) The incremental image generation takes action during the main package
+# installation, the previous installed complementary packages would
+# usually be removed here, and the new complementary ones would be
+# installed in the next step.
+# 2) The complementary would always be installed since it is
+# generated based on the first step's image.
#
# the following shell variables needs to be set before calling this func:
# INSTALL_ROOTFS_RPM - install root dir
# INSTALL_PLATFORM_RPM - main platform
# INSTALL_PLATFORM_EXTRA_RPM - extra platform
-# INSTALL_CONFBASE_RPM - configuration file base name
# INSTALL_PACKAGES_RPM - packages to be installed
# INSTALL_PACKAGES_ATTEMPTONLY_RPM - packages attemped to be installed only
# INSTALL_PACKAGES_LINGUAS_RPM - additional packages for uclibc
@@ -275,15 +89,20 @@ process_pkg_list_rpm() {
package_install_internal_rpm () {
- local target_rootfs="${INSTALL_ROOTFS_RPM}"
- local platform="`echo ${INSTALL_PLATFORM_RPM} | sed 's#-#_#g'`"
- local platform_extra="`echo ${INSTALL_PLATFORM_EXTRA_RPM} | sed 's#-#_#g'`"
- local confbase="${INSTALL_CONFBASE_RPM}"
- local package_to_install="${INSTALL_PACKAGES_RPM}"
- local package_attemptonly="${INSTALL_PACKAGES_ATTEMPTONLY_RPM}"
- local package_linguas="${INSTALL_PACKAGES_LINGUAS_RPM}"
- local providename="${INSTALL_PROVIDENAME_RPM}"
- local task="${INSTALL_TASK_RPM}"
+ local target_rootfs="$INSTALL_ROOTFS_RPM"
+ local platform="`echo $INSTALL_PLATFORM_RPM | sed 's#-#_#g'`"
+ local platform_extra="`echo $INSTALL_PLATFORM_EXTRA_RPM | sed 's#-#_#g'`"
+ local package_to_install="$INSTALL_PACKAGES_RPM"
+ local package_attemptonly="$INSTALL_PACKAGES_ATTEMPTONLY_RPM"
+ local package_linguas="$INSTALL_PACKAGES_LINGUAS_RPM"
+ local providename="$INSTALL_PROVIDENAME_RPM"
+ local task="$INSTALL_TASK_RPM"
+
+ # Configure internal RPM environment when using Smart
+ export RPM_ETCRPM=${target_rootfs}/etc/rpm
+
+ # Setup temporary directory -- install...
+ mkdir -p ${target_rootfs}/install
if [ "${INSTALL_COMPLEMENTARY_RPM}" != "1" ] ; then
# Setup base system configuration
@@ -306,166 +125,74 @@ package_install_internal_rpm () {
# Tell RPM that the "/" directory exist and is available
mkdir -p ${target_rootfs}/etc/rpm/sysinfo
echo "/" >${target_rootfs}/etc/rpm/sysinfo/Dirnames
+
if [ ! -z "$providename" ]; then
cat /dev/null > ${target_rootfs}/etc/rpm/sysinfo/Providename
for provide in $providename ; do
echo $provide >> ${target_rootfs}/etc/rpm/sysinfo/Providename
done
fi
- else
- # We may run through the complementary installs multiple times. For each time
- # we should add the previous solution manifest to the full "original" set to
- # avoid duplicate install steps.
- echo "Update original solution..."
- for m in ${target_rootfs}/install/initial_solution.manifest \
- ${target_rootfs}/install/total_solution.manifest; do
- if [ -s $m ]; then
- cat $m >> ${target_rootfs}/install/original_solution.manifest
- rm -f $m
- fi
- done
- sort -u ${target_rootfs}/install/original_solution.manifest -o ${target_rootfs}/install/original_solution.manifest.new
- mv ${target_rootfs}/install/original_solution.manifest.new ${target_rootfs}/install/original_solution.manifest
- fi
- # Setup manifest of packages to install...
- mkdir -p ${target_rootfs}/install
- rm -f ${target_rootfs}/install/install.manifest
- rm -f ${target_rootfs}/install/install_multilib.manifest
- rm -f ${target_rootfs}/install/install_attemptonly.manifest
+ # Configure RPM... we enforce these settings!
+ mkdir -p ${target_rootfs}${rpmlibdir}
+ mkdir -p ${target_rootfs}${rpmlibdir}/log
+ # After change the __db.* cache size, log file will not be generated automatically,
+ # that will raise some warnings, so touch a bare log for rpm write into it.
+ touch ${target_rootfs}${rpmlibdir}/log/log.0000000001
+ if [ ! -e ${target_rootfs}${rpmlibdir}/DB_CONFIG ]; then
+ cat > ${target_rootfs}${rpmlibdir}/DB_CONFIG << EOF
+# ================ Environment
+set_data_dir .
+set_create_dir .
+set_lg_dir ./log
+set_tmp_dir ./tmp
+set_flags db_log_autoremove on
- # Uclibc builds don't provide this stuff...
- if [ x${TARGET_OS} = "xlinux" ] || [ x${TARGET_OS} = "xlinux-gnueabi" ] ; then
- if [ ! -z "${package_linguas}" ]; then
- process_pkg_list_rpm linguas ${package_linguas}
- fi
- fi
+# -- thread_count must be >= 8
+set_thread_count 64
- if [ ! -z "${package_to_install}" ]; then
- process_pkg_list_rpm default ${package_to_install}
- fi
+# ================ Logging
- # Normal package installation
-
- # Generate an install solution by doing a --justdb install, then recreate it with
- # an actual package install!
- if [ -s ${target_rootfs}/install/install.manifest ]; then
- echo "# Install manifest padding" >> ${target_rootfs}/install/install.manifest
- ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
- --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
- --root "${target_rootfs}/install" \
- -D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}-base_archs.macro`" \
- -D "__dbi_txn create nofsync" \
- -U --justdb --replacepkgs --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
- ${target_rootfs}/install/install.manifest
- fi
+# ================ Memory Pool
+set_cachesize 0 1048576 0
+set_mp_mmapsize 268435456
- if [ ! -z "${package_attemptonly}" ]; then
- echo "Adding attempt only packages..."
- process_pkg_list_rpm attemptonly ${package_attemptonly}
- cat ${target_rootfs}/install/install_attemptonly.manifest | while read pkg_name
- do
- echo "Attempting $pkg_name..." >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}"
- ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
- --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
- --root "${target_rootfs}/install" \
- -D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
- -D "__dbi_txn create nofsync private" \
- -U --justdb --replacepkgs --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
- $pkg_name >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}" 2>&1 || true
- done
- fi
+# ================ Locking
+set_lk_max_locks 16384
+set_lk_max_lockers 16384
+set_lk_max_objects 16384
+ mutex_set_max 163840
- #### Note: 'Recommends' is an arbitrary tag that means _SUGGESTS_ in OE-core..
- # Add any recommended packages to the image
- # RPM does not solve for recommended packages because they are optional...
- # So we query them and tree them like the ATTEMPTONLY packages above...
- # Change the loop to "1" to run this code...
- loop=0
- if [ $loop -eq 1 ]; then
- echo "Processing recommended packages..."
- cat /dev/null > ${target_rootfs}/install/recommend.list
- while [ $loop -eq 1 ]; do
- # Dump the full set of recommends...
- ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
- --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
- --root "${target_rootfs}/install" \
- -D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
- -D "__dbi_txn create nofsync private" \
- -qa --qf "[%{RECOMMENDS}\n]" | sort -u > ${target_rootfs}/install/recommend
- # Did we add more to the list?
- grep -v -x -F -f ${target_rootfs}/install/recommend.list ${target_rootfs}/install/recommend > ${target_rootfs}/install/recommend.new || true
- # We don't want to loop unless there is a change to the list!
- loop=0
- cat ${target_rootfs}/install/recommend.new | \
- while read pkg ; do
- # Ohh there was a new one, we'll need to loop again...
- loop=1
- echo "Processing $pkg..."
- found=0
- for archvar in base_archs ml_archs ; do
- pkg_name=$(resolve_package_rpm ${confbase}-${archvar}.conf ${pkg})
- if [ -n "$pkg_name" ]; then
- found=1
- break
- fi
- done
+# ================ Replication
+EOF
+ fi
- if [ $found -eq 0 ]; then
- echo "Note: Unable to find package $pkg -- suggests"
- echo "Unable to find package $pkg." >> "`dirname ${BB_LOGFILE}`/log.do_${task}_recommend.${PID}"
- continue
+ # Create database so that smart doesn't complain (lazy init)
+ rpm --root $target_rootfs --dbpath /var/lib/rpm -qa > /dev/null
+
+ # Configure smart
+ rm -rf ${target_rootfs}/var/lib/smart
+ smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-root=${target_rootfs}
+ smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-dbpath=${rpmlibdir}
+ smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-nolinktos=1
+ smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-noparentdirs=1
+ smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._var=${localstatedir}
+ smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._tmppath=/install/tmp
+ smart --data-dir=${target_rootfs}/var/lib/smart channel --add rpmsys type=rpm-sys -y
+
+ for arch in $platform_extra ; do
+ if [ -d ${DEPLOY_DIR_RPM}/$arch -a ! -e ${target_rootfs}/install/channel.$arch.stamp ] ; then
+ smart --data-dir=${target_rootfs}/var/lib/smart channel --add $arch type=rpm-md type=rpm-md baseurl=${DEPLOY_DIR_RPM}/$arch -y
+ touch ${target_rootfs}/install/channel.$arch.stamp
fi
- echo "Attempting $pkg_name..." >> "`dirname ${BB_LOGFILE}`/log.do_{task}_recommend.${PID}"
- ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
- --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
- --root "${target_rootfs}/install" \
- -D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}.macro`" \
- -D "__dbi_txn create nofsync private" \
- -U --justdb --replacepkgs --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
- $pkg_name >> "`dirname ${BB_LOGFILE}`/log.do_${task}_recommend.${PID}" 2>&1 || true
done
- cat ${target_rootfs}/install/recommend.list ${target_rootfs}/install/recommend.new | sort -u > ${target_rootfs}/install/recommend.new.list
- mv -f ${target_rootfs}/install/recommend.new.list ${target_rootfs}/install/recommend.list
- rm ${target_rootfs}/install/recommend ${target_rootfs}/install/recommend.new
- done
fi
- # Now that we have a solution, pull out a list of what to install...
- echo "Manifest: ${target_rootfs}/install/install_solution.manifest"
- ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
- --root "${target_rootfs}/install" \
- -D "__dbi_txn create nofsync private" \
- > ${target_rootfs}/install/install_solution.manifest
-
- touch ${target_rootfs}/install/install_multilib_solution.manifest
-
- if [ -s "${target_rootfs}/install/install_multilib.manifest" ]; then
- # multilib package installation
- echo "# Install multilib manifest padding" >> ${target_rootfs}/install/install_multilib.manifest
-
- # Generate an install solution by doing a --justdb install, then recreate it with
- # an actual package install!
- ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
- --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
- --root "${target_rootfs}/install" \
- -D "_dbpath ${target_rootfs}/install" -D "`cat ${confbase}-ml_archs.macro`" \
- -D "__dbi_txn create nofsync" \
- -U --justdb --replacepkgs --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
- ${target_rootfs}/install/install_multilib.manifest
-
- # Now that we have a solution, pull out a list of what to install...
- echo "Manifest: ${target_rootfs}/install/install_multilib.manifest"
- ${RPM} -D "_dbpath ${target_rootfs}/install" -qa --qf "%{packageorigin}\n" \
- --root "${target_rootfs}/install" \
- -D "__dbi_txn create nofsync private" \
- > ${target_rootfs}/install/install_multilib_solution.manifest
-
+ # Uclibc builds don't provide this stuff...
+ if [ x${TARGET_OS} != "xlinux" ] && [ x${TARGET_OS} != "xlinux-gnueabi" ] ; then
+ package_linguas=""
fi
- cat ${target_rootfs}/install/install_solution.manifest \
- ${target_rootfs}/install/install_multilib_solution.manifest | sort -u > ${target_rootfs}/install/total_solution.manifest
-
# Construct install scriptlet wrapper
cat << EOF > ${WORKDIR}/scriptlet_wrapper
#!/bin/bash
@@ -489,93 +216,17 @@ fi
EOF
chmod 0755 ${WORKDIR}/scriptlet_wrapper
+ smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._cross_scriptlet_wrapper=${WORKDIR}/scriptlet_wrapper
- # Configure RPM... we enforce these settings!
- mkdir -p ${target_rootfs}${rpmlibdir}
- mkdir -p ${target_rootfs}${rpmlibdir}/log
- # After change the __db.* cache size, log file will not be generated automatically,
- # that will raise some warnings, so touch a bare log for rpm write into it.
- touch ${target_rootfs}${rpmlibdir}/log/log.0000000001
- cat > ${target_rootfs}${rpmlibdir}/DB_CONFIG << EOF
-# ================ Environment
-set_data_dir .
-set_create_dir .
-set_lg_dir ./log
-set_tmp_dir ./tmp
-set_flags db_log_autoremove on
-
-# -- thread_count must be >= 8
-set_thread_count 64
+ smart --data-dir=${target_rootfs}/var/lib/smart install -y ${package_to_install} ${package_linguas}
-# ================ Logging
-
-# ================ Memory Pool
-set_cachesize 0 1048576 0
-set_mp_mmapsize 268435456
-
-# ================ Locking
-set_lk_max_locks 16384
-set_lk_max_lockers 16384
-set_lk_max_objects 16384
-mutex_set_max 163840
-
-# ================ Replication
-EOF
-
- if [ "${INSTALL_COMPLEMENTARY_RPM}" = "1" ] ; then
- # Only install packages not already installed (dependency calculation will
- # almost certainly have added some that have been)
- sort -u ${target_rootfs}/install/original_solution.manifest > ${target_rootfs}/install/original_solution_sorted.manifest
- sort -u ${target_rootfs}/install/total_solution.manifest > ${target_rootfs}/install/total_solution_sorted.manifest
- comm -2 -3 ${target_rootfs}/install/total_solution_sorted.manifest \
- ${target_rootfs}/install/original_solution_sorted.manifest > \
- ${target_rootfs}/install/diff.manifest
- mv ${target_rootfs}/install/diff.manifest ${target_rootfs}/install/total_solution.manifest
- elif [ "${INC_RPM_IMAGE_GEN}" = "1" -a -f "${target_rootfs}/etc/passwd" ]; then
- echo "Skipping pre install due to existing image"
- else
- # RPM is special. It can't handle dependencies and preinstall scripts correctly. Its
- # probably a feature. The only way to convince rpm to actually run the preinstall scripts
- # for base-passwd and shadow first before installing packages that depend on these packages
- # is to do two image installs, installing one set of packages, then the other.
- rm -f ${target_rootfs}/install/initial_install.manifest
- echo "Installing base dependencies first (base-passwd, base-files and shadow) since rpm is special"
- grep /base-passwd-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
- grep /base-files-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
- grep /shadow-[0-9] ${target_rootfs}/install/total_solution.manifest >> ${target_rootfs}/install/initial_install.manifest || true
-
- if [ -s ${target_rootfs}/install/initial_install.manifest ]; then
- echo "# Initial Install manifest padding..." >> ${target_rootfs}/install/initial_install.manifest
-
- # Generate an install solution by doing a --justdb install, then recreate it with
- # an actual package install!
- mkdir -p ${target_rootfs}/initial
-
- ${RPM} --predefine "_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo" \
- --predefine "_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform" \
- --root "${target_rootfs}/install" \
- -D "_dbpath ${target_rootfs}/initial" -D "`cat ${confbase}.macro`" \
- -D "__dbi_txn create nofsync" \
- -U --justdb --replacepkgs --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \
- ${target_rootfs}/install/initial_install.manifest
-
- ${RPM} -D "_dbpath ${target_rootfs}/initial" -qa --qf "%{packageorigin}\n" \
- -D "__dbi_txn create nofsync private" \
- --root "${target_rootfs}/install" \
- > ${target_rootfs}/install/initial_solution.manifest
-
- rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest
-
- grep -Fv -f ${target_rootfs}/install/initial_solution.manifest ${target_rootfs}/install/total_solution.manifest > ${target_rootfs}/install/total_solution.manifest.new
- mv ${target_rootfs}/install/total_solution.manifest.new ${target_rootfs}/install/total_solution.manifest
-
- rm -rf ${target_rootfs}/initial
- fi
+ if [ ! -z "${package_attemptonly}" ]; then
+ echo "Installing attempt only packages..."
+ for pkg_name in ${package_attemptonly} ; do
+ echo "Attempting $pkg_name..." >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}"
+ smart --data-dir=${target_rootfs}/var/lib/smart install -y $pkg_name >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}" 2>&1 || true
+ done
fi
-
- echo "Installing main solution manifest (${target_rootfs}/install/total_solution.manifest)"
-
- rpm_update_pkg ${target_rootfs}/install/total_solution.manifest
}
python write_specfile () {
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
index 1c54049..e7850ab 100644
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ b/meta/classes/populate_sdk_rpm.bbclass
@@ -1,10 +1,17 @@
do_populate_sdk[depends] += "rpm-native:do_populate_sysroot"
do_populate_sdk[depends] += "rpmresolve-native:do_populate_sysroot"
+do_populate_sdk[depends] += "python-smartpm-native:do_populate_sysroot"
+
+# Needed for update-alternatives
+do_populate_sdk[depends] += "opkg-native:do_populate_sysroot"
+
+# Creating the repo info in do_rootfs
do_populate_sdk[depends] += "createrepo-native:do_populate_sysroot"
+
do_populate_sdk[recrdeptask] += "do_package_write_rpm"
rpmlibdir = "/var/lib/rpm"
-RPMOPTS="--dbpath ${rpmlibdir} --define='_openall_before_chroot 1'"
+RPMOPTS="--dbpath ${rpmlibdir}"
RPM="rpm ${RPMOPTS}"
do_populate_sdk[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
@@ -16,58 +23,29 @@ populate_sdk_post_rpm () {
# remove lock files
rm -f ${target_rootfs}/__db.*
- # Move manifests into the directory with the logs
- mv ${target_rootfs}/install/*.manifest ${T}/
-
# Remove all remaining resolver files
rm -rf ${target_rootfs}/install
+ rm -rf ${target_rootfs}/var/lib/smart
}
populate_sdk_rpm () {
package_update_index_rpm
- package_generate_rpm_conf
## install target ##
# This needs to work in the same way as rootfs_rpm.bbclass!
#
export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}/${SDKTARGETSYSROOT}"
export INSTALL_PLATFORM_RPM="${TARGET_ARCH}"
- export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
export INSTALL_PACKAGES_RPM="${TOOLCHAIN_TARGET_TASK}"
export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${TOOLCHAIN_TARGET_TASK_ATTEMPTONLY}"
export INSTALL_PACKAGES_LINGUAS_RPM=""
- export INSTALL_PROVIDENAME_RPM="/bin/sh /bin/bash /usr/bin/env /usr/bin/perl pkgconfig pkgconfig(pkg-config)"
+ export INSTALL_PROVIDENAME_RPM=""
export INSTALL_TASK_RPM="populate_sdk-target"
export INSTALL_COMPLEMENTARY_RPM=""
# Setup base system configuration
mkdir -p ${INSTALL_ROOTFS_RPM}/etc/rpm/
- mkdir -p ${INSTALL_ROOTFS_RPM}${rpmlibdir}
- mkdir -p ${INSTALL_ROOTFS_RPM}${rpmlibdir}/log
- cat > ${INSTALL_ROOTFS_RPM}${rpmlibdir}/DB_CONFIG << EOF
-# ================ Environment
-set_data_dir .
-set_create_dir .
-set_lg_dir ./log
-set_tmp_dir ./tmp
-
-# -- thread_count must be >= 8
-set_thread_count 64
-
-# ================ Logging
-
-# ================ Memory Pool
-set_mp_mmapsize 268435456
-
-# ================ Locking
-set_lk_max_locks 16384
-set_lk_max_lockers 16384
-set_lk_max_objects 16384
-mutex_set_max 163840
-
-# ================ Replication
-EOF
# List must be prefered to least preferred order
INSTALL_PLATFORM_EXTRA_RPM=""
@@ -84,7 +62,6 @@ EOF
echo "Installing NATIVESDK packages"
export INSTALL_ROOTFS_RPM="${SDK_OUTPUT}"
export INSTALL_PLATFORM_RPM="${SDK_ARCH}"
- export INSTALL_CONFBASE_RPM="${RPMCONF_HOST_BASE}"
export INSTALL_PACKAGES_RPM="${TOOLCHAIN_HOST_TASK}"
export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${TOOLCHAIN_TARGET_HOST_ATTEMPTONLY}"
export INSTALL_PACKAGES_LINGUAS_RPM=""
@@ -112,11 +89,6 @@ EOF
rm -rf ${SDK_OUTPUT}/etc
populate_sdk_log_check populate_sdk
-
- # Workaround so the parser knows we need the resolve_package function!
- if false ; then
- resolve_package_rpm foo ${RPMCONF_TARGET_BASE}.conf || true
- fi
}
python () {
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 2bb1b08..01a7767 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -12,6 +12,7 @@ ROOTFS_PKGMANAGE_BOOTSTRAP = ""
do_rootfs[depends] += "rpm-native:do_populate_sysroot"
do_rootfs[depends] += "rpmresolve-native:do_populate_sysroot"
+do_rootfs[depends] += "python-smartpm-native:do_populate_sysroot"
# Needed for update-alternatives
do_rootfs[depends] += "opkg-native:do_populate_sysroot"
@@ -21,8 +22,8 @@ do_rootfs[depends] += "createrepo-native:do_populate_sysroot"
do_rootfs[recrdeptask] += "do_package_write_rpm"
-RPM_PREPROCESS_COMMANDS = "package_update_index_rpm; package_generate_rpm_conf; "
-RPM_POSTPROCESS_COMMANDS = ""
+RPM_PREPROCESS_COMMANDS = "package_update_index_rpm; "
+RPM_POSTPROCESS_COMMANDS = "rpm_setup_smart_target_config; "
#
# Allow distributions to alter when [postponed] package install scripts are run
@@ -32,7 +33,7 @@ POSTINSTALL_INITPOSITION ?= "98"
rpmlibdir = "/var/lib/rpm"
opkglibdir = "${localstatedir}/lib/opkg"
-RPMOPTS="--dbpath ${rpmlibdir} --define='_openall_before_chroot 1'"
+RPMOPTS="--dbpath ${rpmlibdir}"
RPM="rpm ${RPMOPTS}"
# RPM doesn't work with multiple rootfs generation at once due to collisions in the use of files
@@ -42,13 +43,10 @@ do_rootfs[lockfiles] += "${DEPLOY_DIR_RPM}/rpm.lock"
fakeroot rootfs_rpm_do_rootfs () {
${RPM_PREPROCESS_COMMANDS}
- #createrepo "${DEPLOY_DIR_RPM}"
-
# install packages
# This needs to work in the same way as populate_sdk_rpm.bbclass!
export INSTALL_ROOTFS_RPM="${IMAGE_ROOTFS}"
export INSTALL_PLATFORM_RPM="${TARGET_ARCH}"
- export INSTALL_CONFBASE_RPM="${RPMCONF_TARGET_BASE}"
export INSTALL_PACKAGES_RPM="${PACKAGE_INSTALL}"
export INSTALL_PACKAGES_ATTEMPTONLY_RPM="${PACKAGE_INSTALL_ATTEMPTONLY}"
export INSTALL_PACKAGES_LINGUAS_RPM="${LINGUAS_INSTALL}"
@@ -114,18 +112,10 @@ EOF
# remove lock files
rm -f ${IMAGE_ROOTFS}${rpmlibdir}/__db.*
- # Move manifests into the directory with the logs
- mv ${IMAGE_ROOTFS}/install/*.manifest ${T}/
-
# Remove all remaining resolver files
rm -rf ${IMAGE_ROOTFS}/install
log_check rootfs
-
- # Workaround so the parser knows we need the resolve_package function!
- if false ; then
- resolve_package_rpm foo ${RPMCONF_TARGET_BASE}.conf || true
- fi
}
remove_packaging_data_files() {
@@ -135,10 +125,19 @@ remove_packaging_data_files() {
mkdir -p $t
mv ${IMAGE_ROOTFS}${rpmlibdir} $t
rm -rf ${IMAGE_ROOTFS}${opkglibdir}
+ rm -rf ${IMAGE_ROOTFS}/var/lib/smart
+}
+
+rpm_setup_smart_target_config() {
+ # Set up smart configuration for the target
+ rm -rf ${IMAGE_ROOTFS}/var/lib/smart
+ smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart channel --add rpmsys type=rpm-sys -y
+ smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart config --set rpm-nolinktos=1
+ smart --data-dir=${IMAGE_ROOTFS}/var/lib/smart config --set rpm-noparentdirs=1
+ rm -f ${IMAGE_ROOTFS}/var/lib/smart/config.old
}
-RPM_QUERY_CMD = '${RPM} --root $INSTALL_ROOTFS_RPM -D "_dbpath ${rpmlibdir}" \
- -D "__dbi_txn create nofsync private"'
+RPM_QUERY_CMD = '${RPM} --root $INSTALL_ROOTFS_RPM -D "_dbpath ${rpmlibdir}"'
list_installed_packages() {
GET_LIST=$(${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH} %{PACKAGEORIGIN} %{Platform}\n]")
--
1.7.3.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 3/6] classes/rootfs_rpm: install smart instead of zypper in rpm-based images
2012-12-04 19:49 [PATCH 0/6] Integrate Smart for RPM image generation Mark Hatle
2012-12-04 19:49 ` [PATCH 1/6] rootfs_rpm.bbclass: Revert to default shell logging behavior Mark Hatle
2012-12-04 19:49 ` [PATCH 2/6] classes/*_rpm: integrate Smart into RPM filesystem construction Mark Hatle
@ 2012-12-04 19:49 ` Mark Hatle
2012-12-04 19:49 ` [PATCH 4/6] package_rpm: Update the way the multilib package names are translated Mark Hatle
` (5 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Mark Hatle @ 2012-12-04 19:49 UTC (permalink / raw)
To: openembedded-core
From: Paul Eggleton <paul.eggleton@linux.intel.com>
Switch over to smart on the target when package-management is enabled.
Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
---
meta/classes/rootfs_rpm.bbclass | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 01a7767..17de9dc 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -2,10 +2,10 @@
# Creates a root filesystem out of rpm packages
#
-ROOTFS_PKGMANAGE = "rpm zypper"
+ROOTFS_PKGMANAGE = "rpm smartpm"
-# Add 50Meg of extra space for zypper database space
-IMAGE_ROOTFS_EXTRA_SPACE_append = "${@base_contains("PACKAGE_INSTALL", "zypper", " + 51200", "" ,d)}"
+# Add 50Meg of extra space for Smart
+IMAGE_ROOTFS_EXTRA_SPACE_append = "${@base_contains("PACKAGE_INSTALL", "smartpm", " + 51200", "" ,d)}"
# Postinstalls on device are handled within this class at present
ROOTFS_PKGMANAGE_BOOTSTRAP = ""
--
1.7.3.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 4/6] package_rpm: Update the way the multilib package names are translated
2012-12-04 19:49 [PATCH 0/6] Integrate Smart for RPM image generation Mark Hatle
` (2 preceding siblings ...)
2012-12-04 19:49 ` [PATCH 3/6] classes/rootfs_rpm: install smart instead of zypper in rpm-based images Mark Hatle
@ 2012-12-04 19:49 ` Mark Hatle
2012-12-04 19:49 ` [PATCH 5/6] package_rpm.bbclass: Add additional logging Mark Hatle
` (4 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Mark Hatle @ 2012-12-04 19:49 UTC (permalink / raw)
To: openembedded-core
The variable MULTILIB_PACKAGE_ARCHS has been removed in favor of a
repurposed MULTILIB_PREFIX_LIST. The format of this item is now
<libid>:<arch>:<arch1>:...:<archN>. This ensures that we can correctly
translate the libid to one of the supported archs in a tri-lib system.
All of the users of MULTILIB_PREFIX_LIST and MULTILIB_PACKAGE_ARCHS have
been modified accordingly.
Also change the way attempted packages are installed, verify the package
exists in the translate functions, then perform the install in one single
operation. This results in a significantly faster install time.
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/package_rpm.bbclass | 167 ++++++++++++++++++++++++++++++---
meta/classes/populate_sdk_rpm.bbclass | 26 ++++--
meta/classes/rootfs_rpm.bbclass | 47 +++++-----
3 files changed, 195 insertions(+), 45 deletions(-)
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index aa5b156..41c32f4 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -26,11 +26,25 @@ package_update_index_rpm () {
return
fi
- base_archs="`echo ${PACKAGE_ARCHS} | sed 's/-/_/g'`"
- ml_archs="`echo ${MULTILIB_PACKAGE_ARCHS} | sed 's/-/_/g'`"
- sdk_archs="`echo ${SDK_PACKAGE_ARCHS} | sed 's/-/_/g'`"
+ sdk_archs=${SDK_PACKAGE_ARCH}
+ sdk_archs=${sdk_archs//-/_}
+
+ target_archs=""
+ for i in ${MULTILIB_PREFIX_LIST} ; do
+ old_IFS="$IFS"
+ IFS=":"
+ set $i
+ IFS="$old_IFS"
+ shift # remove mlib
+ while [ -n "$1" ]; do
+ target_archs="$target_archs $1"
+ shift
+ done
+ done
+
+ target_archs=${target_archs//-/_}
- archs=`for arch in $base_archs $ml_archs $sdk_archs ; do
+ archs=`for arch in $target_archs $sdk_archs ; do
echo $arch
done | sort | uniq`
@@ -61,6 +75,128 @@ rpm_log_check() {
true
}
+# Translate the RPM/Smart format names to the OE multilib format names
+# Input via stdin (only the first item per line is converted!)
+# Output via stdout
+translate_smart_to_oe() {
+ arg1="$1"
+
+ # Dump installed packages
+ while read pkg arch other ; do
+ if [ -z "$pkg" ]; then
+ continue
+ fi
+ new_pkg=$pkg
+ for i in ${MULTILIB_PREFIX_LIST} ; do
+ old_IFS="$IFS"
+ IFS=":"
+ set $i
+ IFS="$old_IFS"
+ mlib="$1"
+ shift
+ while [ -n "$1" ]; do
+ cmp_arch=$1
+ shift
+ if [ "$arch" = "$cmp_arch" -o "${arch//_/-}" = "$cmp_arch" ]; then
+ if [ "$mlib" = "default" ]; then
+ new_pkg="$pkg"
+ else
+ new_pkg="$mlib-$pkg"
+ fi
+ break
+ fi
+ done
+ if [ "$arch" = "$cmp_arch" -o "${arch//_/-}" = "$cmp_arch" ]; then
+ break
+ fi
+ done
+
+ #echo "$pkg -> $new_pkg" >&2
+ if [ "$arg1" = "arch" ]; then
+ echo $new_pkg $cmp_arch $other
+ else
+ echo $new_pkg $other
+ fi
+ done
+}
+
+# Translate the OE multilib format names to the RPM/Smart format names
+# Input via arguments
+# Ouput via pkgs_to_install
+translate_oe_to_smart() {
+ attemptonly="Error"
+ if [ "$1" = "--attemptonly" ]; then
+ attemptonly="Warning"
+ shift
+ fi
+
+ # Dump a list of all available packages
+ [ ! -e ${target_rootfs}/install/tmp/fullpkglist.query ] && smart --data-dir=${target_rootfs}/var/lib/smart query --output ${target_rootfs}/install/tmp/fullpkglist.query
+
+ pkgs_to_install=""
+ for pkg in "$@" ; do
+ new_pkg="$pkg"
+ for i in ${MULTILIB_PREFIX_LIST} ; do
+ old_IFS="$IFS"
+ IFS=":"
+ set $i
+ IFS="$old_IFS"
+ mlib="$1"
+ shift
+ if [ "$mlib" = "default" ]; then
+ if [ -z "$default_archs" ]; then
+ default_archs=$@
+ fi
+ continue
+ fi
+ subst=${pkg#${mlib}-}
+ if [ "$subst" != "$pkg" ]; then
+ feeds=$@
+ while [ -n "$1" ]; do
+ arch="$1"
+ arch=${arch//-/_}
+ shift
+ if grep -q '^'$subst'-[^-]*-[^-]*@'$arch'$' ${target_rootfs}/install/tmp/fullpkglist.query ; then
+ new_pkg="$subst@$arch"
+ # First found is best match
+ break
+ fi
+ done
+ if [ "$pkg" = "$new_pkg" ]; then
+ # Failed to translate, package not found!
+ echo "$attemptonly: $pkg not found in the $mlib feeds ($feeds)." >&2
+ if [ "$attemptonly" = "Error" ]; then
+ exit 1
+ fi
+ continue
+ fi
+ fi
+ done
+ # Apparently not a multilib package...
+ if [ "$pkg" = "$new_pkg" ]; then
+ for arch in $default_archs ; do
+ arch=${arch//-/_}
+ if grep -q '^'$pkg'-[^-]*-[^-]*@'$arch'$' ${target_rootfs}/install/tmp/fullpkglist.query ; then
+ new_pkg="$pkg@$arch"
+ # First found is best match
+ break
+ fi
+ done
+ if [ "$pkg" = "$new_pkg" ]; then
+ # Failed to translate, package not found!
+ echo "$attemptonly: $pkg not found in the base feeds ($default_archs)." >&2
+ if [ "$attemptonly" = "Error" ]; then
+ exit 1
+ fi
+ continue
+ fi
+ fi
+ #echo "$pkg -> $new_pkg" >&2
+ pkgs_to_install="${pkgs_to_install} ${new_pkg}"
+ done
+ export pkgs_to_install
+}
+
#
# Install a bunch of packages using rpm.
@@ -102,14 +238,17 @@ package_install_internal_rpm () {
export RPM_ETCRPM=${target_rootfs}/etc/rpm
# Setup temporary directory -- install...
- mkdir -p ${target_rootfs}/install
+ rm -rf ${target_rootfs}/install
+ mkdir -p ${target_rootfs}/install/tmp
+ channel_priority=5
if [ "${INSTALL_COMPLEMENTARY_RPM}" != "1" ] ; then
# Setup base system configuration
mkdir -p ${target_rootfs}/etc/rpm/
echo "${platform}${TARGET_VENDOR}-${TARGET_OS}" > ${target_rootfs}/etc/rpm/platform
if [ ! -z "$platform_extra" ]; then
for pt in $platform_extra ; do
+ channel_priority=$(expr $channel_priority + 5)
case $pt in
noarch | any | all)
os="`echo ${TARGET_OS} | sed "s,-.*,,"`.*"
@@ -181,10 +320,13 @@ EOF
smart --data-dir=${target_rootfs}/var/lib/smart channel --add rpmsys type=rpm-sys -y
for arch in $platform_extra ; do
+ arch=${arch//-/_}
if [ -d ${DEPLOY_DIR_RPM}/$arch -a ! -e ${target_rootfs}/install/channel.$arch.stamp ] ; then
smart --data-dir=${target_rootfs}/var/lib/smart channel --add $arch type=rpm-md type=rpm-md baseurl=${DEPLOY_DIR_RPM}/$arch -y
+ smart --data-dir=${target_rootfs}/var/lib/smart channel --set $arch priority=$channel_priority
touch ${target_rootfs}/install/channel.$arch.stamp
fi
+ channel_priority=$(expr $channel_priority - 5)
done
fi
@@ -218,14 +360,15 @@ EOF
chmod 0755 ${WORKDIR}/scriptlet_wrapper
smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._cross_scriptlet_wrapper=${WORKDIR}/scriptlet_wrapper
- smart --data-dir=${target_rootfs}/var/lib/smart install -y ${package_to_install} ${package_linguas}
+ # Determine what to install
+ translate_oe_to_smart ${package_to_install} ${package_linguas}
- if [ ! -z "${package_attemptonly}" ]; then
- echo "Installing attempt only packages..."
- for pkg_name in ${package_attemptonly} ; do
- echo "Attempting $pkg_name..." >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}"
- smart --data-dir=${target_rootfs}/var/lib/smart install -y $pkg_name >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}" 2>&1 || true
- done
+ [ -n "$pkgs_to_install" ] && smart --data-dir=${target_rootfs}/var/lib/smart install -y ${pkgs_to_install}
+
+ if [ -n "${package_attemptonly}" ]; then
+ translate_oe_to_smart --attemptonly $package_attemptonly
+ echo "Attempting $pkgs_to_install"
+ smart --data-dir=${target_rootfs}/var/lib/smart install -y $pkgs_to_install >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}" 2>&1 || true
fi
}
diff --git a/meta/classes/populate_sdk_rpm.bbclass b/meta/classes/populate_sdk_rpm.bbclass
index e7850ab..0a016d5 100644
--- a/meta/classes/populate_sdk_rpm.bbclass
+++ b/meta/classes/populate_sdk_rpm.bbclass
@@ -49,8 +49,16 @@ populate_sdk_rpm () {
# List must be prefered to least preferred order
INSTALL_PLATFORM_EXTRA_RPM=""
- for each_arch in ${MULTILIB_PACKAGE_ARCHS} ${PACKAGE_ARCHS} ; do
- INSTALL_PLATFORM_EXTRA_RPM="$each_arch $INSTALL_PLATFORM_EXTRA_RPM"
+ for i in ${MULTILIB_PREFIX_LIST} ; do
+ old_IFS="$IFS"
+ IFS=":"
+ set $i
+ IFS="$old_IFS"
+ shift #remove mlib
+ while [ -n "$1" ]; do
+ INSTALL_PLATFORM_EXTRA_RPM="$INSTALL_PLATFORM_EXTRA_RPM $1"
+ shift
+ done
done
export INSTALL_PLATFORM_EXTRA_RPM
@@ -93,8 +101,11 @@ populate_sdk_rpm () {
python () {
# The following code should be kept in sync w/ the rootfs_rpm version.
- ml_package_archs = ""
- ml_prefix_list = ""
+
+ # package_arch order is reversed. This ensures the -best- match is listed first!
+ package_archs = d.getVar("PACKAGE_ARCHS", True) or ""
+ package_archs = ":".join(package_archs.split()[::-1])
+ ml_prefix_list = "%s:%s" % ('default', package_archs)
multilibs = d.getVar('MULTILIBS', True) or ""
for ext in multilibs.split():
eext = ext.split(':')
@@ -104,11 +115,8 @@ python () {
if default_tune:
localdata.setVar("DEFAULTTUNE", default_tune)
package_archs = localdata.getVar("PACKAGE_ARCHS", True) or ""
- package_archs = " ".join([i in "all noarch any".split() and i or eext[1]+"_"+i for i in package_archs.split()])
- ml_package_archs += " " + package_archs
- ml_prefix_list += " " + eext[1]
- #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1], localdata.getVar("PACKAGE_ARCHS", True) or "(none)", overrides))
- d.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs)
+ package_archs = ":".join([i in "all noarch any".split() and i or eext[1]+"_"+i for i in package_archs.split()][::-1])
+ ml_prefix_list += " %s:%s" % (eext[1], package_archs)
d.setVar('MULTILIB_PREFIX_LIST', ml_prefix_list)
}
diff --git a/meta/classes/rootfs_rpm.bbclass b/meta/classes/rootfs_rpm.bbclass
index 17de9dc..76adb26 100644
--- a/meta/classes/rootfs_rpm.bbclass
+++ b/meta/classes/rootfs_rpm.bbclass
@@ -59,8 +59,16 @@ fakeroot rootfs_rpm_do_rootfs () {
# List must be prefered to least preferred order
INSTALL_PLATFORM_EXTRA_RPM=""
- for each_arch in ${MULTILIB_PACKAGE_ARCHS} ${PACKAGE_ARCHS}; do
- INSTALL_PLATFORM_EXTRA_RPM="$each_arch $INSTALL_PLATFORM_EXTRA_RPM"
+ for i in ${MULTILIB_PREFIX_LIST} ; do
+ old_IFS="$IFS"
+ IFS=":"
+ set $i
+ IFS="$old_IFS"
+ shift #remove mlib
+ while [ -n "$1" ]; do
+ INSTALL_PLATFORM_EXTRA_RPM="$INSTALL_PLATFORM_EXTRA_RPM $1"
+ shift
+ done
done
export INSTALL_PLATFORM_RPM
@@ -140,21 +148,12 @@ rpm_setup_smart_target_config() {
RPM_QUERY_CMD = '${RPM} --root $INSTALL_ROOTFS_RPM -D "_dbpath ${rpmlibdir}"'
list_installed_packages() {
- GET_LIST=$(${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH} %{PACKAGEORIGIN} %{Platform}\n]")
-
- # Use awk to find the multilib prefix and compare it
- # with the platform RPM thinks it is part of
- for prefix in `echo ${MULTILIB_PREFIX_LIST}`; do
- GET_LIST=$(echo "$GET_LIST" | awk -v prefix="$prefix" '$0 ~ prefix {printf("%s-%s\n", prefix, $0); } $0 !~ prefix {print $0}')
- done
-
- # print the info, need to different return counts
- if [ "$1" = "arch" ] ; then
- echo "$GET_LIST" | awk -v archs="${PACKAGE_ARCHS}" '{if(!index(archs, $2)) {gsub("_", "-", $2)} print $1, $2}'
- elif [ "$1" = "file" ] ; then
- echo "$GET_LIST" | awk '{print $1, $3}'
- else
- echo "$GET_LIST" | awk '{print $1}'
+ if [ "$1" = "arch" ]; then
+ ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]" | translate_smart_to_oe arch | tee /tmp/arch_list
+ elif [ "$1" = "file" ]; then
+ ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH} %{PACKAGEORIGIN}\n]" | translate_smart_to_oe | tee /tmp/file_list
+ else
+ ${RPM_QUERY_CMD} -qa --qf "[%{NAME} %{ARCH}\n]" | translate_smart_to_oe | tee /tmp/default_list
fi
}
@@ -184,8 +183,11 @@ python () {
d.setVar('RPM_POSTPROCESS_COMMANDS', '')
# The following code should be kept in sync w/ the populate_sdk_rpm version.
- ml_package_archs = ""
- ml_prefix_list = ""
+
+ # package_arch order is reversed. This ensures the -best- match is listed first!
+ package_archs = d.getVar("PACKAGE_ARCHS", True) or ""
+ package_archs = ":".join(package_archs.split()[::-1])
+ ml_prefix_list = "%s:%s" % ('default', package_archs)
multilibs = d.getVar('MULTILIBS', True) or ""
for ext in multilibs.split():
eext = ext.split(':')
@@ -195,10 +197,7 @@ python () {
if default_tune:
localdata.setVar("DEFAULTTUNE", default_tune)
package_archs = localdata.getVar("PACKAGE_ARCHS", True) or ""
- package_archs = " ".join([i in "all noarch any".split() and i or eext[1]+"_"+i for i in package_archs.split()])
- ml_package_archs += " " + package_archs
- ml_prefix_list += " " + eext[1]
- #bb.note("ML_PACKAGE_ARCHS %s %s %s" % (eext[1], localdata.getVar("PACKAGE_ARCHS", True) or "(none)", overrides))
- d.setVar('MULTILIB_PACKAGE_ARCHS', ml_package_archs)
+ package_archs = ":".join([i in "all noarch any".split() and i or eext[1]+"_"+i for i in package_archs.split()][::-1])
+ ml_prefix_list += " %s:%s" % (eext[1], package_archs)
d.setVar('MULTILIB_PREFIX_LIST', ml_prefix_list)
}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 5/6] package_rpm.bbclass: Add additional logging
2012-12-04 19:49 [PATCH 0/6] Integrate Smart for RPM image generation Mark Hatle
` (3 preceding siblings ...)
2012-12-04 19:49 ` [PATCH 4/6] package_rpm: Update the way the multilib package names are translated Mark Hatle
@ 2012-12-04 19:49 ` Mark Hatle
2012-12-04 19:49 ` [PATCH 6/6] package_rpm.bbclass: Add support for incremental installs Mark Hatle
` (3 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Mark Hatle @ 2012-12-04 19:49 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/package_rpm.bbclass | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 41c32f4..260110a 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -244,6 +244,7 @@ package_install_internal_rpm () {
channel_priority=5
if [ "${INSTALL_COMPLEMENTARY_RPM}" != "1" ] ; then
# Setup base system configuration
+ echo "Note: configuring RPM platform settings"
mkdir -p ${target_rootfs}/etc/rpm/
echo "${platform}${TARGET_VENDOR}-${TARGET_OS}" > ${target_rootfs}/etc/rpm/platform
if [ ! -z "$platform_extra" ]; then
@@ -262,6 +263,7 @@ package_install_internal_rpm () {
fi
# Tell RPM that the "/" directory exist and is available
+ echo "Note: configuring RPM system provides"
mkdir -p ${target_rootfs}/etc/rpm/sysinfo
echo "/" >${target_rootfs}/etc/rpm/sysinfo/Dirnames
@@ -273,6 +275,7 @@ package_install_internal_rpm () {
fi
# Configure RPM... we enforce these settings!
+ echo "Note: configuring RPM DB settings"
mkdir -p ${target_rootfs}${rpmlibdir}
mkdir -p ${target_rootfs}${rpmlibdir}/log
# After change the __db.* cache size, log file will not be generated automatically,
@@ -310,6 +313,7 @@ EOF
rpm --root $target_rootfs --dbpath /var/lib/rpm -qa > /dev/null
# Configure smart
+ echo "Note: configuring Smart settings"
rm -rf ${target_rootfs}/var/lib/smart
smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-root=${target_rootfs}
smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-dbpath=${rpmlibdir}
@@ -322,6 +326,7 @@ EOF
for arch in $platform_extra ; do
arch=${arch//-/_}
if [ -d ${DEPLOY_DIR_RPM}/$arch -a ! -e ${target_rootfs}/install/channel.$arch.stamp ] ; then
+ echo "Note: adding Smart channel $arch ($channel_priority)"
smart --data-dir=${target_rootfs}/var/lib/smart channel --add $arch type=rpm-md type=rpm-md baseurl=${DEPLOY_DIR_RPM}/$arch -y
smart --data-dir=${target_rootfs}/var/lib/smart channel --set $arch priority=$channel_priority
touch ${target_rootfs}/install/channel.$arch.stamp
@@ -357,15 +362,19 @@ if [ \$? -ne 0 ]; then
fi
EOF
+ echo "Note: configuring RPM cross-install scriptlet_wrapper"
chmod 0755 ${WORKDIR}/scriptlet_wrapper
smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._cross_scriptlet_wrapper=${WORKDIR}/scriptlet_wrapper
# Determine what to install
translate_oe_to_smart ${package_to_install} ${package_linguas}
+ echo "Note: to be installed: ${pkgs_to_install}"
[ -n "$pkgs_to_install" ] && smart --data-dir=${target_rootfs}/var/lib/smart install -y ${pkgs_to_install}
if [ -n "${package_attemptonly}" ]; then
+ echo "Note: installing attempt only packages..."
+ echo "Note: see `dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}"
translate_oe_to_smart --attemptonly $package_attemptonly
echo "Attempting $pkgs_to_install"
smart --data-dir=${target_rootfs}/var/lib/smart install -y $pkgs_to_install >> "`dirname ${BB_LOGFILE}`/log.do_${task}_attemptonly.${PID}" 2>&1 || true
--
1.7.3.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* [PATCH 6/6] package_rpm.bbclass: Add support for incremental installs
2012-12-04 19:49 [PATCH 0/6] Integrate Smart for RPM image generation Mark Hatle
` (4 preceding siblings ...)
2012-12-04 19:49 ` [PATCH 5/6] package_rpm.bbclass: Add additional logging Mark Hatle
@ 2012-12-04 19:49 ` Mark Hatle
2012-12-06 5:08 ` [PATCH 0/6] Integrate Smart for RPM image generation Saul Wold
` (2 subsequent siblings)
8 siblings, 0 replies; 17+ messages in thread
From: Mark Hatle @ 2012-12-04 19:49 UTC (permalink / raw)
To: openembedded-core
Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
meta/classes/package_rpm.bbclass | 48 +++++++++++++++++++++++++++++++++++++-
1 files changed, 47 insertions(+), 1 deletions(-)
diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
index 260110a..9fbdc05 100644
--- a/meta/classes/package_rpm.bbclass
+++ b/meta/classes/package_rpm.bbclass
@@ -321,7 +321,8 @@ EOF
smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-noparentdirs=1
smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._var=${localstatedir}
smart --data-dir=${target_rootfs}/var/lib/smart config --set rpm-extra-macros._tmppath=/install/tmp
- smart --data-dir=${target_rootfs}/var/lib/smart channel --add rpmsys type=rpm-sys -y
+ # Delay this until later...
+ #smart --data-dir=${target_rootfs}/var/lib/smart channel --add rpmsys type=rpm-sys -y
for arch in $platform_extra ; do
arch=${arch//-/_}
@@ -369,6 +370,51 @@ EOF
# Determine what to install
translate_oe_to_smart ${package_to_install} ${package_linguas}
+ # If incremental install, we need to determine what we've got,
+ # what we need to add, and what to remove...
+ if [ "${INC_RPM_IMAGE_GEN}" = "1" -a "${INSTALL_COMPLEMENTARY_RPM}" != "1" ]; then
+ # Dump the new solution
+ echo "Note: creating install solution for incremental install"
+ smart --data-dir=${target_rootfs}/var/lib/smart install -y --dump ${pkgs_to_install} 2> ${target_rootfs}/../solution.manifest
+ fi
+
+ if [ "${INSTALL_COMPLEMENTARY_RPM}" != "1" ]; then
+ echo "Note: adding Smart RPM DB channel"
+ smart --data-dir=${target_rootfs}/var/lib/smart channel --add rpmsys type=rpm-sys -y
+ fi
+
+ # If incremental install, we need to determine what we've got,
+ # what we need to add, and what to remove...
+ if [ "${INC_RPM_IMAGE_GEN}" = "1" -a "${INSTALL_COMPLEMENTARY_RPM}" != "1" ]; then
+ # First upgrade everything that was previously installed to the latest version
+ echo "Note: incremental update -- upgrade packages in place"
+ smart --data-dir=${target_rootfs}/var/lib/smart upgrade
+
+ # Dump what is already installed
+ echo "Note: dump installed packages for incremental update"
+ smart --data-dir=${target_rootfs}/var/lib/smart query --installed --output ${target_rootfs}/../installed.manifest
+
+ sort ${target_rootfs}/../installed.manifest > ${target_rootfs}/../installed.manifest.sorted
+ sort ${target_rootfs}/../solution.manifest > ${target_rootfs}/../solution.manifest.sorted
+
+ comm -1 -3 ${target_rootfs}/../solution.manifest.sorted ${target_rootfs}/../installed.manifest.sorted \
+ > ${target_rootfs}/../remove.list
+ comm -2 -3 ${target_rootfs}/../solution.manifest.sorted ${target_rootfs}/../installed.manifest.sorted \
+ > ${target_rootfs}/../install.list
+
+ pkgs_to_remove=`cat ${target_rootfs}/../remove.list | xargs echo`
+ pkgs_to_install=`cat ${target_rootfs}/../install.list | xargs echo`
+
+ echo "Note: to be removed: ${pkgs_to_remove}"
+
+ for pkg in ${pkgs_to_remove}; do
+ echo "Debug: What required: $pkg"
+ smart --data-dir=${target_rootfs}/var/lib/smart query $pkg --show-requiredby
+ done
+
+ [ -n "$pkgs_to_remove" ] && smart --data-dir=${target_rootfs}/var/lib/smart remove -y ${pkgs_to_remove}
+ fi
+
echo "Note: to be installed: ${pkgs_to_install}"
[ -n "$pkgs_to_install" ] && smart --data-dir=${target_rootfs}/var/lib/smart install -y ${pkgs_to_install}
--
1.7.3.4
^ permalink raw reply related [flat|nested] 17+ messages in thread
* Re: [PATCH 0/6] Integrate Smart for RPM image generation
2012-12-04 19:49 [PATCH 0/6] Integrate Smart for RPM image generation Mark Hatle
` (5 preceding siblings ...)
2012-12-04 19:49 ` [PATCH 6/6] package_rpm.bbclass: Add support for incremental installs Mark Hatle
@ 2012-12-06 5:08 ` Saul Wold
2012-12-06 13:58 ` Paul Eggleton
2012-12-06 17:04 ` Mark Hatle
2012-12-08 3:29 ` Saul Wold
2012-12-08 6:37 ` Saul Wold
8 siblings, 2 replies; 17+ messages in thread
From: Saul Wold @ 2012-12-06 5:08 UTC (permalink / raw)
To: Mark Hatle; +Cc: openembedded-core
On 12/04/2012 11:49 AM, Mark Hatle wrote:
> The following patch set relies on the previous "Misc fixes" sent out earlier
> today.
>
> The set replaces the existing rootfs generation with one based on Smart.
> The work was tested using buildhistory over a wide range of image types:
> core-image-minimal
> core-image-base
> core-image-basic
> core-image-lsb
> core-image-sato
> build-appliance
>
Did you try with the DISTRO = poky-lsb when doing the lsb build? There
are failures across the board with the LSB builds, see this example:
http://autobuilder.yoctoproject.org:8010/builders/nightly-x86-64-lsb/builds/146/steps/shell_29/logs/stdio
The failure seems to be on psplash:
| Error: psplash not found in the base feeds (qemux86_64 x86_64 noarch
any all).
| ERROR: Function failed: do_rootfs (see
/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64-lsb/build/build/tmp/work/qemux86_64-poky-linux/core-image-lsb-dev/1.0-r0/temp/log.do_rootfs.10377
for further information)
NOTE: recipe core-image-lsb-dev-1.0-r0: task do_rootfs: Failed
Can you look into this before we integrate into master
Thanks
Sau!
> Each of which contained minor changes from the former version, but the changes
> can all be explained by a different package resolver.
>
> Multilib configurations of each of the above images were also verified on
> qemux86_64 configuration with a few lib32 items added to the mix. This was
> shown, by buildhistory, to result in a more compact install solution.
>
> "populate_sdk" was also verified after this patch. Buildhistory does not
> verify SDKs, so these were verified by hand. The target items all appeared
> to match the expected image components.
>
> The incremental RPM installation code was verified as well.. This code was
> verified in both multilib and non-multilib configurations.
>
> Finally, each of these were verified on: qemux86_64, qemumips, qemuppc, qemuarm,
> and qemuarm configured w/ hardware float API. This verifies that both the
> ARM specific "gnueabi" issues and the _ to - in the arch names both work
> properly.
>
> The following changes since commit 0c69e555dda2fa412ba12fa90886b0b92dc60e44:
>
> license.bbclass: Avoid grep error message (2012-12-04 11:10:18 -0600)
>
> are available in the git repository at:
> git://git.yoctoproject.org/poky-contrib mhatle/smart
> http://git.yoctoproject.org/cgit.cgi//log/?h=mhatle/smart
>
> Mark Hatle (4):
> rootfs_rpm.bbclass: Revert to default shell logging behavior
> package_rpm: Update the way the multilib package names are translated
> package_rpm.bbclass: Add additional logging
> package_rpm.bbclass: Add support for incremental installs
>
> Paul Eggleton (2):
> classes/*_rpm: integrate Smart into RPM filesystem construction
> classes/rootfs_rpm: install smart instead of zypper in rpm-based
> images
>
> meta/classes/package_rpm.bbclass | 691 +++++++++++++--------------------
> meta/classes/populate_sdk_rpm.bbclass | 74 ++---
> meta/classes/rootfs_rpm.bbclass | 86 ++---
> 3 files changed, 338 insertions(+), 513 deletions(-)
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/6] Integrate Smart for RPM image generation
2012-12-06 5:08 ` [PATCH 0/6] Integrate Smart for RPM image generation Saul Wold
@ 2012-12-06 13:58 ` Paul Eggleton
2012-12-06 17:04 ` Mark Hatle
1 sibling, 0 replies; 17+ messages in thread
From: Paul Eggleton @ 2012-12-06 13:58 UTC (permalink / raw)
To: Saul Wold, Mark Hatle; +Cc: openembedded-core
On Wednesday 05 December 2012 21:08:59 Saul Wold wrote:
> On 12/04/2012 11:49 AM, Mark Hatle wrote:
> > The following patch set relies on the previous "Misc fixes" sent out
> > earlier today.
> >
> > The set replaces the existing rootfs generation with one based on Smart.
> > The work was tested using buildhistory over a wide range of image types:
> > core-image-minimal
> > core-image-base
> > core-image-basic
> > core-image-lsb
> > core-image-sato
> > build-appliance
>
> Did you try with the DISTRO = poky-lsb when doing the lsb build? There
> are failures across the board with the LSB builds
I just did with core-image-lsb, and apart from the pkgconfig issue which I have
worked around, it built fine - I did not see this error. The only thing I can
think of is that it has something to do with these running concurrently,
although I'm not sure how that could be a problem especially as we have
locking for the rpm backend.
I'm now running a concurrent build of all of the four images that failed,
we'll see if I get the same failure or not fairly soon.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/6] classes/*_rpm: integrate Smart into RPM filesystem construction
2012-12-04 19:49 ` [PATCH 2/6] classes/*_rpm: integrate Smart into RPM filesystem construction Mark Hatle
@ 2012-12-06 15:31 ` Richard Purdie
2012-12-06 16:13 ` Paul Eggleton
0 siblings, 1 reply; 17+ messages in thread
From: Richard Purdie @ 2012-12-06 15:31 UTC (permalink / raw)
To: Mark Hatle; +Cc: openembedded-core
On Tue, 2012-12-04 at 13:49 -0600, Mark Hatle wrote:
> From: Paul Eggleton <paul.eggleton@linux.intel.com>
>
> Use Smart to construct the root filesystem for images and the contents
> of SDKs rather than the custom scripts around rpm we had previously.
> This ensures the result when producing an updated image will be the
> same as upgrading to the same package versions from an older image on
> the target, as well as allowing us to remove a substantial amount of
> code making the rpm classes much easier to follow.
>
> Some bugfixes from Bogdan Marinescu <bogdan.marinescu@intel.com>.
> SDK implementation and testing as well as a number of bugfixes from
> Mark Hatle <mark.hatle@windriver.com>.
>
> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
> meta/classes/package_rpm.bbclass | 533 ++++++---------------------------
> meta/classes/populate_sdk_rpm.bbclass | 48 +---
> meta/classes/rootfs_rpm.bbclass | 31 +-
> 3 files changed, 117 insertions(+), 495 deletions(-)
>
> diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass
> index 200a941..aa5b156 100644
> --- a/meta/classes/package_rpm.bbclass
> +++ b/meta/classes/package_rpm.bbclass
> @@ -8,6 +8,8 @@ RPMBUILD="rpmbuild"
> PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms"
> PKGWRITEDIRSRPM = "${DEPLOY_DIR}/sources/deploy-srpm"
>
> +EXTRANATIVEPATH += "python-native"
> +
Er, no!
Why do we need to do this? We now need python-native at package
generation time? Why?
There is no dependency for that and this would totally kill build
performance if we did add it.
Cheers,
Richard
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/6] classes/*_rpm: integrate Smart into RPM filesystem construction
2012-12-06 15:31 ` Richard Purdie
@ 2012-12-06 16:13 ` Paul Eggleton
2012-12-06 17:19 ` Mark Hatle
0 siblings, 1 reply; 17+ messages in thread
From: Paul Eggleton @ 2012-12-06 16:13 UTC (permalink / raw)
To: Richard Purdie; +Cc: openembedded-core
On Thursday 06 December 2012 15:31:26 Richard Purdie wrote:
> On Tue, 2012-12-04 at 13:49 -0600, Mark Hatle wrote:
> > From: Paul Eggleton <paul.eggleton@linux.intel.com>
> >
> > Use Smart to construct the root filesystem for images and the contents
> > of SDKs rather than the custom scripts around rpm we had previously.
> > This ensures the result when producing an updated image will be the
> > same as upgrading to the same package versions from an older image on
> > the target, as well as allowing us to remove a substantial amount of
> > code making the rpm classes much easier to follow.
> >
> > Some bugfixes from Bogdan Marinescu <bogdan.marinescu@intel.com>.
> > SDK implementation and testing as well as a number of bugfixes from
> > Mark Hatle <mark.hatle@windriver.com>.
> >
> > Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
> > Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> > ---
> >
> > meta/classes/package_rpm.bbclass | 533
> > ++++++--------------------------- meta/classes/populate_sdk_rpm.bbclass
> > | 48 +---
> > meta/classes/rootfs_rpm.bbclass | 31 +-
> > 3 files changed, 117 insertions(+), 495 deletions(-)
> >
> > diff --git a/meta/classes/package_rpm.bbclass
> > b/meta/classes/package_rpm.bbclass index 200a941..aa5b156 100644
> > --- a/meta/classes/package_rpm.bbclass
> > +++ b/meta/classes/package_rpm.bbclass
> > @@ -8,6 +8,8 @@ RPMBUILD="rpmbuild"
> >
> > PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms"
> > PKGWRITEDIRSRPM = "${DEPLOY_DIR}/sources/deploy-srpm"
> >
> > +EXTRANATIVEPATH += "python-native"
> > +
>
> Er, no!
>
> Why do we need to do this? We now need python-native at package
> generation time? Why?
Sorry, I meant to come back to this before submitting; the reason I added it
was so that smart can find its python modules that get installed into the
native sysroot (which I was surprised to find that the setup did not allow it
to do out of the box, frankly). I'm sure there is a much better way to handle
this though - we only actually need the path to be accessible within
do_rootfs.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/6] Integrate Smart for RPM image generation
2012-12-06 5:08 ` [PATCH 0/6] Integrate Smart for RPM image generation Saul Wold
2012-12-06 13:58 ` Paul Eggleton
@ 2012-12-06 17:04 ` Mark Hatle
2012-12-06 17:22 ` Paul Eggleton
1 sibling, 1 reply; 17+ messages in thread
From: Mark Hatle @ 2012-12-06 17:04 UTC (permalink / raw)
To: Saul Wold; +Cc: openembedded-core
On 12/5/12 11:08 PM, Saul Wold wrote:
> On 12/04/2012 11:49 AM, Mark Hatle wrote:
>> The following patch set relies on the previous "Misc fixes" sent out earlier
>> today.
>>
>> The set replaces the existing rootfs generation with one based on Smart.
>> The work was tested using buildhistory over a wide range of image types:
>> core-image-minimal
>> core-image-base
>> core-image-basic
>> core-image-lsb
>> core-image-sato
>> build-appliance
>>
> Did you try with the DISTRO = poky-lsb when doing the lsb build? There
> are failures across the board with the LSB builds, see this example:
There is no poky-lsb within oe-core, so no I did not.
Do you have a branch with this integrated into Poky, if so I can try to
reproduce it locally.
--Mark
> http://autobuilder.yoctoproject.org:8010/builders/nightly-x86-64-lsb/builds/146/steps/shell_29/logs/stdio
>
>
> The failure seems to be on psplash:
> | Error: psplash not found in the base feeds (qemux86_64 x86_64 noarch
> any all).
> | ERROR: Function failed: do_rootfs (see
> /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-x86-64-lsb/build/build/tmp/work/qemux86_64-poky-linux/core-image-lsb-dev/1.0-r0/temp/log.do_rootfs.10377
> for further information)
> NOTE: recipe core-image-lsb-dev-1.0-r0: task do_rootfs: Failed
>
> Can you look into this before we integrate into master
>
> Thanks
> Sau!
>
>
>
>> Each of which contained minor changes from the former version, but the changes
>> can all be explained by a different package resolver.
>>
>> Multilib configurations of each of the above images were also verified on
>> qemux86_64 configuration with a few lib32 items added to the mix. This was
>> shown, by buildhistory, to result in a more compact install solution.
>>
>> "populate_sdk" was also verified after this patch. Buildhistory does not
>> verify SDKs, so these were verified by hand. The target items all appeared
>> to match the expected image components.
>>
>> The incremental RPM installation code was verified as well.. This code was
>> verified in both multilib and non-multilib configurations.
>>
>> Finally, each of these were verified on: qemux86_64, qemumips, qemuppc, qemuarm,
>> and qemuarm configured w/ hardware float API. This verifies that both the
>> ARM specific "gnueabi" issues and the _ to - in the arch names both work
>> properly.
>>
>> The following changes since commit 0c69e555dda2fa412ba12fa90886b0b92dc60e44:
>>
>> license.bbclass: Avoid grep error message (2012-12-04 11:10:18 -0600)
>>
>> are available in the git repository at:
>> git://git.yoctoproject.org/poky-contrib mhatle/smart
>> http://git.yoctoproject.org/cgit.cgi//log/?h=mhatle/smart
>>
>> Mark Hatle (4):
>> rootfs_rpm.bbclass: Revert to default shell logging behavior
>> package_rpm: Update the way the multilib package names are translated
>> package_rpm.bbclass: Add additional logging
>> package_rpm.bbclass: Add support for incremental installs
>>
>> Paul Eggleton (2):
>> classes/*_rpm: integrate Smart into RPM filesystem construction
>> classes/rootfs_rpm: install smart instead of zypper in rpm-based
>> images
>>
>> meta/classes/package_rpm.bbclass | 691 +++++++++++++--------------------
>> meta/classes/populate_sdk_rpm.bbclass | 74 ++---
>> meta/classes/rootfs_rpm.bbclass | 86 ++---
>> 3 files changed, 338 insertions(+), 513 deletions(-)
>>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 2/6] classes/*_rpm: integrate Smart into RPM filesystem construction
2012-12-06 16:13 ` Paul Eggleton
@ 2012-12-06 17:19 ` Mark Hatle
0 siblings, 0 replies; 17+ messages in thread
From: Mark Hatle @ 2012-12-06 17:19 UTC (permalink / raw)
To: Paul Eggleton; +Cc: openembedded-core
On 12/6/12 10:13 AM, Paul Eggleton wrote:
> On Thursday 06 December 2012 15:31:26 Richard Purdie wrote:
>> On Tue, 2012-12-04 at 13:49 -0600, Mark Hatle wrote:
>>> From: Paul Eggleton <paul.eggleton@linux.intel.com>
>>>
>>> Use Smart to construct the root filesystem for images and the contents
>>> of SDKs rather than the custom scripts around rpm we had previously.
>>> This ensures the result when producing an updated image will be the
>>> same as upgrading to the same package versions from an older image on
>>> the target, as well as allowing us to remove a substantial amount of
>>> code making the rpm classes much easier to follow.
>>>
>>> Some bugfixes from Bogdan Marinescu <bogdan.marinescu@intel.com>.
>>> SDK implementation and testing as well as a number of bugfixes from
>>> Mark Hatle <mark.hatle@windriver.com>.
>>>
>>> Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
>>> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
>>> ---
>>>
>>> meta/classes/package_rpm.bbclass | 533
>>> ++++++--------------------------- meta/classes/populate_sdk_rpm.bbclass
>>> | 48 +---
>>> meta/classes/rootfs_rpm.bbclass | 31 +-
>>> 3 files changed, 117 insertions(+), 495 deletions(-)
>>>
>>> diff --git a/meta/classes/package_rpm.bbclass
>>> b/meta/classes/package_rpm.bbclass index 200a941..aa5b156 100644
>>> --- a/meta/classes/package_rpm.bbclass
>>> +++ b/meta/classes/package_rpm.bbclass
>>> @@ -8,6 +8,8 @@ RPMBUILD="rpmbuild"
>>>
>>> PKGWRITEDIRRPM = "${WORKDIR}/deploy-rpms"
>>> PKGWRITEDIRSRPM = "${DEPLOY_DIR}/sources/deploy-srpm"
>>>
>>> +EXTRANATIVEPATH += "python-native"
>>> +
>>
>> Er, no!
>>
>> Why do we need to do this? We now need python-native at package
>> generation time? Why?
>
> Sorry, I meant to come back to this before submitting; the reason I added it
> was so that smart can find its python modules that get installed into the
> native sysroot (which I was surprised to find that the setup did not allow it
> to do out of the box, frankly). I'm sure there is a much better way to handle
> this though - we only actually need the path to be accessible within
> do_rootfs.
This is used by smart which is in the function package_install_internal_rpm,
which is used by populate_sdk_rpm and rootfs_rpm_do_rootfs.
This could be moved into the populate_sdk_rpm and rootfs_rpm classes, or we need
an easy way to simply add this to the path in the functions that call python-native.
--Mark
> Cheers,
> Paul
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/6] Integrate Smart for RPM image generation
2012-12-06 17:04 ` Mark Hatle
@ 2012-12-06 17:22 ` Paul Eggleton
0 siblings, 0 replies; 17+ messages in thread
From: Paul Eggleton @ 2012-12-06 17:22 UTC (permalink / raw)
To: Mark Hatle; +Cc: openembedded-core
On Thursday 06 December 2012 11:04:38 Mark Hatle wrote:
> On 12/5/12 11:08 PM, Saul Wold wrote:
> > On 12/04/2012 11:49 AM, Mark Hatle wrote:
> >> The following patch set relies on the previous "Misc fixes" sent out
> >> earlier today.
> >>
> >> The set replaces the existing rootfs generation with one based on Smart.
> >> The work was tested using buildhistory over a wide range of image types:
> >> core-image-minimal
> >> core-image-base
> >> core-image-basic
> >> core-image-lsb
> >> core-image-sato
> >> build-appliance
> >
> > Did you try with the DISTRO = poky-lsb when doing the lsb build? There
>
> > are failures across the board with the LSB builds, see this example:
> There is no poky-lsb within oe-core, so no I did not.
>
> Do you have a branch with this integrated into Poky, if so I can try to
> reproduce it locally.
I've just updated the poky-contrib paule/smart branch.
Cheers,
Paul
--
Paul Eggleton
Intel Open Source Technology Centre
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/6] Integrate Smart for RPM image generation
2012-12-04 19:49 [PATCH 0/6] Integrate Smart for RPM image generation Mark Hatle
` (6 preceding siblings ...)
2012-12-06 5:08 ` [PATCH 0/6] Integrate Smart for RPM image generation Saul Wold
@ 2012-12-08 3:29 ` Saul Wold
2012-12-08 6:37 ` Saul Wold
8 siblings, 0 replies; 17+ messages in thread
From: Saul Wold @ 2012-12-08 3:29 UTC (permalink / raw)
To: Mark Hatle; +Cc: openembedded-core
On 12/04/2012 11:49 AM, Mark Hatle wrote:
> The following patch set relies on the previous "Misc fixes" sent out earlier
> today.
>
> The set replaces the existing rootfs generation with one based on Smart.
> The work was tested using buildhistory over a wide range of image types:
> core-image-minimal
> core-image-base
> core-image-basic
> core-image-lsb
> core-image-sato
> build-appliance
>
> Each of which contained minor changes from the former version, but the changes
> can all be explained by a different package resolver.
>
> Multilib configurations of each of the above images were also verified on
> qemux86_64 configuration with a few lib32 items added to the mix. This was
> shown, by buildhistory, to result in a more compact install solution.
>
> "populate_sdk" was also verified after this patch. Buildhistory does not
> verify SDKs, so these were verified by hand. The target items all appeared
> to match the expected image components.
>
> The incremental RPM installation code was verified as well.. This code was
> verified in both multilib and non-multilib configurations.
>
> Finally, each of these were verified on: qemux86_64, qemumips, qemuppc, qemuarm,
> and qemuarm configured w/ hardware float API. This verifies that both the
> ARM specific "gnueabi" issues and the _ to - in the arch names both work
> properly.
>
Sanity tests need to be written and exchanged for the now failing zypper
sanity tests!!
Sau!
> The following changes since commit 0c69e555dda2fa412ba12fa90886b0b92dc60e44:
>
> license.bbclass: Avoid grep error message (2012-12-04 11:10:18 -0600)
>
> are available in the git repository at:
> git://git.yoctoproject.org/poky-contrib mhatle/smart
> http://git.yoctoproject.org/cgit.cgi//log/?h=mhatle/smart
>
> Mark Hatle (4):
> rootfs_rpm.bbclass: Revert to default shell logging behavior
> package_rpm: Update the way the multilib package names are translated
> package_rpm.bbclass: Add additional logging
> package_rpm.bbclass: Add support for incremental installs
>
> Paul Eggleton (2):
> classes/*_rpm: integrate Smart into RPM filesystem construction
> classes/rootfs_rpm: install smart instead of zypper in rpm-based
> images
>
> meta/classes/package_rpm.bbclass | 691 +++++++++++++--------------------
> meta/classes/populate_sdk_rpm.bbclass | 74 ++---
> meta/classes/rootfs_rpm.bbclass | 86 ++---
> 3 files changed, 338 insertions(+), 513 deletions(-)
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/6] Integrate Smart for RPM image generation
2012-12-04 19:49 [PATCH 0/6] Integrate Smart for RPM image generation Mark Hatle
` (7 preceding siblings ...)
2012-12-08 3:29 ` Saul Wold
@ 2012-12-08 6:37 ` Saul Wold
2012-12-08 17:10 ` Mark Hatle
8 siblings, 1 reply; 17+ messages in thread
From: Saul Wold @ 2012-12-08 6:37 UTC (permalink / raw)
To: Mark Hatle; +Cc: openembedded-core
There still seems to be a problem with the multilib build that I believe
comes from this set of changes.
> | Running intercept scripts:
> | WARNING: The license listed MIT was not in the licenses collected for lib32-packagegroup-core-boot
> | ls: cannot access /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-multilib/build/build/tmp/pkgdata/*/runtime-reverse/udev-extraconf: No such file or directory
> | readlink: missing operand
> | Try `readlink --help' for more information.
> | basename: missing operand
> | Try `basename --help' for more information.
> | ERROR: Function failed: do_rootfs (see /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-multilib/build/build/tmp/work/qemux86_64-poky-linux/lib32-core-image-minimal/1.0-r0/temp/log.do_rootfs.14393 for further information)
> NOTE: recipe lib32-core-image-minimal-1.0-r0: task do_rootfs: Failed
> ERROR: Task 7 (virtual:multilib:lib32:/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-multilib/build/meta/recipes-core/images/core-image-minimal.bb, do_rootfs) failed with exit code '1'
> NOTE: Tasks Summary: Attempted 1867 tasks of which 425 didn't need to be rerun and 1 failed.
Sau!
On 12/04/2012 11:49 AM, Mark Hatle wrote:
> The following patch set relies on the previous "Misc fixes" sent out earlier
> today.
>
> The set replaces the existing rootfs generation with one based on Smart.
> The work was tested using buildhistory over a wide range of image types:
> core-image-minimal
> core-image-base
> core-image-basic
> core-image-lsb
> core-image-sato
> build-appliance
>
> Each of which contained minor changes from the former version, but the changes
> can all be explained by a different package resolver.
>
> Multilib configurations of each of the above images were also verified on
> qemux86_64 configuration with a few lib32 items added to the mix. This was
> shown, by buildhistory, to result in a more compact install solution.
>
> "populate_sdk" was also verified after this patch. Buildhistory does not
> verify SDKs, so these were verified by hand. The target items all appeared
> to match the expected image components.
>
> The incremental RPM installation code was verified as well.. This code was
> verified in both multilib and non-multilib configurations.
>
> Finally, each of these were verified on: qemux86_64, qemumips, qemuppc, qemuarm,
> and qemuarm configured w/ hardware float API. This verifies that both the
> ARM specific "gnueabi" issues and the _ to - in the arch names both work
> properly.
>
> The following changes since commit 0c69e555dda2fa412ba12fa90886b0b92dc60e44:
>
> license.bbclass: Avoid grep error message (2012-12-04 11:10:18 -0600)
>
> are available in the git repository at:
> git://git.yoctoproject.org/poky-contrib mhatle/smart
> http://git.yoctoproject.org/cgit.cgi//log/?h=mhatle/smart
>
> Mark Hatle (4):
> rootfs_rpm.bbclass: Revert to default shell logging behavior
> package_rpm: Update the way the multilib package names are translated
> package_rpm.bbclass: Add additional logging
> package_rpm.bbclass: Add support for incremental installs
>
> Paul Eggleton (2):
> classes/*_rpm: integrate Smart into RPM filesystem construction
> classes/rootfs_rpm: install smart instead of zypper in rpm-based
> images
>
> meta/classes/package_rpm.bbclass | 691 +++++++++++++--------------------
> meta/classes/populate_sdk_rpm.bbclass | 74 ++---
> meta/classes/rootfs_rpm.bbclass | 86 ++---
> 3 files changed, 338 insertions(+), 513 deletions(-)
>
^ permalink raw reply [flat|nested] 17+ messages in thread
* Re: [PATCH 0/6] Integrate Smart for RPM image generation
2012-12-08 6:37 ` Saul Wold
@ 2012-12-08 17:10 ` Mark Hatle
0 siblings, 0 replies; 17+ messages in thread
From: Mark Hatle @ 2012-12-08 17:10 UTC (permalink / raw)
To: Saul Wold; +Cc: openembedded-core
What is the build configuration for this chunk?
Also this looks like it might be something within the license class, not the
rootfs, but I'm not sure.
--Mark
On 12/8/12 12:37 AM, Saul Wold wrote:
>
> There still seems to be a problem with the multilib build that I believe
> comes from this set of changes.
>
>> | Running intercept scripts:
>> | WARNING: The license listed MIT was not in the licenses collected for lib32-packagegroup-core-boot
>> | ls: cannot access /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-multilib/build/build/tmp/pkgdata/*/runtime-reverse/udev-extraconf: No such file or directory
>> | readlink: missing operand
>> | Try `readlink --help' for more information.
>> | basename: missing operand
>> | Try `basename --help' for more information.
>> | ERROR: Function failed: do_rootfs (see /srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-multilib/build/build/tmp/work/qemux86_64-poky-linux/lib32-core-image-minimal/1.0-r0/temp/log.do_rootfs.14393 for further information)
>> NOTE: recipe lib32-core-image-minimal-1.0-r0: task do_rootfs: Failed
>> ERROR: Task 7 (virtual:multilib:lib32:/srv/home/pokybuild/yocto-autobuilder/yocto-slave/nightly-multilib/build/meta/recipes-core/images/core-image-minimal.bb, do_rootfs) failed with exit code '1'
>> NOTE: Tasks Summary: Attempted 1867 tasks of which 425 didn't need to be rerun and 1 failed.
>
> Sau!
>
>
> On 12/04/2012 11:49 AM, Mark Hatle wrote:
>> The following patch set relies on the previous "Misc fixes" sent out earlier
>> today.
>>
>> The set replaces the existing rootfs generation with one based on Smart.
>> The work was tested using buildhistory over a wide range of image types:
>> core-image-minimal
>> core-image-base
>> core-image-basic
>> core-image-lsb
>> core-image-sato
>> build-appliance
>>
>> Each of which contained minor changes from the former version, but the changes
>> can all be explained by a different package resolver.
>>
>> Multilib configurations of each of the above images were also verified on
>> qemux86_64 configuration with a few lib32 items added to the mix. This was
>> shown, by buildhistory, to result in a more compact install solution.
>>
>> "populate_sdk" was also verified after this patch. Buildhistory does not
>> verify SDKs, so these were verified by hand. The target items all appeared
>> to match the expected image components.
>>
>> The incremental RPM installation code was verified as well.. This code was
>> verified in both multilib and non-multilib configurations.
>>
>> Finally, each of these were verified on: qemux86_64, qemumips, qemuppc, qemuarm,
>> and qemuarm configured w/ hardware float API. This verifies that both the
>> ARM specific "gnueabi" issues and the _ to - in the arch names both work
>> properly.
>>
>> The following changes since commit 0c69e555dda2fa412ba12fa90886b0b92dc60e44:
>>
>> license.bbclass: Avoid grep error message (2012-12-04 11:10:18 -0600)
>>
>> are available in the git repository at:
>> git://git.yoctoproject.org/poky-contrib mhatle/smart
>> http://git.yoctoproject.org/cgit.cgi//log/?h=mhatle/smart
>>
>> Mark Hatle (4):
>> rootfs_rpm.bbclass: Revert to default shell logging behavior
>> package_rpm: Update the way the multilib package names are translated
>> package_rpm.bbclass: Add additional logging
>> package_rpm.bbclass: Add support for incremental installs
>>
>> Paul Eggleton (2):
>> classes/*_rpm: integrate Smart into RPM filesystem construction
>> classes/rootfs_rpm: install smart instead of zypper in rpm-based
>> images
>>
>> meta/classes/package_rpm.bbclass | 691 +++++++++++++--------------------
>> meta/classes/populate_sdk_rpm.bbclass | 74 ++---
>> meta/classes/rootfs_rpm.bbclass | 86 ++---
>> 3 files changed, 338 insertions(+), 513 deletions(-)
>>
^ permalink raw reply [flat|nested] 17+ messages in thread
end of thread, other threads:[~2012-12-08 17:25 UTC | newest]
Thread overview: 17+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-12-04 19:49 [PATCH 0/6] Integrate Smart for RPM image generation Mark Hatle
2012-12-04 19:49 ` [PATCH 1/6] rootfs_rpm.bbclass: Revert to default shell logging behavior Mark Hatle
2012-12-04 19:49 ` [PATCH 2/6] classes/*_rpm: integrate Smart into RPM filesystem construction Mark Hatle
2012-12-06 15:31 ` Richard Purdie
2012-12-06 16:13 ` Paul Eggleton
2012-12-06 17:19 ` Mark Hatle
2012-12-04 19:49 ` [PATCH 3/6] classes/rootfs_rpm: install smart instead of zypper in rpm-based images Mark Hatle
2012-12-04 19:49 ` [PATCH 4/6] package_rpm: Update the way the multilib package names are translated Mark Hatle
2012-12-04 19:49 ` [PATCH 5/6] package_rpm.bbclass: Add additional logging Mark Hatle
2012-12-04 19:49 ` [PATCH 6/6] package_rpm.bbclass: Add support for incremental installs Mark Hatle
2012-12-06 5:08 ` [PATCH 0/6] Integrate Smart for RPM image generation Saul Wold
2012-12-06 13:58 ` Paul Eggleton
2012-12-06 17:04 ` Mark Hatle
2012-12-06 17:22 ` Paul Eggleton
2012-12-08 3:29 ` Saul Wold
2012-12-08 6:37 ` Saul Wold
2012-12-08 17:10 ` Mark Hatle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox