<br><br>On Monday, June 11, 2012, Mark Hatle &lt;<a href="mailto:mark.hatle@windriver.com">mark.hatle@windriver.com</a>&gt; wrote:<br>&gt; An empty manifest will cause a failure condition.  We ensure that any install<br>&gt; actions occur only with a manifest larger then size 0.  Also ensure that padding<br>
&gt; is added to the end of the manifest, instead of the beginning to enable this<br>&gt; size check.  (Padding is required for very small manifest files..)<br>&gt;<br>&gt; Signed-off-by: Mark Hatle &lt;<a href="mailto:mark.hatle@windriver.com">mark.hatle@windriver.com</a>&gt;<br>
&gt; ---<br>&gt;  meta/classes/package_rpm.bbclass |   59 ++++++++++++++++++++++----------------<br>&gt;  1 files changed, 34 insertions(+), 25 deletions(-)<br>&gt;<br>&gt; diff --git a/meta/classes/package_rpm.bbclass b/meta/classes/package_rpm.bbclass<br>
&gt; index b84c044..bb9aa1a 100644<br>&gt; --- a/meta/classes/package_rpm.bbclass<br>&gt; +++ b/meta/classes/package_rpm.bbclass<br>&gt; @@ -182,6 +182,7 @@ rpm_update_pkg () {<br>&gt;         # been run by now, so don&#39;t have to run them(preun, postun, etc.) when<br>
&gt;         # erase the pkg<br>&gt;         if [ -s ${target_rootfs}/install/remove.manifest ]; then<br>&gt; +            echo &quot;# Removal manifest padding....&quot; &gt;&gt; ${target_rootfs}/install/remove.manifest<br>
<br>Should this be just &#39;remove&#39;<br><br>&gt;             rpm_common_comand --noscripts --nodeps \<br>&gt;                 -e `cat ${target_rootfs}/install/remove.manifest`<br>&gt;         fi<br>&gt; @@ -249,7 +250,7 @@ package_install_internal_rpm () {<br>
&gt;<br>&gt;        # Setup manifest of packages to install...<br>&gt;        mkdir -p ${target_rootfs}/install<br>&gt; -       echo &quot;# Install manifest&quot; &gt; ${target_rootfs}/install/install.manifest<br>&gt; +       rm -f ${target_rootfs}/install/install.manifest<br>
&gt;<br>&gt;        # Uclibc builds don&#39;t provide this stuff...<br>&gt;        if [ x${TARGET_OS} = &quot;xlinux&quot; ] || [ x${TARGET_OS} = &quot;xlinux-gnueabi&quot; ] ; then<br>&gt; @@ -309,12 +310,15 @@ package_install_internal_rpm () {<br>
&gt;<br>&gt;        # Generate an install solution by doing a --justdb install, then recreate it with<br>&gt;        # an actual package install!<br>&gt; -       ${RPM} --predefine &quot;_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo&quot; \<br>
&gt; -               --predefine &quot;_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform&quot; \<br>&gt; -               -D &quot;_dbpath ${target_rootfs}/install&quot; -D &quot;`cat ${confbase}-base_archs.macro`&quot; \<br>
&gt; -               -D &quot;__dbi_txn create nofsync&quot; \<br>&gt; -               -U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \<br>&gt; -               ${target_rootfs}/install/install.manifest<br>
&gt; +       if [ -s ${target_rootfs}/install/install.manifest ]; then<br>&gt; +               echo &quot;# Install manifest padding&quot; &gt;&gt; ${target_rootfs}/install/install.manifest<br>&gt; +               ${RPM} --predefine &quot;_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo&quot; \<br>
&gt; +                       --predefine &quot;_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform&quot; \<br>&gt; +                       -D &quot;_dbpath ${target_rootfs}/install&quot; -D &quot;`cat ${confbase}-base_archs.macro`&quot; \<br>
&gt; +                       -D &quot;__dbi_txn create nofsync&quot; \<br>&gt; +                       -U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \<br>&gt; +                       ${target_rootfs}/install/install.manifest<br>
&gt; +       fi<br>&gt;<br>&gt;        if [ ! -z &quot;${package_attemptonly}&quot; ]; then<br>&gt;                echo &quot;Adding attempt only packages...&quot;<br>&gt; @@ -407,8 +411,9 @@ package_install_internal_rpm () {<br>
&gt;<br>&gt;        touch ${target_rootfs}/install/install_multilib_solution.manifest<br>&gt;<br>&gt; -       if [ -e &quot;${target_rootfs}/install/install_multilib.manifest&quot; ]; then<br>&gt; +       if [ -s &quot;${target_rootfs}/install/install_multilib.manifest&quot; ]; then<br>
&gt;                # multilib package installation<br>&gt; +               echo &quot;# Install multilib manifest padding&quot; &gt;&gt; ${target_rootfs}/install/install_multilib.manifest<br>&gt;<br>&gt;                # Generate an install solution by doing a --justdb install, then recreate it with<br>
&gt;                # an actual package install!<br>&gt; @@ -493,33 +498,37 @@ EOF<br>&gt;        if [ &quot;${INC_RPM_IMAGE_GEN}&quot; = &quot;1&quot; -a -f &quot;$pre_btmanifest&quot; ]; then<br>&gt;                echo &quot;Skipping pre install due to exisitng image&quot;<br>
&gt;        else<br>&gt; -               echo &quot;# Initial Install manifest&quot; &gt; ${target_rootfs}/install/initial_install.manifest<br>&gt; +               rm -f ${target_rootfs}/install/initial_install.manifest<br>
&gt;                echo &quot;Installing base dependencies first (base-passwd, base-files and shadow) since rpm is special&quot;<br>&gt;                grep /base-passwd-[0-9] ${target_rootfs}/install/total_solution.manifest &gt;&gt; ${target_rootfs}/install/initial_install.manifest || true<br>
&gt;                grep /base-files-[0-9] ${target_rootfs}/install/total_solution.manifest &gt;&gt; ${target_rootfs}/install/initial_install.manifest || true<br>&gt;                grep /shadow-[0-9] ${target_rootfs}/install/total_solution.manifest &gt;&gt; ${target_rootfs}/install/initial_install.manifest || true<br>
&gt;<br>&gt; -               # Generate an install solution by doing a --justdb install, then recreate it with<br>&gt; -               # an actual package install!<br>&gt; -               mkdir -p ${target_rootfs}/initial<br>
&gt; +               if [ -s ${target_rootfs}/install/initial_install.manifest ]; then<br>&gt; +                       echo &quot;# Initial Install manifest padding...&quot; &gt;&gt; ${target_rootfs}/install/initial_install.manifest<br>
&gt;<br>&gt; -               ${RPM} --predefine &quot;_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo&quot; \<br>&gt; -                       --predefine &quot;_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform&quot; \<br>
&gt; -                       -D &quot;_dbpath ${target_rootfs}/initial&quot; -D &quot;`cat ${confbase}.macro`&quot; \<br>&gt; -                       -D &quot;__dbi_txn create nofsync&quot; \<br>&gt; -                       -U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \<br>
&gt; -                       ${target_rootfs}/install/initial_install.manifest<br>&gt; +                       # Generate an install solution by doing a --justdb install, then recreate it with<br>&gt; +                       # an actual package install!<br>
&gt; +                       mkdir -p ${target_rootfs}/initial<br>&gt;<br>&gt; -               ${RPM} -D &quot;_dbpath ${target_rootfs}/initial&quot; -qa --qf &quot;%{packageorigin}\n&quot; \<br>&gt; -                       -D &quot;__dbi_txn create nofsync private&quot; \<br>
&gt; -                       &gt; ${target_rootfs}/install/initial_solution.manifest<br>&gt; +                       ${RPM} --predefine &quot;_rpmds_sysinfo_path ${target_rootfs}/etc/rpm/sysinfo&quot; \<br>&gt; +                               --predefine &quot;_rpmrc_platform_path ${target_rootfs}/etc/rpm/platform&quot; \<br>
&gt; +                               -D &quot;_dbpath ${target_rootfs}/initial&quot; -D &quot;`cat ${confbase}.macro`&quot; \<br>&gt; +                               -D &quot;__dbi_txn create nofsync&quot; \<br>&gt; +                               -U --justdb --noscripts --notriggers --noparentdirs --nolinktos --ignoresize \<br>
&gt; +                               ${target_rootfs}/install/initial_install.manifest<br>&gt; +<br>&gt; +                       ${RPM} -D &quot;_dbpath ${target_rootfs}/initial&quot; -qa --qf &quot;%{packageorigin}\n&quot; \<br>
&gt; +                               -D &quot;__dbi_txn create nofsync private&quot; \<br>&gt; +                               &gt; ${target_rootfs}/install/initial_solution.manifest<br>&gt;<br>&gt; -               rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest<br>
&gt; +                       rpm_update_pkg ${target_rootfs}/install/initial_solution.manifest<br>&gt;<br>&gt; -               grep -Fv -f ${target_rootfs}/install/initial_solution.manifest ${target_rootfs}/install/total_solution.manifest &gt; ${target_rootfs}/install/total_solution.manifest.new<br>
&gt; -               mv ${target_rootfs}/install/total_solution.manifest.new ${target_rootfs}/install/total_solution.manifest<br>&gt; +                       grep -Fv -f ${target_rootfs}/install/initial_solution.manifest ${target_rootfs}/install/total_solution.manifest &gt; ${target_rootfs}/install/total_solution.manifest.new<br>
&gt; +                       mv ${target_rootfs}/install/total_solution.manifest.new ${target_rootfs}/install/total_solution.manifest<br>&gt;<br>&gt; -               rm -rf ${target_rootfs}/initial<br>&gt; +                       rm -rf ${target_rootfs}/initial<br>
&gt; +               fi<br>&gt;        fi<br>&gt;<br>&gt;        echo &quot;Installing main solution manifest (${target_rootfs}/install/total_solution.manifest)&quot;<br>&gt; --<br>&gt; 1.7.3.4<br>&gt;<br>&gt;<br>&gt; _______________________________________________<br>
&gt; Openembedded-core mailing list<br>&gt; <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>&gt; <a href="http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core">http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core</a><br>
&gt;