Skip to contentSkip to conversation

Misc fixes

PATCH In review Mark Hatle 6 participants 37 messages Dec 4, 2012 – Dec 6, 2012

lore
Share & tools
lore

Mark Hatle

author
#0 lore raw

cover Misc fixes

While working on the Smart integration PaulE and I fixed a number of small defect that we found. Some of the RPM package defects were not visible with the previous integration (it had silently worked around them), while other issues are small and nobody seems to have noticed them before.

The following changes since commit 24b954253dd1aa626835352c4dc8d085a19aae35:

xserver-xorg: restore packaging for the DRI/DRI2/DBE extensions (2012-12-03 16:38:28 +0000)

are available in the git repository at:
git://git.yoctoproject.org/poky-contrib mhatle/misc
http://git.yoctoproject.org/cgit.cgi//log/?h=mhatle/misc

Mark Hatle (13):
cpio: Split RMT from cpio
tar: Split RMT from tar
update-alternatives.bbclass: Add missing runtime dependency package_rpm.bbclass: Add the runtime dependencies to the pre/post
scriptlets
rpm: Move rpmdb_loadcvt from base to dev package
rpm: Fix rpm relocation macro usage
rpm: Fixup platform matching code
rpm: Fix Upstream-Status fields
python-smartpm: Fix incorrect comparison arguments
package_deb: Dependencies with a ( or ) in them are invalid in debs
pkgconfig: Add a manual dependency of pkgconfig(pkg-config)
pseudo: Rework target, native and nativesdk pseudo intergration license.bbclass: Avoid grep error message

Paul Eggleton (9):
rpm: enable _openall_before_chroot by default
createrepo: implement support for recommends
python-smartpm: add support for recommends
python-smartpm: style fixes
python-smartpm: fix package metadata not being read from rpm-md feeds
python-smartpm: don't create /var/tmp on every rpm database open
python-smartpm: support nolinktos and noparentdirs rpm options
python-smartpm: allow setting arbitrary macros in smart config
shadow: add runtime dependency on base-passwd

 meta/classes/license.bbclass                       |    3 +-
 meta/classes/package_deb.bbclass                   |   10 +
 meta/classes/package_rpm.bbclass                   |   86 +-
 meta/classes/update-alternatives.bbclass           |    6 +
 meta/recipes-devtools/pkgconfig/pkgconfig.inc      |    5 +
 meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb  |    2 +-
 meta/recipes-devtools/pkgconfig/pkgconfig_git.bb   |    1 +
 meta/recipes-devtools/pseudo/pseudo.inc            |   58 +-
 meta/recipes-devtools/pseudo/pseudo_1.4.1.bb       |    2 +-
 meta/recipes-devtools/pseudo/pseudo_git.bb         |    2 +-
 .../python/python-smartpm/smart-dflags.patch       |   40 +
 .../python-smartpm/smart-metadata-match.patch      |   28 +
 .../python/python-smartpm/smart-missingok.patch    |   43 -
 .../python/python-smartpm/smart-recommends.patch   | 1362 ++++++++++++++++++++
 .../python-smartpm/smart-rpm-extra-macros.patch    |   27 +
 .../python/python-smartpm/smart-rpm-md-parse.patch |   26 +
 .../python/python-smartpm/smart-tmpdir.patch       |   30 +
 .../python/python-smartpm_1.4.1.bb                 |   57 +-
 .../rpm/rpm/python-rpm-rpmsense.patch              |    2 +-
 .../rpm/rpm/rpm-db_buffer_small.patch              |    2 +-
 meta/recipes-devtools/rpm/rpm/rpm-platform2.patch  |   56 +
 .../rpm/rpm/rpm-reloc-macros.patch                 |   31 +
 .../rpm/rpm/rpm-stub-out-git_strerror.patch        |    2 +-
 .../rpm/rpm/rpm-uuid-include.patch                 |    2 +
 meta/recipes-devtools/rpm/rpm_5.4.9.bb             |   11 +-
 meta/recipes-extended/cpio/cpio_2.11.bb            |    2 +-
 meta/recipes-extended/cpio/cpio_2.8.bb             |    2 +-
 meta/recipes-extended/cpio/cpio_v2.inc             |   11 +-
 meta/recipes-extended/shadow/shadow_4.1.4.3.bb     |    5 +-
 meta/recipes-extended/tar/tar.inc                  |   11 +-
 meta/recipes-extended/tar/tar_1.17.bb              |    2 +-
 meta/recipes-extended/tar/tar_1.26.bb              |    2 +-
 .../createrepo/createrepo/recommends.patch         |   71 +
 .../createrepo/createrepo_0.4.11.bb                |    3 +-
 34 files changed, 1852 insertions(+), 151 deletions(-)
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-metadata-match.patch
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-missingok.patch
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-recommends.patch
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-rpm-extra-macros.patch
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-rpm-md-parse.patch
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-tmpdir.patch
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch
 create mode 100644 meta/recipes-support/createrepo/createrepo/recommends.patch
Signature · 1 line
1.7.3.4
author
#1 lore raw

PATCH 1/22 cpio: Split RMT from cpio

After the recent change of the libexecdir definition, the update-alternatives for the libexec rmt broke. Fix this by moving rmt from libexec to /sbin. Also split the rmt app from cpio as it's likely not useful to many users.

---
 meta/recipes-extended/cpio/cpio_2.11.bb |    2 +-
 meta/recipes-extended/cpio/cpio_2.8.bb  |    2 +-
 meta/recipes-extended/cpio/cpio_v2.inc  |   11 +++++++++--
 3 files changed, 11 insertions(+), 4 deletions(-)
meta/recipes-extended/cpio/cpio_2.11.bb +1 -1
index 9b37dcd..5f88b30 100644
@@ -3,7 +3,7 @@ include cpio_v2.inc
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=f27defe1e96c2e1ecd4e0c9be8967949"
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI += "file://remove-gets.patch \
            "
meta/recipes-extended/cpio/cpio_2.8.bb +1 -1
index cabc1cd..b6da207 100644
@@ -3,7 +3,7 @@ require cpio_v2.inc
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=b7f772ea3a2489231cb4872656cac34b"
 
-PR = "r2"
+PR = "r3"
 
 SRC_URI += "file://m4extensions.patch \
     file://avoid_heap_overflow.patch \
meta/recipes-extended/cpio/cpio_v2.inc +9 -2
index 3b3402b..30446b0 100644
@@ -14,6 +14,8 @@ inherit autotools gettext
 
 S = "${WORKDIR}/cpio-${PV}"
 
+EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
+
 do_install () {
     autotools_do_install
     install -d ${D}${base_bindir}/
@@ -21,13 +23,18 @@ do_install () {
     rmdir ${D}${bindir}/
 }
 
+PACKAGES =+ "${PN}-rmt"
+
+FILES_${PN}-rmt = "${base_sbindir}/rmt*"
+
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
 
-ALTERNATIVE_${PN} = "cpio rmt"
+ALTERNATIVE_${PN} = "cpio"
+ALTERNATIVE_${PN}-rmt = "rmt"
 
 ALTERNATIVE_LINK_NAME[cpio] = "${base_bindir}/cpio"
 
 ALTERNATIVE_PRIORITY[rmt] = "50"
-ALTERNATIVE_LINK_NAME[rmt] = "${libexecdir}/rmt"
+ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"
Signature · 1 line
1.7.3.4
author
#2 lore raw

PATCH 2/22 tar: Split RMT from tar

In reply to Mark Hatle

After the recent change of the libexecdir definition, the update-alternatives for the libexec rmt broke. Fix this by moving rmt from libexec to /sbin. Also split the rmt app from tar as it's likely not useful to many users.

---
 meta/recipes-extended/tar/tar.inc     |   11 +++++++++--
 meta/recipes-extended/tar/tar_1.17.bb |    2 +-
 meta/recipes-extended/tar/tar_1.26.bb |    2 +-
 3 files changed, 11 insertions(+), 4 deletions(-)
meta/recipes-extended/tar/tar.inc +9 -2
index b50425e..f49c7de 100644
@@ -8,6 +8,8 @@ SRC_URI = "${GNU_MIRROR}/tar/tar-${PV}.tar.bz2"
 
 inherit autotools gettext
 
+EXTRA_OECONF += "DEFAULT_RMT_DIR=${base_sbindir}"
+
 EXTRAINSTALL = "do_install_extra"
 
 do_install () {
@@ -21,11 +23,16 @@ do_install_extra () {
     rmdir ${D}${bindir}/
 }
 
+PACKAGES =+ "${PN}-rmt"
+
+FILES_${PN}-rmt = "${base_sbindir}/rmt*"
+
 inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "100"
 
-ALTERNATIVE_${PN} = "tar rmt"
+ALTERNATIVE_${PN} = "tar"
+ALTERNATIVE_${PN}-rmt = "rmt"
 
 ALTERNATIVE_LINK_NAME[tar] = "${base_bindir}/tar"
-ALTERNATIVE_LINK_NAME[rmt] = "${libexecdir}/rmt"
+ALTERNATIVE_LINK_NAME[rmt] = "${base_sbindir}/rmt"
meta/recipes-extended/tar/tar_1.17.bb +1 -1
index 9425f14d..b9ca206 100644
@@ -3,7 +3,7 @@ require tar.inc
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552"
 
-PR = "r2"
+PR = "r3"
 
 SRC_URI += "file://m4extensions.patch \
     file://gcc43build.patch \
meta/recipes-extended/tar/tar_1.26.bb +1 -1
index 4c8ab2c..03a35c3 100644
@@ -3,7 +3,7 @@ require tar.inc
 LICENSE = "GPLv3"
 LIC_FILES_CHKSUM = "file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 
-PR = "r3"
+PR = "r4"
 
 SRC_URI += "file://remove-gets.patch \
            "
Signature · 1 line
1.7.3.4
author
#3 lore raw

PATCH 3/22 update-alternatives.bbclass: Add missing runtime dependency

In reply to Mark Hatle

When using update-alternatives, there should be a runtime dependency on update-alternatives. Without this, it's possible to get into a situation where the package is not installable.

---
 meta/classes/update-alternatives.bbclass |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
meta/classes/update-alternatives.bbclass +6 -0
index 4e1ff27..e432506 100644
@@ -304,6 +304,12 @@ python populate_packages_prepend () {
             alt_remove_links += '\tupdate-alternatives --remove  %s %s\n' % (alt_name, alt_target)
 
         if alt_setup_links:
+            # RDEPENDS setup
+            bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
+            rdepends = d.getVar('RDEPENDS_%s' % pkg, True) or ""
+            rdepends += ' ' + d.getVar('MLPREFIX') + 'update-alternatives'
+            d.setVar("RDEPENDS_%s" % pkg, rdepends)
+
             bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg)
             bb.note('%s' % alt_setup_links)
             postinst = (d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)) or '#!/bin/sh\n'
Signature · 1 line
1.7.3.4
#4 lore raw

Re: [PATCH 03/22] update-alternatives.bbclass: Add missing runtime dependency

Quoted 14 lines · Mark Hatle

When using update-alternatives, there should be a runtime dependency on update-alternatives. Without this, it's possible to get into a situation where the package is not installable.

---
 meta/classes/update-alternatives.bbclass |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
meta/classes/update-alternatives.bbclass +0 -0
index 4e1ff27..e432506 100644

meta/classes/update-alternatives.bbclass python populate_packages_prepend () { · line 312

Quoted 9 lines
meta/classes/update-alternatives.bbclass +6 -0
@@ -304,6 +304,12 @@ python populate_packages_prepend () {
             alt_remove_links += '\tupdate-alternatives --remove  %s %s\n' % (alt_name, alt_target)
 
         if alt_setup_links:
+            # RDEPENDS setup
+            bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
+            rdepends = d.getVar('RDEPENDS_%s' % pkg, True) or ""
+            rdepends += ' ' + d.getVar('MLPREFIX') + 'update-alternatives'
+            d.setVar("RDEPENDS_%s" % pkg, rdepends)
+

I guess you should use VIRTUAL-RUNTIME_update-alternatives here

Cheers,

Quoted 11 lines
meta/classes/update-alternatives.bbclass +0 -0
             bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg)
             bb.note('%s' % alt_setup_links)
             postinst = (d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)) or '#!/bin/sh\n'
Signature · 7 lines
1.7.3.4


_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
author
#5 lore raw

Re: [PATCH 03/22] update-alternatives.bbclass: Add missing runtime dependency

Quoted 17 lines · Martin Jansa
Quoted 16 lines · Mark Hatle

When using update-alternatives, there should be a runtime dependency on update-alternatives. Without this, it's possible to get into a situation where the package is not installable.

---
  meta/classes/update-alternatives.bbclass |    6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)
meta/classes/update-alternatives.bbclass +0 -0
index 4e1ff27..e432506 100644
@@ -304,6 +304,12 @@ python populate_packages_prepend () {
              alt_remove_links += '\tupdate-alternatives --remove  %s %s\n' % (alt_name, alt_target)
 
Quoted 9 lines

meta/classes/update-alternatives.bbclass python populate_packages_prepend () { · line 312

Quoted 7 lines
meta/classes/update-alternatives.bbclass +6 -0
          if alt_setup_links:
+            # RDEPENDS setup
+            bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
+            rdepends = d.getVar('RDEPENDS_%s' % pkg, True) or ""
+            rdepends += ' ' + d.getVar('MLPREFIX') + 'update-alternatives'
+            d.setVar("RDEPENDS_%s" % pkg, rdepends)
+

I guess you should use VIRTUAL-RUNTIME_update-alternatives here

I believe what I have here is correct. We don't care which update-alternatives we use, just that one is used.

recipes-devtools/dpkg/dpkg.inc:RPROVIDES_update-alternatives-dpkg += "update-alternatives" recipes-devtools/opkg/opkg.inc:RPROVIDES_update-alternatives-cworth += "update-alternatives"

If I use the ${VIRTUAL-RUNTIME_update-alternatives} that has the effect or hard coding which specific version of update-alternatives we're going to use.. (-dpg vs -cworth) I'm not sure this is really the desired behavior in this case -- if it is, it's easy enough to change of course.

--Mark

Quoted 14 lines

Cheers,

Quoted 11 lines
meta/classes/update-alternatives.bbclass +0 -1
              bb.note('adding update-alternatives calls to postinst/postrm for %s' % pkg)
              bb.note('%s' % alt_setup_links)
              postinst = (d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)) or '#!/bin/sh\n'
--

1.7.3.4

_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core

#6 lore raw

Re: [PATCH 03/22] update-alternatives.bbclass: Add missing runtime dependency

Quoted 28 lines · Mark Hatle
Quoted 17 lines · Martin Jansa
Quoted 16 lines · Mark Hatle

When using update-alternatives, there should be a runtime dependency on update-alternatives. Without this, it's possible to get into a situation where the package is not installable.

---
  meta/classes/update-alternatives.bbclass |    6 ++++++
  1 files changed, 6 insertions(+), 0 deletions(-)
meta/classes/update-alternatives.bbclass +0 -0
index 4e1ff27..e432506 100644
@@ -304,6 +304,12 @@ python populate_packages_prepend () {
              alt_remove_links += '\tupdate-alternatives --remove  %s %s\n' % (alt_name, alt_target)
 
Quoted 9 lines

meta/classes/update-alternatives.bbclass python populate_packages_prepend () { · line 312

Quoted 7 lines
meta/classes/update-alternatives.bbclass +6 -0
          if alt_setup_links:
+            # RDEPENDS setup
+            bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
+            rdepends = d.getVar('RDEPENDS_%s' % pkg, True) or ""
+            rdepends += ' ' + d.getVar('MLPREFIX') + 'update-alternatives'
+            d.setVar("RDEPENDS_%s" % pkg, rdepends)
+

I guess you should use VIRTUAL-RUNTIME_update-alternatives here

Quoted 1 line

I believe what I have here is correct.

No, Martin is right.

Quoted 8 lines

We don't care which update-alternatives
we use, just that one is used.

recipes-devtools/dpkg/dpkg.inc:RPROVIDES_update-alternatives-dpkg += "update-alternatives" recipes-devtools/opkg/opkg.inc:RPROVIDES_update-alternatives-cworth += "update-alternatives"

Quoted 4 lines

If I use the ${VIRTUAL-RUNTIME_update-alternatives} that has the effect or hard coding which specific version of update-alternatives we're going to use.. (-dpg vs -cworth) I'm not sure this is really the desired behavior in this case -- if it is, it's easy enough to change of course.

I keep telling people this and people keep ignoring me.

We DO NOT SUPPORT switching providers at runtime since its a package manager specific problem for which we currently have no general abstraction.

This leads to patches like:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=fe21ace36e19e06cbfdb83f73e60623bd4e382af

since the virtual/ space does not somehow magically work at runtime, worse it breaks the deb package backend.

PREFERRED_PROVIDER is a build time thing. virtual/ is a build time thing. How do I explain this any clearer?

The only mechanism for distro selection of runtime is VIRTUAL-RUNTIME_ which is pretty horrible and likely would be better done with something debian package renaming like since we already have that mangling code.

Cheers,

Richard

author
#7 lore raw

Re: [PATCH 03/22] update-alternatives.bbclass: Add missing runtime dependency

Quoted 46 lines · Richard Purdie
Quoted 28 lines · Mark Hatle
Quoted 17 lines · Martin Jansa
Quoted 16 lines · Mark Hatle

When using update-alternatives, there should be a runtime dependency on update-alternatives. Without this, it's possible to get into a situation where the package is not installable.

---
   meta/classes/update-alternatives.bbclass |    6 ++++++
   1 files changed, 6 insertions(+), 0 deletions(-)
meta/classes/update-alternatives.bbclass +0 -0
index 4e1ff27..e432506 100644
@@ -304,6 +304,12 @@ python populate_packages_prepend () {
               alt_remove_links += '\tupdate-alternatives --remove  %s %s\n' % (alt_name, alt_target)
 
Quoted 9 lines

meta/classes/update-alternatives.bbclass python populate_packages_prepend () { · line 312

Quoted 7 lines
meta/classes/update-alternatives.bbclass +6 -0
           if alt_setup_links:
+            # RDEPENDS setup
+            bb.note('adding runtime requirement for update-alternatives for %s' % pkg)
+            rdepends = d.getVar('RDEPENDS_%s' % pkg, True) or ""
+            rdepends += ' ' + d.getVar('MLPREFIX') + 'update-alternatives'
+            d.setVar("RDEPENDS_%s" % pkg, rdepends)
+

I guess you should use VIRTUAL-RUNTIME_update-alternatives here

Quoted 1 line

I believe what I have here is correct.

No, Martin is right.

Quoted 8 lines

We don't care which update-alternatives
we use, just that one is used.

recipes-devtools/dpkg/dpkg.inc:RPROVIDES_update-alternatives-dpkg += "update-alternatives" recipes-devtools/opkg/opkg.inc:RPROVIDES_update-alternatives-cworth += "update-alternatives"

Quoted 4 lines

If I use the ${VIRTUAL-RUNTIME_update-alternatives} that has the effect or hard coding which specific version of update-alternatives we're going to use.. (-dpg vs -cworth) I'm not sure this is really the desired behavior in this case -- if it is, it's easy enough to change of course.

Quoted 5 lines

I keep telling people this and people keep ignoring me.

We DO NOT SUPPORT switching providers at runtime since its a package manager specific problem for which we currently have no general abstraction.

We do support switching providers already, that's the whole alternatives system itself. What is different is in this case we can't use the update-alternatives.

But with the RPROVIDE of update-alternatives within the dpkg and opkg code.. We can certainly require 'update-alterantives' and the packaging systems will do the right thing (they have so far...)

Quoted 6 lines

This leads to patches like:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=fe21ace36e19e06cbfdb83f73e60623bd4e382af

since the virtual/ space does not somehow magically work at runtime, worse it breaks the deb package backend.

It works in RPM... but if it doesn't in deb (and ipk) I understand the limitations we are bound to. Limiting the character space (i.e. no '/') is different then saying we don't support RPROVIDES...

Quoted 2 lines

PREFERRED_PROVIDER is a build time thing. virtual/ is a build time thing. How do I explain this any clearer?

I'm still confused on the PREFERRED_PROVIDER honestly.

conf/distro/include/default-providers.inc:PREFERRED_PROVIDER_virtual/update-alternatives ?= "update-alternatives-cworth" conf/distro/include/default-providers.inc:PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-native"

There is no 'update-alternatives-cworth' recipe.. but there is an opkg recipe that happens to provide an update-alternatives-cworth -package-. So does PREFERRED_PROVIDER select packages or recipes?

Quoted 3 lines

The only mechanism for distro selection of runtime is VIRTUAL-RUNTIME_ which is pretty horrible and likely would be better done with something debian package renaming like since we already have that mangling code.

And the VIRTUAL-RUNTIME isn't a runtime selection, it's a build-time selection.
If we need to select this at build-time, we can. I'm happy with changing the
patch, but as a distribution person I really don't care who provides this as long as something does.

--Mark

Quoted 5 lines

Cheers,

Richard

#8 lore raw

Re: [PATCH 03/22] update-alternatives.bbclass: Add missing runtime dependency

Quoted 10 lines · Mark Hatle
Quoted 6 lines · Richard Purdie

On Tue, 2012-12-04 at 11:34 -0600, Mark Hatle wrote:
I keep telling people this and people keep ignoring me.

We DO NOT SUPPORT switching providers at runtime since its a package manager specific problem for which we currently have no general abstraction.

We do support switching providers already, that's the whole alternatives system itself. What is different is in this case we can't use the update-alternatives.

We do support update alternatives, yes. We're talking about something else here though.

Quoted 3 lines

But with the RPROVIDE of update-alternatives within the dpkg and opkg code.. We can certainly require 'update-alterantives' and the packaging systems will do the right thing (they have so far...)

Ok, let me put this a different way. What exactly tells tells the package manager what it should be installing as "update-alternatives"? Where is the variable that controls this?

I think you will find there isn't any mechanism for it. The only reason it does the right thing is a combination of:

a) We've configured things to only build one provider in most cases
b) We use the VIRTUAL-RUNTIME_update-alternatives substitution that Martin mentions.

Quoted 10 lines
Quoted 6 lines

This leads to patches like:

http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=fe21ace36e19e06cbfdb83f73e60623bd4e382af

since the virtual/ space does not somehow magically work at runtime, worse it breaks the deb package backend.

It works in RPM... but if it doesn't in deb (and ipk) I understand the limitations we are bound to. Limiting the character space (i.e. no '/') is different then saying we don't support RPROVIDES...

We support RPROVIDES, no argument. What we don't have is any mechanism to indicate to *any* of the package managers that if there are two providers, which one should be preferred.

The character was just a detail, the whole approach was also flawed, at least as the system stands today :(.

Quoted 4 lines
Quoted 2 lines

PREFERRED_PROVIDER is a build time thing. virtual/ is a build time thing. How do I explain this any clearer?

I'm still confused on the PREFERRED_PROVIDER honestly.

That much is clear from the email :/. It only works for build time resolution, not package management.

Quoted 8 lines

conf/distro/include/default-providers.inc:PREFERRED_PROVIDER_virtual/update-alternatives ?= "update-alternatives-cworth" conf/distro/include/default-providers.inc:PREFERRED_PROVIDER_virtual/update-alternatives-native ?= "opkg-native"

There is no 'update-alternatives-cworth' recipe.. but there is an opkg recipe that happens to provide an update-alternatives-cworth -package-. So does PREFERRED_PROVIDER select packages or recipes?

It works in "build" namespace, namely DEPENDS and PROVIDES, so recipes.

Recipes can have additional PROVIDES other than their name, not to be confused with RPROVIDES which is package namespace and separate.

We have no support for PREFERRED_RPROVIDER for example since that would have to get communicated to the package manager. It would be interesting to see that work...

Quoted 5 lines
Quoted 3 lines

The only mechanism for distro selection of runtime is VIRTUAL-RUNTIME_ which is pretty horrible and likely would be better done with something debian package renaming like since we already have that mangling code.

And the VIRTUAL-RUNTIME isn't a runtime selection, it's a build-time selection.

I realise that. As I said earlier, we don't support runtime selection and we allow distro selection of some things (at build time) using this rather ugly mechanism. I'd love to have something neater but its hard to interface that into all the packaging backends.

Quoted 1 line

If we need to select this at build-time, we can.

Rightly or wrongly, we need to.

Quoted 3 lines

I'm happy with changing the
patch, but as a distribution person I really don't care who provides this as long as something does.

We care about deterministic builds so we have to care about details like this.

Cheers,

Richard

author
#9 lore raw

PATCH 4/22 package_rpm.bbclass: Add the runtime dependencies to the pre/post scriptlets

In reply to Mark Hatle

When the scriptlets are processed in RPM, they have a different dependency set then the core package. OE has no way to specify dependencies for the pre/post scriptlists, so we simply make the runtime dependencies scriptlets as well.

---
 meta/classes/package_rpm.bbclass |   86 ++++++++++++++++++++++++--------------
 1 files changed, 55 insertions(+), 31 deletions(-)
meta/classes/package_rpm.bbclass +55 -31
index 1ff92ce..200a941 100644
@@ -730,10 +730,10 @@ python write_specfile () {
     srcrconflicts  = []
     srcrobsoletes  = []
 
-    srcpreinst  = []
-    srcpostinst = []
-    srcprerm    = []
-    srcpostrm   = []
+    srcrpreinst  = []
+    srcrpostinst = []
+    srcrprerm    = []
+    srcrpostrm   = []
 
     spec_preamble_top = []
     spec_preamble_bottom = []
@@ -792,6 +792,11 @@ python write_specfile () {
         splitrconflicts  = strip_multilib_deps(localdata.getVar('RCONFLICTS', True), d)
         splitrobsoletes  = []
 
+        splitrpreinst  = localdata.getVar('pkg_preinst', True)
+        splitrpostinst = localdata.getVar('pkg_postinst', True)
+        splitrprerm    = localdata.getVar('pkg_prerm', True)
+        splitrpostrm   = localdata.getVar('pkg_postrm', True)
+
         # Gather special src/first package data
         if srcname == splitname:
             srcrdepends    = splitrdepends
@@ -801,10 +806,10 @@ python write_specfile () {
             srcrreplaces   = splitrreplaces
             srcrconflicts  = splitrconflicts
 
-            srcpreinst  = localdata.getVar('pkg_preinst', True)
-            srcpostinst = localdata.getVar('pkg_postinst', True)
-            srcprerm    = localdata.getVar('pkg_prerm', True)
-            srcpostrm   = localdata.getVar('pkg_postrm', True)
+            srcrpreinst    = splitrpreinst
+            srcrpostinst   = splitrpostinst
+            srcrprerm      = splitrprerm
+            srcrpostrm     = splitrpostrm
 
             file_list = []
             walk_files(root, file_list, conffiles)
@@ -850,6 +855,15 @@ python write_specfile () {
         splitrprovides = bb.utils.join_deps(rprovides, commasep=False)
 
         print_deps(splitrdepends, "Requires", spec_preamble_bottom, d)
+        if splitrpreinst:
+            print_deps(splitrdepends, "Requires(pre)", spec_preamble_bottom, d)
+        if splitrpostinst:
+            print_deps(splitrdepends, "Requires(post)", spec_preamble_bottom, d)
+        if splitrprerm:
+            print_deps(splitrdepends, "Requires(preun)", spec_preamble_bottom, d)
+        if splitrpostrm:
+            print_deps(splitrdepends, "Requires(postun)", spec_preamble_bottom, d)
+
         # Suggests in RPM are like recommends in OE-core!
         print_deps(splitrrecommends, "Suggests", spec_preamble_bottom, d)
         # While there is no analog for suggests... (So call them recommends for now)
@@ -880,21 +894,22 @@ python write_specfile () {
         spec_preamble_bottom.append('')
 
         # Now process scriptlets
-        for script in ["preinst", "postinst", "prerm", "postrm"]:
-            scriptvar = localdata.getVar('pkg_%s' % script, True)
-            if not scriptvar:
-                continue
-            if script == 'preinst':
-                spec_scriptlets_bottom.append('%%pre -n %s' % splitname)
-            elif script == 'postinst':
-                spec_scriptlets_bottom.append('%%post -n %s' % splitname)
-            elif script == 'prerm':
-                spec_scriptlets_bottom.append('%%preun -n %s' % splitname)
-                scriptvar = wrap_uninstall(scriptvar)
-            elif script == 'postrm':
-                spec_scriptlets_bottom.append('%%postun -n %s' % splitname)
-                scriptvar = wrap_uninstall(scriptvar)
-            spec_scriptlets_bottom.append('# %s - %s' % (splitname, script))
+        if splitrpreinst:
+            spec_scriptlets_bottom.append('%%pre -n %s' % splitname)
+            spec_scriptlets_bottom.append(splitrpreinst)
+            spec_scriptlets_bottom.append('')
+        if splitrpostinst:
+            spec_scriptlets_bottom.append('%%post -n %s' % splitname)
+            spec_scriptlets_bottom.append(splitrpostinst)
+            spec_scriptlets_bottom.append('')
+        if splitrprerm:
+            spec_scriptlets_bottom.append('%%preun -n %s' % splitname)
+            scriptvar = wrap_uninstall(splitrprerm)
+            spec_scriptlets_bottom.append(scriptvar)
+            spec_scriptlets_bottom.append('')
+        if splitrpostrm:
+            spec_scriptlets_bottom.append('%%postun -n %s' % splitname)
+            scriptvar = wrap_uninstall(splitrpostrm)
             spec_scriptlets_bottom.append(scriptvar)
             spec_scriptlets_bottom.append('')
 
@@ -943,6 +958,15 @@ python write_specfile () {
 
     print_deps(srcdepends, "BuildRequires", spec_preamble_top, d)
     print_deps(srcrdepends, "Requires", spec_preamble_top, d)
+    if srcrpreinst:
+        print_deps(srcrdepends, "Requires(pre)", spec_preamble_top, d)
+    if srcrpostinst:
+        print_deps(srcrdepends, "Requires(post)", spec_preamble_top, d)
+    if srcrprerm:
+        print_deps(srcrdepends, "Requires(preun)", spec_preamble_top, d)
+    if srcrpostrm:
+        print_deps(srcrdepends, "Requires(postun)", spec_preamble_top, d)
+
     # Suggests in RPM are like recommends in OE-core!
     print_deps(srcrrecommends, "Suggests", spec_preamble_top, d)
     # While there is no analog for suggests... (So call them recommends for now)
@@ -972,26 +996,26 @@ python write_specfile () {
 
     spec_preamble_top.append('')
 
-    if srcpreinst:
+    if srcrpreinst:
         spec_scriptlets_top.append('%pre')
         spec_scriptlets_top.append('# %s - preinst' % srcname)
-        spec_scriptlets_top.append(srcpreinst)
+        spec_scriptlets_top.append(srcrpreinst)
         spec_scriptlets_top.append('')
-    if srcpostinst:
+    if srcrpostinst:
         spec_scriptlets_top.append('%post')
         spec_scriptlets_top.append('# %s - postinst' % srcname)
-        spec_scriptlets_top.append(srcpostinst)
+        spec_scriptlets_top.append(srcrpostinst)
         spec_scriptlets_top.append('')
-    if srcprerm:
+    if srcrprerm:
         spec_scriptlets_top.append('%preun')
         spec_scriptlets_top.append('# %s - prerm' % srcname)
-        scriptvar = wrap_uninstall(srcprerm)
+        scriptvar = wrap_uninstall(srcrprerm)
         spec_scriptlets_top.append(scriptvar)
         spec_scriptlets_top.append('')
-    if srcpostrm:
+    if srcrpostrm:
         spec_scriptlets_top.append('%postun')
         spec_scriptlets_top.append('# %s - postrm' % srcname)
-        scriptvar = wrap_uninstall(srcpostrm)
+        scriptvar = wrap_uninstall(srcrpostrm)
         spec_scriptlets_top.append(scriptvar)
         spec_scriptlets_top.append('')
 
Signature · 1 line
1.7.3.4
author
#10 lore raw

PATCH 5/22 rpm: enable _openall_before_chroot by default

In reply to Mark Hatle

From: Paul Eggleton <[email protected]>

We want this enabled especially for the native case.

---
 meta/recipes-devtools/rpm/rpm_5.4.9.bb |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/recipes-devtools/rpm/rpm_5.4.9.bb +2 -1
index a64ddd1..d435996 100644
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
 DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"
-PR = "r54"
+PR = "r55"
 
 # rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
 # in order to extract the distribution SRPM into a format we can extract...
@@ -364,6 +364,7 @@ do_install_append() {
 	sed -i -e 's,%__perl_provides,#%%__perl_provides,' ${D}/${libdir}/rpm/macros
 	sed -i -e 's,%__perl_requires,#%%__perl_requires,' ${D}/${libdir}/rpm/macros
 	sed -i -e 's,%_repackage_all_erasures[^_].*,%_repackage_all_erasures 0,' ${D}/${libdir}/rpm/macros
+	sed -i -e 's,^#%_openall_before_chroot.*,%_openall_before_chroot\t1,' ${D}/${libdir}/rpm/macros
 
 	# Enable Debian style arbitrary tags...
 	sed -i -e 's,%_arbitrary_tags[^_].*,%_arbitrary_tags %{_arbitrary_tags_debian},' ${D}/${libdir}/rpm/macros
Signature · 1 line
1.7.3.4
author
#11 lore raw

PATCH 6/22 rpm: Move rpmdb_loadcvt from base to dev package

In reply to Mark Hatle

This item is only useful when the various development components are installed.

---
 meta/recipes-devtools/rpm/rpm_5.4.9.bb |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)
meta/recipes-devtools/rpm/rpm_5.4.9.bb +6 -2
index d435996..ccf079a 100644
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
 DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"
-PR = "r55"
+PR = "r56"
 
 # rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
 # in order to extract the distribution SRPM into a format we can extract...
@@ -203,7 +203,6 @@ FILES_${PN} =  "${bindir}/rpm \
 		${libdir}/rpm/tgpg \
 		${libdir}/rpm/macros \
 		${libdir}/rpm/rpmpopt \
-		${libdir}/rpm/rpmdb_loadcvt \
 		${libdir}/rpm/rpm2cpio \
 		${libdir}/rpm/vcheck \
 		${libdir}/rpm/helpers \
@@ -237,6 +236,8 @@ FILES_${PN}-libs = "${libdir}/librpm-*.so \
 		${libdir}/librpmbuild-*.so \
 		"
 
+RDEPENDS_${PN}-build += "bash"
+
 FILES_${PN}-build = "${prefix}/src/rpm \
 		${bindir}/rpmbuild \
 		${libdir}/rpm/brp-* \
@@ -317,6 +318,8 @@ FILES_perl-module-rpm = "${libdir}/perl/*/* \
 FILES_perl-module-rpm-dev = "${prefix}/share/man/man3/RPM* \
 		"
 
+RDEPENDS_${PN}-dev += "bash"
+
 FILES_${PN}-dev = "${includedir}/rpm \
 		${libdir}/librpm.la \
 		${libdir}/librpm.so \
@@ -332,6 +335,7 @@ FILES_${PN}-dev = "${includedir}/rpm \
 		${libdir}/librpmbuild.so \
 		${libdir}/rpm/lib/liblua.la \
 		${libdir}/pkgconfig/rpm.pc \
+		${libdir}/rpm/rpmdb_loadcvt \
 		"
 
 FILES_${PN}-staticdev = " \
Signature · 1 line
1.7.3.4
author
#12 lore raw

PATCH 7/22 rpm: Fix rpm relocation macro usage

In reply to Mark Hatle

When RPM is setup to dynamically reconfigure itself at runtime, we need to avoid hard coded settings for _usrlibrpm and _etcrpm.

---
 .../rpm/rpm/rpm-reloc-macros.patch                 |   31 ++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.9.bb             |    3 +-
 2 files changed, 33 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch
meta/recipes-devtools/rpm/rpm/rpm-reloc-macros.patch new file +31 -0
new file mode 100644
index 0000000..33ec8e2
@@ -0,0 +1,31 @@
+macros: Use dyanmic config vs hard coded settings
+
+When the dynamic, runtime relocation is enables we need to make sure that the 
+RPM macro file does not override the dynamic settings.  Fix this by forcing the
+dynamic version to be used in all cases.
+
+Upstream-Status: Inapproriate (OpenEmbedded specific)
+
+Signed-off-by: Mark Hatle <[email protected]>
+
+Index: rpm-5.4.9/macros/macros.in
+===================================================================
+--- rpm-5.4.9.orig/macros/macros.in
++++ rpm-5.4.9/macros/macros.in
+@@ -27,11 +27,12 @@
+ #==============================================================================
+ # ---- filesystem macros.
+ #
+-%_usr			@usrprefix@
++%_usr			%{_usrlibrpm}/../..
+ %_usrsrc		%{_usr}/src
+-%_var			@varprefix@
+-%_usrlibrpm		@USRLIBRPM@
+-%_etcrpm		@SYSCONFIGDIR@
++%_var			%{_usr}/../var
++# The dynamic relocation code sets the following two items
++#%_usrlibrpm		@USRLIBRPM@
++#%_etcrpm		@SYSCONFIGDIR@
+ 
+ %__objext		@objext@
+ %__libext		@libext@
meta/recipes-devtools/rpm/rpm_5.4.9.bb +2 -1
index ccf079a..59f3eef 100644
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
 DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"
-PR = "r56"
+PR = "r57"
 
 # rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
 # in order to extract the distribution SRPM into a format we can extract...
@@ -82,6 +82,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
 	   file://rpm-db_buffer_small.patch \
 	   file://rpm-py-init.patch \
 	   file://python-rpm-rpmsense.patch \
+	   file://rpm-reloc-macros.patch \
 	  "
 
 SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
Signature · 1 line
1.7.3.4
author
#13 lore raw

PATCH 8/22 rpm: Fixup platform matching code

In reply to Mark Hatle

On ARM systems the platform matching code could fail in some cases, as the system macros file could override the 'platform' file settings.

---
 meta/recipes-devtools/rpm/rpm/rpm-platform2.patch |   56 +++++++++++++++++++++
 meta/recipes-devtools/rpm/rpm_5.4.9.bb            |    3 +-
 2 files changed, 58 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/rpm/rpm/rpm-platform2.patch
meta/recipes-devtools/rpm/rpm/rpm-platform2.patch new file +56 -0
new file mode 100644
index 0000000..3d50e46
@@ -0,0 +1,56 @@
+Fix up platform and related sysinfo file loading (part 2).
+
+Upstream-Status: Pending
+
+We need to ensure that we set the _gnu flag somehow.  We do this by reading
+from the platform file, and setting a new platform_gnu and related vars.
+
+We then check for the existance of these things and change the configure
+time defaults to the run-time values as necessary.
+
+Signed-off-by: Mark Hatle <[email protected]>
+
+Index: rpm-5.4.9/lib/rpmrc.c
+===================================================================
+--- rpm-5.4.9.orig/lib/rpmrc.c
++++ rpm-5.4.9/lib/rpmrc.c
+@@ -487,9 +487,10 @@ static rpmRC rpmPlatform(const char * pl
+ 	}
+ 
+ 	if (!parseCVOG(p, &cvog) && cvog != NULL) {
+-	    addMacro(NULL, "_host_cpu", NULL, cvog->cpu, -1);
+-	    addMacro(NULL, "_host_vendor", NULL, cvog->vendor, -1);
+-	    addMacro(NULL, "_host_os", NULL, cvog->os, -1);
++	    addMacro(NULL, "_platform_cpu", NULL, cvog->cpu, -1);
++	    addMacro(NULL, "_platform_vendor", NULL, cvog->vendor, -1);
++	    addMacro(NULL, "_platform_os", NULL, cvog->os, -1);
++	    addMacro(NULL, "_platform_gnu", NULL, cvog->gnu, -1);
+ 	}
+ 
+ #if defined(RPM_VENDOR_OPENPKG) /* explicit-platform */
+Index: rpm-5.4.9/macros/macros.in
+===================================================================
+--- rpm-5.4.9.orig/macros/macros.in
++++ rpm-5.4.9/macros/macros.in
+@@ -873,7 +873,7 @@ $_arbitrary_tags_tests	Foo:Bar
+ %_build_arch		@RPMCANONARCH@
+ %_vendor		@RPMCANONVENDOR@
+ %_os			@RPMCANONOS@
+-%_gnu			@RPMCANONGNU@
++%_gnu			%{?_platform_gnu:-%{_platform_gnu}}%{!?_platform_gnu:@RPMCANONGNU@}
+ 
+ %_host_platform		%{_host_cpu}-%{_host_vendor}-%{_host_os}%{?_gnu}
+ %_build_platform	%{_build_cpu}-%{_build_vendor}-%{_build_os}%{?_gnu}
+@@ -920,9 +920,9 @@ $_arbitrary_tags_tests	Foo:Bar
+ %_build_os		%{_host_os}
+ %_host			@host@
+ %_host_alias		@host_alias@%{nil}
+-%_host_cpu		@host_cpu@
+-%_host_vendor		@host_vendor@
+-%_host_os		@host_os@
++%_host_cpu		%{?_platform_cpu}%{!?_platform_cpu:@host_cpu@}
++%_host_vendor		%{?_platform_vendor}%{!?_platform_vendor:@host_vendor@}
++%_host_os		%{?_platform_os}%{!?_platform_os:@host_os@}
+ %_target		%{_host}
+ %_target_alias		%{_host_alias}
+ %_target_cpu		%{_host_cpu}
meta/recipes-devtools/rpm/rpm_5.4.9.bb +2 -1
index 59f3eef..7311d0e 100644
@@ -43,7 +43,7 @@ LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING.LIB;md5=2d5025d4aa3495befef8f17206a5b0a1"
 
 DEPENDS = "libpcre attr acl popt ossp-uuid file bison-native"
-PR = "r57"
+PR = "r58"
 
 # rpm2cpio is a shell script, which is part of the rpm src.rpm.  It is needed
 # in order to extract the distribution SRPM into a format we can extract...
@@ -83,6 +83,7 @@ SRC_URI = "http://www.rpm5.org/files/rpm/rpm-5.4/rpm-5.4.9-0.20120508.src.rpm;ex
 	   file://rpm-py-init.patch \
 	   file://python-rpm-rpmsense.patch \
 	   file://rpm-reloc-macros.patch \
+	   file://rpm-platform2.patch \
 	  "
 
 SRC_URI[md5sum] = "60d56ace884340c1b3fcac6a1d58e768"
Signature · 1 line
1.7.3.4
author
#14 lore raw

PATCH 9/22 rpm: Fix Upstream-Status fields

In reply to Mark Hatle
---
 .../rpm/rpm/python-rpm-rpmsense.patch              |    2 +-
 .../rpm/rpm/rpm-db_buffer_small.patch              |    2 +-
 .../rpm/rpm/rpm-stub-out-git_strerror.patch        |    2 +-
 .../rpm/rpm/rpm-uuid-include.patch                 |    2 ++
 4 files changed, 5 insertions(+), 3 deletions(-)
meta/recipes-devtools/rpm/rpm/python-rpm-rpmsense.patch +1 -1
index 61f1e0c..0fae571 100644
@@ -4,7 +4,7 @@ We want to see the RPMSENSE_SCRIPT values for use with SMART.  We also
 want to see the MISSINGOK value so we can avoid recommended packages causing
 failures.
 
-Upstream-status: Pending
+Upstream-Status: Pending
 
 Signed-off-by: Mark Hatle <[email protected]>
 
meta/recipes-devtools/rpm/rpm/rpm-db_buffer_small.patch +1 -1
index d2ed853..59022f4 100644
@@ -14,7 +14,7 @@ If DBI debugging is enabled, additional diagnostics are printed, otherwise
 a basic retry and success message is added to show that the failure was
 resolved.
 
-Upstream-status: Inappropriate (workaround)
+Upstream-Status: Inappropriate (workaround)
 
 Signed-off-by: Mark Hatle <[email protected]>
 
meta/recipes-devtools/rpm/rpm/rpm-stub-out-git_strerror.patch +1 -1
index 2cfc163..cbeeb29 100644
@@ -2,7 +2,7 @@ git: fix: stud-out git_strerror when --without-git
 
 Patch taken from the cvs repo,http://www.mail-archive.com/[email protected]/msg08907.html. 
 
-Upstream-status: Backport
+Upstream-Status: Backport
 
 Signed-off-by: Morgan Little <[email protected]>
 
meta/recipes-devtools/rpm/rpm/rpm-uuid-include.patch +2 -0
index 0e45ed7..600e2c2 100644
@@ -7,6 +7,8 @@ use the one in ossp which solves the issue.
 The recipe already depends on ossp so ossp/uuid.h will be there when rpm-native
 is built.
 
+Upstream-Status: Pending
+
 Signed-off-by: Morgan Little <[email protected]>
 
 
Signature · 1 line
1.7.3.4
author
#15 lore raw

PATCH 10/22 createrepo: implement support for recommends

In reply to Mark Hatle

From: Paul Eggleton <[email protected]>

Adds a flag into the output metadata to note recommends relationships in a way that should not break compatibility with clients that don't understand this flag.

---
 .../createrepo/createrepo/recommends.patch         |   71 ++++++++++++++++++++
 .../createrepo/createrepo_0.4.11.bb                |    3 +-
 2 files changed, 73 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-support/createrepo/createrepo/recommends.patch
meta/recipes-support/createrepo/createrepo/recommends.patch new file +71 -0
new file mode 100644
index 0000000..dc5de2b
@@ -0,0 +1,71 @@
+createrepo: implement recommends support
+
+Record against the corresponding requires entry in the output metadata
+if a dependency relationship is marked with the RPMSENSE_MISSINGOK flag
+(indicating it is a recommendation, rather than a hard dependency).
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <[email protected]>
+
+diff --git a/dumpMetadata.py b/dumpMetadata.py
+index 70bb2d8..e40e8ac 100644
+--- a/dumpMetadata.py
++++ b/dumpMetadata.py
+@@ -319,6 +319,23 @@ class RpmMetaData:
+                     reqs.append(0)
+         return reqs
+ 
++    def _checkMissingOk(self, flags):
++        reqs=[]
++        if flags is None:
++            return reqs
++
++        if type(flags) is not types.ListType:
++            flags = [flags]
++        for flag in flags:
++            newflag = flag
++            if flag is not None:
++                newflag = flag & rpm.RPMSENSE_MISSINGOK
++                if newflag:
++                    reqs.append(1)
++                else:
++                    reqs.append(0)
++        return reqs
++
+ 
+     def _correctVersion(self, vers):
+         returnvers = []
+@@ -537,9 +554,10 @@ class RpmMetaData:
+         tmpflags = self.hdr[rpm.RPMTAG_REQUIREFLAGS]
+         flags = self._correctFlags(tmpflags)
+         prereq = self._checkPreReq(tmpflags)
++        missingok = self._checkMissingOk(tmpflags)
+         ver = self._correctVersion(self.hdr[rpm.RPMTAG_REQUIREVERSION])
+         if names is not None:
+-            lst = zip(names, flags, ver, prereq)
++            lst = zip(names, flags, ver, prereq, missingok)
+         return self._uniq(lst)
+         
+     def obsoletesList(self):
+@@ -692,7 +710,7 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
+     depsList = rpmObj.depsList()
+     if len(depsList) > 0:
+         rpconode = format.newChild(formatns, 'requires', None)    
+-        for (name, flags, (e,v,r), prereq) in depsList:
++        for (name, flags, (e,v,r), prereq, missingok) in depsList:
+             entry = rpconode.newChild(formatns, 'entry', None)
+             entry.newProp('name', name)
+             if flags != 0:
+@@ -711,6 +729,8 @@ def generateXML(doc, node, formatns, rpmObj, sumtype):
+                     entry.newProp('rel', str(r))
+             if prereq == 1:
+                 entry.newProp('pre', str(prereq))
++            if missingok:
++                entry.newProp('missingok', '1')
+         
+     for file in rpmObj.usefulFiles():
+         files = format.newChild(None, 'file', None)
+-- 
+1.7.9.5
+
meta/recipes-support/createrepo/createrepo_0.4.11.bb +2 -1
index 8d2dcdf..227ebcb 100644
@@ -6,12 +6,13 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=18810669f13b87348459e611d31ab760"
 
 RDEPENDS_${PN}_class-native += "libxml2-native rpm-native"
 
-PR = "r7"
+PR = "r8"
 
 SRC_URI= "http://createrepo.baseurl.org/download/${BP}.tar.gz \
           file://fix-native-install.patch \
           file://python-scripts-should-use-interpreter-from-env.patch \
 	  file://createrepo-rpm549.patch \
+	  file://recommends.patch \
 	  file://rpm-createsolvedb.py \
          "
 
Signature · 1 line
1.7.3.4
author
#16 lore raw

PATCH 11/22 python-smartpm: add support for recommends

In reply to Mark Hatle

From: Paul Eggleton <[email protected]>

Implement support within Smart for handling RRECOMMENDS relationships between RPM packages as used by OE. This includes support within the base system for caching and resolving these relationships as well as specific support in the RPM backend for reading the information from packages, and reading the "missingok" flag added to createrepo for rpm-md feeds.

---
 .../python/python-smartpm/smart-missingok.patch    |   43 -
 .../python/python-smartpm/smart-recommends.patch   | 1362 ++++++++++++++++++++
 .../python/python-smartpm_1.4.1.bb                 |    2 +-
 3 files changed, 1363 insertions(+), 44 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python-smartpm/smart-missingok.patch
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-recommends.patch
meta/recipes-devtools/python/python-smartpm/smart-missingok.patch deleted +0 -43
deleted file mode 100644
index 7e13869..0000000
@@ -1,43 +0,0 @@
-backends/rpm: Identify recommended packages
-
-We identify and store recommended packages (and later throw that data away.)
-
-This is indended to be the starting work to add support for recommended
-packages to smart.
-
-Upstream-status: Inappropriate [ Code isn't finished! ]
-
-Signed-off-by: Mark Hatle <[email protected]>
-
-Index: smart-1.4.1/smart/backends/rpm/header.py
-===================================================================
---- smart-1.4.1.orig/smart/backends/rpm/header.py
-+++ smart-1.4.1/smart/backends/rpm/header.py
-@@ -292,6 +292,7 @@ class RPMHeaderLoader(Loader):
-                     f = [0]
-                 elif type(f) != list:
-                     f = [f]
-+                recdict = {}
-                 reqdict = {}
-                 for i in range(len(n)):
-                     ni = n[i]
-@@ -308,10 +309,17 @@ class RPMHeaderLoader(Loader):
-                             # RPMSENSE_SCRIPT_PREUN |
-                             # RPMSENSE_SCRIPT_POST |
-                             # RPMSENSE_SCRIPT_POSTUN == 7744
--                            reqdict[(f[i]&7744 and PreReq or Req,
--                                     intern(ni), r, vi)] = True
-+                            if (f[i]&rpm.RPMSENSE_MISSINGOK):
-+                                print "Ignoring Recommend Dependency: %s" % (ni)
-+                                recdict[(f[i]&7744 and PreReq or Req,
-+                                         intern(ni), r, vi)] = True
-+                            else:
-+                                reqdict[(f[i]&7744 and PreReq or Req,
-+                                         intern(ni), r, vi)] = True
-+                recargs = collapse_libc_requires(recdict.keys())
-                 reqargs = collapse_libc_requires(reqdict.keys())
-             else:
-+                recargs = None
-                 reqargs = None
- 
-             n = h[1054] # RPMTAG_CONFLICTNAME
meta/recipes-devtools/python/python-smartpm/smart-recommends.patch new file +1362 -0

1,362 lines not on this page · raw message

meta/recipes-devtools/python/python-smartpm_1.4.1.bb +1 -1
index 254318c..9048bc8 100644
@@ -18,7 +18,7 @@ SRC_URI = "\
           http://launchpad.net/smart/trunk/${PV}/+download/${SRCNAME}-${PV}.tar.bz2 \
           file://smartpm-rpm5-nodig.patch \
           file://smart-rpm-root.patch \
-          file://smart-missingok.patch \
+          file://smart-recommends.patch \
           "
 
 SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6"
Signature · 1 line
1.7.3.4
author
#17 lore raw

PATCH 12/22 python-smartpm: style fixes

In reply to Mark Hatle

From: Paul Eggleton <[email protected]>

* Use ${PN} instead of python-smartpm
* Use multi-line strings instead of multiple single line += (also avoiding the confusing "_append +=")
* Use class-native instead of virtclass-native - no difference in behaviour, but this keeps things consistent if we have to add any target overrides in future.

---
 .../python/python-smartpm_1.4.1.bb                 |   48 +++++++++----------
 1 files changed, 23 insertions(+), 25 deletions(-)
meta/recipes-devtools/python/python-smartpm_1.4.1.bb +23 -25
index 9048bc8..ff153a7 100644
@@ -28,13 +28,13 @@ S = "${WORKDIR}/${SRCNAME}-${PV}"
 # Options - rpm, qt4, gtk
 PACKAGECONFIG ??= "rpm"
 
-RPM_RDEP = "python-smartpm-backend-rpm"
-QT_RDEP = "python-smartpm-interface-qt4"
-GTK_RDEP = "python-smartpm-interface-gtk"
+RPM_RDEP = "${PN}-backend-rpm"
+QT_RDEP = "${PN}-interface-qt4"
+GTK_RDEP = "${PN}-interface-gtk"
 
-RPM_RDEP_virtclass-native = ""
-QT_RDEP_virtclass-native = ""
-GTK_RDEP_virtclass-native = ""
+RPM_RDEP_class-native = ""
+QT_RDEP_class-native = ""
+GTK_RDEP_class-native = ""
 
 PACKAGECONFIG[rpm] = ",,rpm,${RPM_RDEP}"
 PACKAGECONFIG[qt4] = ",,qt4-x11,${QT_RDEP}"
@@ -85,35 +85,33 @@ do_install_append() {
    fi
 }
 
-PACKAGES  = "python-smartpm-dev python-smartpm-dbg python-smartpm-doc smartpm"
-PACKAGES += "${@base_contains('PACKAGECONFIG', 'rpm', 'python-smartpm-backend-rpm', '', d)}"
-PACKAGES += "${@base_contains('PACKAGECONFIG', 'qt4', 'python-smartpm-interface-qt4', '', d)}"
-PACKAGES += "${@base_contains('PACKAGECONFIG', 'gtk', 'python-smartpm-interface-gtk', '', d)}"
-PACKAGES += "python-smartpm-interface-images"
-PACKAGES += "python-smartpm"
+PACKAGES = "${PN}-dev ${PN}-dbg ${PN}-doc smartpm \
+            ${@base_contains('PACKAGECONFIG', 'rpm', '${PN}-backend-rpm', '', d)} \
+            ${@base_contains('PACKAGECONFIG', 'qt4', '${PN}-interface-qt4', '', d)} \
+            ${@base_contains('PACKAGECONFIG', 'gtk', '${PN}-interface-gtk', '', d)} \
+            ${PN}-interface-images ${PN}"
 
-RDEPENDS_smartpm = 'python-smartpm'
+RDEPENDS_smartpm = "${PN}"
 
-RDEPENDS_python-smartpm_append = " python-smartpm-backend-rpm python-codecs python-textutils python-xml"
-RDEPENDS_python-smartpm_append += " python-fcntl python-pickle python-crypt python-compression python-shell"
-RDEPENDS_python-smartpm_append += " python-resource python-netclient python-threading python-unixadmin"
+RDEPENDS_${PN} += "${PN}-backend-rpm python-codecs python-textutils python-xml python-fcntl \
+                   python-pickle python-crypt python-compression python-shell \
+                   python-resource python-netclient python-threading python-unixadmin"
+RDEPENDS_${PN}_class-native = ""
 
-#RDEPENDS_python-smartpm_append += " python-modules"
+RDEPENDS_${PN}-backend-rpm = "python-rpm"
 
-RDEPENDS_python-smartpm-backend-rpm = 'python-rpm'
-
-RDEPENDS_python-smartpm-interface-qt4 = 'qt4-x11 python-smartpm-interface-images'
-RDEPENDS_python-smartpm-interface-gtk = 'gtk+ python-smartpm-interface-images'
+RDEPENDS_${PN}-interface-qt4 = "qt4-x11 ${PN}-interface-images"
+RDEPENDS_${PN}-interface-gtk = "gtk+ ${PN}-interface-images"
 
 FILES_smartpm = "${bindir}/smart"
 
 FILES_${PN}-dbg += "${libdir}/python*/site-packages/smart/backends/rpm/.debug"
 
-FILES_python-smartpm-backend-rpm = "${libdir}/python*/site-packages/smart/backends/rpm"
+FILES_${PN}-backend-rpm = "${libdir}/python*/site-packages/smart/backends/rpm"
 
-FILES_python-smartpm-interface-qt4 = "${libdir}/python*/site-packages/smart/interfaces/qt4"
-FILES_python-smartpm-interface-gtk = "${libdir}/python*/site-packages/smart/interfaces/gtk"
-FILES_python-smartpm-interface-images = "${datadir}/${baselib}/python*/site-packages/smart/interfaces/images"
+FILES_${PN}-interface-qt4 = "${libdir}/python*/site-packages/smart/interfaces/qt4"
+FILES_${PN}-interface-gtk = "${libdir}/python*/site-packages/smart/interfaces/gtk"
+FILES_${PN}-interface-images = "${datadir}/${baselib}/python*/site-packages/smart/interfaces/images"
 
 BBCLASSEXTEND = "native"
 
Signature · 1 line
1.7.3.4
author
#18 lore raw

PATCH 13/22 python-smartpm: fix package metadata not being read from rpm-md feeds

In reply to Mark Hatle

From: Paul Eggleton <[email protected]>

The XML indexes in rpm-md were being parsed incorrectly leading to the package metadata (e.g. dependencies) not being read.

---
 .../python/python-smartpm/smart-rpm-md-parse.patch |   26 ++++++++++++++++++++
 .../python/python-smartpm_1.4.1.bb                 |    3 +-
 2 files changed, 28 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-rpm-md-parse.patch
meta/recipes-devtools/python/python-smartpm/smart-rpm-md-parse.patch new file +26 -0
new file mode 100644
index 0000000..97cecc1
@@ -0,0 +1,26 @@
+backends/rpm: fix parsing of rpm-md metadata
+
+If assertions are disabled then the queue.pop() wasn't being executed,
+leading to requires, recommends etc. not being read properly.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <[email protected]>
+
+diff --git a/smart/backends/rpm/metadata.py b/smart/backends/rpm/metadata.py
+index 2c54f39..dc9df22 100644
+--- a/smart/backends/rpm/metadata.py
++++ b/smart/backends/rpm/metadata.py
+@@ -188,7 +188,8 @@ class RPMMetaDataLoader(Loader):
+ 
+             elif event == "end":
+ 
+-                assert queue.pop() is elem
++                popped = queue.pop()
++                assert popped is elem
+ 
+                 if skip:
+                     if tag == skip:
+-- 
+1.7.9.5
+
meta/recipes-devtools/python/python-smartpm_1.4.1.bb +2 -1
index ff153a7..2d0f7cd 100644
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
 
 DEPENDS = "python rpm"
-PR = "r1"
+PR = "r2"
 SRCNAME = "smart"
 
 SRC_URI = "\
@@ -19,6 +19,7 @@ SRC_URI = "\
           file://smartpm-rpm5-nodig.patch \
           file://smart-rpm-root.patch \
           file://smart-recommends.patch \
+          file://smart-rpm-md-parse.patch \
           "
 
 SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6"
Signature · 1 line
1.7.3.4
author
#19 lore raw

PATCH 14/22 python-smartpm: don't create /var/tmp on every rpm database open

In reply to Mark Hatle

From: Paul Eggleton <[email protected]>

This directory if present in the rootfs interferes with proper installation of base-files and doesn't seem to need to be there for smart/rpm to work in any case.

---
 .../python/python-smartpm/smart-tmpdir.patch       |   30 ++++++++++++++++++++
 .../python/python-smartpm_1.4.1.bb                 |    1 +
 2 files changed, 31 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-tmpdir.patch
meta/recipes-devtools/python/python-smartpm/smart-tmpdir.patch new file +30 -0
new file mode 100644
index 0000000..2f09ce9
@@ -0,0 +1,30 @@
+backends/rpm: remove creation of /var/tmp
+
+This doesn't appear to be needed, and breaks installation of base-files
+in OpenEmbedded (since that is a symlink installed as part of the
+package).
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <[email protected]>
+
+diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py
+index 234c844..127354d 100644
+--- a/smart/backends/rpm/base.py
++++ b/smart/backends/rpm/base.py
+@@ -82,12 +82,6 @@ def getTS(new=False):
+             else:
+                 iface.warning(_("Initialized new rpm database at %s")
+                               % getTS.root)
+-        tmpdir = os.path.join(getTS.root, "var/tmp")
+-        if not os.path.isdir(tmpdir):
+-            try:
+-                os.makedirs(tmpdir)
+-            except OSError:
+-                pass
+     if new:
+         if sysconf.get("rpm-dbpath"):
+             rpm.addMacro('_dbpath', "/" + sysconf.get("rpm-dbpath"))
+-- 
+1.7.9.5
+
meta/recipes-devtools/python/python-smartpm_1.4.1.bb +1 -0
index 2d0f7cd..9ec7c7a 100644
@@ -20,6 +20,7 @@ SRC_URI = "\
           file://smart-rpm-root.patch \
           file://smart-recommends.patch \
           file://smart-rpm-md-parse.patch \
+          file://smart-tmpdir.patch \
           "
 
 SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6"
Signature · 1 line
1.7.3.4
author
#20 lore raw

PATCH 15/22 python-smartpm: support nolinktos and noparentdirs rpm options

In reply to Mark Hatle

From: Paul Eggleton <[email protected]>

Allowing us to turn on these options enables installation of base-files which contains a symlink to /proc/mounts which is auto-detected as a dependency and isn't provided by any other package.

---
 .../python/python-smartpm/smart-dflags.patch       |   40 ++++++++++++++++++++
 .../python/python-smartpm_1.4.1.bb                 |    1 +
 2 files changed, 41 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-dflags.patch
meta/recipes-devtools/python/python-smartpm/smart-dflags.patch new file +40 -0
new file mode 100644
index 0000000..3f27262
@@ -0,0 +1,40 @@
+backends/rpm: add support for setting dependency flags
+
+This is useful for OpenEmbedded so that we can do the equivalent of
+the --nolinktos and --noparentdirs rpm command line options.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <[email protected]>
+
+diff --git a/smart/backends/rpm/pm.py b/smart/backends/rpm/pm.py
+index 707a146..aec82e7 100644
+--- a/smart/backends/rpm/pm.py
++++ b/smart/backends/rpm/pm.py
+@@ -106,6 +106,23 @@ class RPMPackageManager(PackageManager):
+             flags |= rpm.RPMTRANS_FLAG_TEST
+         ts.setFlags(flags)
+ 
++        dflags = ts.setDFlags(0)
++        if sysconf.get("rpm-noupgrade", False):
++            dflags |= rpm.RPMDEPS_FLAG_NOUPGRADE
++        if sysconf.get("rpm-norequires", False):
++            dflags |= rpm.RPMDEPS_FLAG_NOREQUIRES
++        if sysconf.get("rpm-noconflicts", False):
++            dflags |= rpm.RPMDEPS_FLAG_NOCONFLICTS
++        if sysconf.get("rpm-noobsoletes", False):
++            dflags |= rpm.RPMDEPS_FLAG_NOOBSOLETES
++        if sysconf.get("rpm-noparentdirs", False):
++            dflags |= rpm.RPMDEPS_FLAG_NOPARENTDIRS
++        if sysconf.get("rpm-nolinktos", False):
++            dflags |= rpm.RPMDEPS_FLAG_NOLINKTOS
++        if sysconf.get("rpm-nosuggest", False):
++            dflags |= rpm.RPMDEPS_FLAG_NOSUGGEST
++        ts.setDFlags(dflags)
++
+         # Set rpm verbosity level.
+         levelname = sysconf.get('rpm-log-level')
+         level = {
+-- 
+1.7.9.5
+
meta/recipes-devtools/python/python-smartpm_1.4.1.bb +1 -0
index 9ec7c7a..72a307d 100644
@@ -19,6 +19,7 @@ SRC_URI = "\
           file://smartpm-rpm5-nodig.patch \
           file://smart-rpm-root.patch \
           file://smart-recommends.patch \
+          file://smart-dflags.patch \
           file://smart-rpm-md-parse.patch \
           file://smart-tmpdir.patch \
           "
Signature · 1 line
1.7.3.4
author
#21 lore raw

PATCH 16/22 python-smartpm: allow setting arbitrary macros in smart config

In reply to Mark Hatle

From: Paul Eggleton <[email protected]>

Add support for an rpm-extra-macros config option which can be used to define some extra macros that need to be set for rootfs construction to work on the host and that don't really warrant their own specific named config options to be created.

---
 .../python-smartpm/smart-rpm-extra-macros.patch    |   27 ++++++++++++++++++++
 .../python/python-smartpm_1.4.1.bb                 |    1 +
 2 files changed, 28 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-rpm-extra-macros.patch
meta/recipes-devtools/python/python-smartpm/smart-rpm-extra-macros.patch new file +27 -0
new file mode 100644
index 0000000..30cb176
@@ -0,0 +1,27 @@
+backends/rpm: implement rpm-extra-macros option
+
+Allow defining extra macros in the smart configuration to be passed
+to rpm before opening the database.
+
+Upstream-Status: Pending
+
+Signed-off-by: Paul Eggleton <[email protected]>
+
+diff --git a/smart/backends/rpm/base.py b/smart/backends/rpm/base.py
+index b9e9cb2..234c844 100644
+--- a/smart/backends/rpm/base.py
++++ b/smart/backends/rpm/base.py
+@@ -53,6 +53,10 @@ def rpm_join_dbpath(root, dbpath):
+         return os.path.join(root, dbpath)
+ 
+ def getTS(new=False):
++    if sysconf.get("rpm-extra-macros"):
++        for key, value in sysconf.get("rpm-extra-macros").items():
++            rpm.addMacro(key, str(value))
++
+     rpm_root = os.path.abspath(sysconf.get("rpm-root", "/"))
+     if not hasattr(getTS, "ts") or getTS.root != rpm_root:
+         getTS.root = rpm_root
+-- 
+1.7.9.5
+
meta/recipes-devtools/python/python-smartpm_1.4.1.bb +1 -0
index 72a307d..4694d51 100644
@@ -19,6 +19,7 @@ SRC_URI = "\
           file://smartpm-rpm5-nodig.patch \
           file://smart-rpm-root.patch \
           file://smart-recommends.patch \
+          file://smart-rpm-extra-macros.patch \
           file://smart-dflags.patch \
           file://smart-rpm-md-parse.patch \
           file://smart-tmpdir.patch \
Signature · 1 line
1.7.3.4
author
#22 lore raw

PATCH 17/22 python-smartpm: Fix incorrect comparison arguments

In reply to Mark Hatle

Built-in provides were not being compared properly within smart. This was caused by an incorrect argument to the match function.

---
 .../python-smartpm/smart-metadata-match.patch      |   28 ++++++++++++++++++++
 .../python/python-smartpm_1.4.1.bb                 |    3 +-
 2 files changed, 30 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-devtools/python/python-smartpm/smart-metadata-match.patch
meta/recipes-devtools/python/python-smartpm/smart-metadata-match.patch new file +28 -0
new file mode 100644
index 0000000..d06f416
@@ -0,0 +1,28 @@
+smart - backends/rmp/metadata.py: Fix incorrect call to the match function
+
+The match function should take three parameters, name, comparison, version...
+The original code was passing it a reference to the object holding the data
+instead, which caused the comparison in match to always fail.
+
+Upstream-Status: Pending
+
+Signed-off-by: Mark Hatle <[email protected]>
+
+--- a/smart/backends/rpm/metadata.py
++++ b/smart/backends/rpm/metadata.py
+@@ -332,13 +332,13 @@
+                     reqargs = [x for x in reqdict
+                                if not ((x[2] is None or "=" in x[2]) and
+                                        (RPMProvides, x[1], x[3]) in prvdict or
+-                                       system_provides.match(*x[:3]))]
++                                       system_provides.match(x[1], x[2], x[3]))]
+                     reqargs = collapse_libc_requires(reqargs)
+ 
+                     recargs = [x for x in recdict
+                                if not ((x[2] is None or "=" in x[2]) and
+                                        (RPMProvides, x[1], x[3]) in prvdict or
+-                                       system_provides.match(*x[:3]))]
++                                       system_provides.match(x[1], x[2], x[3]))]
+ 
+                     prvargs = prvdict.keys()
+                     cnfargs = cnfdict.keys()
meta/recipes-devtools/python/python-smartpm_1.4.1.bb +2 -1
index 4694d51..bbaa530 100644
@@ -11,7 +11,7 @@ LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://LICENSE;md5=393a5ca445f6965873eca0259a17f833"
 
 DEPENDS = "python rpm"
-PR = "r2"
+PR = "r3"
 SRCNAME = "smart"
 
 SRC_URI = "\
@@ -23,6 +23,7 @@ SRC_URI = "\
           file://smart-dflags.patch \
           file://smart-rpm-md-parse.patch \
           file://smart-tmpdir.patch \
+          file://smart-metadata-match.patch \
           "
 
 SRC_URI[md5sum] = "573ef32ba177a6b3c4bf7ef04873fcb6"
Signature · 1 line
1.7.3.4
author
#23 lore raw

PATCH 18/22 shadow: add runtime dependency on base-passwd

In reply to Mark Hatle

From: Paul Eggleton <[email protected]>

This fixes an issue where the shadow package was sometimes getting installed before base-passwd during rootfs construction with Smart, which meant the postinstall scripts could not find /etc/passwd and /etc/group and failed as a result.

---
 meta/recipes-extended/shadow/shadow_4.1.4.3.bb |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
meta/recipes-extended/shadow/shadow_4.1.4.3.bb +3 -2
index eb00bf0..91410d8 100644
@@ -8,8 +8,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \
                     file://src/passwd.c;firstline=8;endline=30;md5=2899a045e90511d0e043b85a7db7e2fe"
 
 DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-RDEPENDS_${PN} = "shadow-securetty ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}"
-PR = "r12"
+RDEPENDS_${PN} = "shadow-securetty ${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)} \
+                  base-passwd"
+PR = "r13"
 
 SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \
            file://login_defs_pam.sed \
Signature · 1 line
1.7.3.4
author
#24 lore raw

PATCH 19/22 package_deb: Dependencies with a ( or ) in them are invalid in debs

In reply to Mark Hatle

Replace ( or ) with __. This allows RPM style dependencies to be satisfied in deb style packages.

---
 meta/classes/package_deb.bbclass |   10 ++++++++++
 1 files changed, 10 insertions(+), 0 deletions(-)
meta/classes/package_deb.bbclass +10 -0
index d273cb0..eed9b8a 100644
@@ -335,12 +335,22 @@ python do_package_deb () {
         mapping_rename_hook(localdata)
 
         def debian_cmp_remap(var):
+            # dpkg does not allow for '(' or ')' in a dependency name
+            # replace these instances with '__' and '__'
+            #
             # In debian '>' and '<' do not mean what it appears they mean
             #   '<' = less or equal
             #   '>' = greater or equal
             # adjust these to the '<<' and '>>' equivalents
             #
             for dep in var:
+                if '(' in dep:
+                    newdep = dep.replace('(', '__')
+                    newdep = newdep.replace(')', '__')
+                    if newdep != dep:
+                        var[newdep] = var[dep]
+                        del var[dep]
+            for dep in var:
                 for i, v in enumerate(var[dep]):
                     if (v or "").startswith("< "):
                         var[dep][i] = var[dep][i].replace("< ", "<< ")
Signature · 1 line
1.7.3.4
author
#25 lore raw

PATCH 20/22 pkgconfig: Add a manual dependency of pkgconfig(pkg-config)

In reply to Mark Hatle

The libtelepathy-glib-dev package contains a .pc file that has a requires of pkgconfig(pkg-config) > 0.21 in it. In order to satisfy this requirement we add a manual RPROVIDE to the pkgconfig package.

---
 meta/recipes-devtools/pkgconfig/pkgconfig.inc     |    5 +++++
 meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb |    2 +-
 meta/recipes-devtools/pkgconfig/pkgconfig_git.bb  |    1 +
 3 files changed, 7 insertions(+), 1 deletions(-)
meta/recipes-devtools/pkgconfig/pkgconfig.inc +5 -0
index 83a9cdf..27d4071 100644
@@ -37,3 +37,8 @@ BBCLASSEXTEND = "native nativesdk"
 # files.
 FILES_${PN}-dev = ""
 FILES_${PN} += "${datadir}/aclocal/pkg.m4"
+
+# When using the RPM generated automatic package dependencies, some packages
+# will end up requiring 'pkgconfig(pkg-config)'.  Allow this behavior by
+# specifying an appropriate provide.
+RPROVIDES_${PN} += "pkgconfig(pkg-config) (= ${PV})"
meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb +1 -1
index 1e60c54..d0a2b1f 100644
@@ -1,6 +1,6 @@
 require pkgconfig.inc
 
-PR = "r5"
+PR = "r6"
 
 SRC_URI[md5sum] = "a3270bab3f4b69b7dc6dbdacbcae9745"
 SRC_URI[sha256sum] = "3ba691ee2431f32ccb8efa131e59bf23e37f122dc66791309023ca6dcefcd10e"
meta/recipes-devtools/pkgconfig/pkgconfig_git.bb +1 -0
index 6271992..d5ec8fc 100644
@@ -8,6 +8,7 @@ S = "${WORKDIR}/git/"
 
 SRCREV = "66d49f1375fec838bcd301bb4ca2ef76cee0e47c"
 PV = "0.23+git${SRCPV}"
+PR = "r1"
 
 DEFAULT_PREFERENCE = "-1"
 
Signature · 1 line
1.7.3.4
#26 lore raw

Re: [PATCH 20/22] pkgconfig: Add a manual dependency of pkgconfig(pkg-config)

Quoted 45 lines · On Tuesday 04 December 2012 11:14:52 Mark Hatle wrote:

The libtelepathy-glib-dev package contains a .pc file that has a requires of pkgconfig(pkg-config) > 0.21 in it. In order to satisfy this requirement we add a manual RPROVIDE to the pkgconfig package.

---
 meta/recipes-devtools/pkgconfig/pkgconfig.inc     |    5 +++++
 meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb |    2 +-
 meta/recipes-devtools/pkgconfig/pkgconfig_git.bb  |    1 +
 3 files changed, 7 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-devtools/pkgconfig/pkgconfig.inc index 83a9cdf..27d4071 100644

meta/recipes-devtools/pkgconfig/pkgconfig.inc +2 -0
@@ -37,3 +37,8 @@ BBCLASSEXTEND = "native nativesdk"
 # files.
 FILES_${PN}-dev = ""
 FILES_${PN} += "${datadir}/aclocal/pkg.m4"
+
+# When using the RPM generated automatic package dependencies, some

packages +# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by +# specifying an appropriate provide.

meta/recipes-devtools/pkgconfig/pkgconfig.inc +1 -0
+RPROVIDES_${PN} += "pkgconfig(pkg-config) (= ${PV})"
(quoted diff) +0 -0

b/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb index 1e60c54..d0a2b1f 100644

meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb +1 -1
@@ -1,6 +1,6 @@
 require pkgconfig.inc
 
-PR = "r5"
+PR = "r6"
 
 SRC_URI[md5sum] = "a3270bab3f4b69b7dc6dbdacbcae9745"
 SRC_URI[sha256sum] =

"3ba691ee2431f32ccb8efa131e59bf23e37f122dc66791309023ca6dcefcd10e" diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb index 6271992..d5ec8fc 100644

meta/recipes-devtools/pkgconfig/pkgconfig_git.bb S = "${WORKDIR}/git/" · line 13

Quoted 6 lines
meta/recipes-devtools/pkgconfig/pkgconfig_git.bb +1 -0
@@ -8,6 +8,7 @@ S = "${WORKDIR}/git/"
 
 SRCREV = "66d49f1375fec838bcd301bb4ca2ef76cee0e47c"
 PV = "0.23+git${SRCPV}"
+PR = "r1"
 
 DEFAULT_PREFERENCE = "-1"

Because this tends to come in via file dependencies generated during do_package, a package for pkgconfig won't be forced to be built; so if nothing else depends upon pkgconfig then you can get a failure during do_rootfs (as I have here building core-image-lsb with DISTRO = "poky-lsb" from scratch with these changes on top of master):

| Note: to be installed:  psplash@i586 packagegroup-core-basic@all
| packagegroup-core-ssh-openssh@all packagegroup-core-lsb@all
| packagegroup-base-extended@qemux86 packagegroup-core-boot@qemux86
| locale-base-en-us@i586 locale-base-en-gb@i586
| Loading cache...
| Updating cache...               ######################################## 
[100%]
| 
| Computing transaction...error: Can't install libz-dev-1.2.7-r0@i586: 
| no package provides pkgconfig

I'm not quite sure what the best fix for that is though.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
author
#27 lore raw

Re: [PATCH 20/22] pkgconfig: Add a manual dependency of pkgconfig(pkg-config)

Quoted 70 lines · Paul Eggleton
Quoted 45 lines · On Tuesday 04 December 2012 11:14:52 Mark Hatle wrote:

The libtelepathy-glib-dev package contains a .pc file that has a requires of pkgconfig(pkg-config) > 0.21 in it. In order to satisfy this requirement we add a manual RPROVIDE to the pkgconfig package.

---
  meta/recipes-devtools/pkgconfig/pkgconfig.inc     |    5 +++++
  meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb |    2 +-
  meta/recipes-devtools/pkgconfig/pkgconfig_git.bb  |    1 +
  3 files changed, 7 insertions(+), 1 deletions(-)
(quoted diff) +0 -0

b/meta/recipes-devtools/pkgconfig/pkgconfig.inc index 83a9cdf..27d4071 100644

meta/recipes-devtools/pkgconfig/pkgconfig.inc +2 -0
@@ -37,3 +37,8 @@ BBCLASSEXTEND = "native nativesdk"
  # files.
  FILES_${PN}-dev = ""
  FILES_${PN} += "${datadir}/aclocal/pkg.m4"
+
+# When using the RPM generated automatic package dependencies, some

packages +# will end up requiring 'pkgconfig(pkg-config)'. Allow this behavior by +# specifying an appropriate provide.

meta/recipes-devtools/pkgconfig/pkgconfig.inc +1 -0
+RPROVIDES_${PN} += "pkgconfig(pkg-config) (= ${PV})"
(quoted diff) +0 -0

b/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb index 1e60c54..d0a2b1f 100644

meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb +1 -1
@@ -1,6 +1,6 @@
  require pkgconfig.inc
 
-PR = "r5"
+PR = "r6"
 
  SRC_URI[md5sum] = "a3270bab3f4b69b7dc6dbdacbcae9745"
  SRC_URI[sha256sum] =

"3ba691ee2431f32ccb8efa131e59bf23e37f122dc66791309023ca6dcefcd10e" diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb index 6271992..d5ec8fc 100644

meta/recipes-devtools/pkgconfig/pkgconfig_git.bb S = "${WORKDIR}/git/" · line 13

Quoted 6 lines
meta/recipes-devtools/pkgconfig/pkgconfig_git.bb +1 -0
@@ -8,6 +8,7 @@ S = "${WORKDIR}/git/"
 
  SRCREV = "66d49f1375fec838bcd301bb4ca2ef76cee0e47c"
  PV = "0.23+git${SRCPV}"
+PR = "r1"
 
  DEFAULT_PREFERENCE = "-1"

Because this tends to come in via file dependencies generated during do_package, a package for pkgconfig won't be forced to be built; so if nothing else depends upon pkgconfig then you can get a failure during do_rootfs (as I have here building core-image-lsb with DISTRO = "poky-lsb" from scratch with these changes on top of master):

| Note: to be installed:  psplash@i586 packagegroup-core-basic@all
| packagegroup-core-ssh-openssh@all packagegroup-core-lsb@all
| packagegroup-base-extended@qemux86 packagegroup-core-boot@qemux86
| locale-base-en-us@i586 locale-base-en-gb@i586
| Loading cache...
| Updating cache...               ########################################
[100%]
|
| Computing transaction...error: Can't install libz-dev-1.2.7-r0@i586:
| no package provides pkgconfig
Quoted 1 line

I'm not quite sure what the best fix for that is though.

It would be nice if something asks for the feature dev-pkgs that it would add things like libtool, pkgconfig, etc and make the packages available in the build. I must have been lucky with the sato build where I found this to already have pkgconfig around already.

--Mark

Quoted 3 lines

Cheers,
Paul

#28 lore raw

Re: [PATCH 20/22] pkgconfig: Add a manual dependency of pkgconfig(pkg-config)

In reply to Mark Hatle
Quoted 7 lines · Mark Hatle

The libtelepathy-glib-dev package contains a .pc file that has a requires of pkgconfig(pkg-config) > 0.21 in it. In order to satisfy this requirement
we add a manual RPROVIDE to the pkgconfig package.

Have this been tested using ipk and deb packages?

I don't know if the format used, of rprovides, is supported by them (or abstracted by bitbake).

Signature · 3 lines
Otavio Salvador                             O.S. Systems
E-mail: [email protected]  http://www.ossystems.com.br
Mobile: +55 53 9981-7854              http://projetos.ossystems.com.br
author
#29 lore raw

Re: [PATCH 20/22] pkgconfig: Add a manual dependency of pkgconfig(pkg-config)

Quoted 10 lines · Otavio Salvador

On Tue, Dec 4, 2012 at 3:14 PM, Mark Hatle <[email protected] <mailto:[email protected]>> wrote:

The libtelepathy-glib-dev package contains a .pc file that has a requires of pkgconfig(pkg-config) > 0.21 in it. In order to satisfy this requirement we add a manual RPROVIDE to the pkgconfig package.

Quoted 8 lines

<mailto:[email protected]>>

Have this been tested using ipk and deb packages?

I don't know if the format used, of rprovides, is supported by them (or abstracted by bitbake).

Deb was the only one that complained. And that was solved by a patch that changed '(' and ')' to '__'. This also paves the way for us to use some of the per-file dependency information we have to improve the dependency resolution for both deb and ipk.

(If IPK fails with this, it wasn't reporting the problem during build or image install on my system. I tests deb, ipk and rpm with this change.)

--Mark

Quoted 6 lines

--
Otavio Salvador O.S. Systems
E-mail: [email protected] <mailto:[email protected]>
http://www.ossystems.com.br
Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br

author
#30 lore raw

PATCH 21/22 pseudo: Rework target, native and nativesdk pseudo intergration

In reply to Mark Hatle

Pseudo was not building and installing properly for systems where baselib was not 'lib'. This change reworks the three scenerios to work properly.

---
 meta/recipes-devtools/pseudo/pseudo.inc      |   58 ++++++++++++-------------
 meta/recipes-devtools/pseudo/pseudo_1.4.1.bb |    2 +-
 meta/recipes-devtools/pseudo/pseudo_git.bb   |    2 +-
 3 files changed, 30 insertions(+), 32 deletions(-)
meta/recipes-devtools/pseudo/pseudo.inc +28 -30
index 98f706c..8dc7d72 100644
@@ -13,34 +13,28 @@ SRC_URI_append_class-nativesdk = " file://symver.patch"
 
 SRC_URI_append_class-native = " file://symver.patch"
 
-FILES_${PN} = "${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
-FILES_${PN}-dbg += "${libdir}/pseudo/lib*/.debug"
+FILES_${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
+FILES_${PN}-dbg += "${prefix}/lib/pseudo/lib*/.debug"
 PROVIDES += "virtual/fakeroot"
 
 MAKEOPTS = ""
 
 inherit siteinfo
 
-do_configure () {
-	:
-}
-
-NO32LIBS ??= "1"
-
-# Compile for the local machine arch...
-do_compile () {
+do_configure_class-target () {
 	if [ "${SITEINFO_BITS}" = "64" ]; then
-	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+		mylibdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
 	else
-	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+		mylibdir=${prefix}/lib/pseudo/lib
 	fi
-	oe_runmake ${MAKEOPTS}
+	${S}/configure --prefix=${prefix} --libdir=$mylibdir --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath
 }
 
-# Two below are the same
+NO32LIBS ??= "1"
+
 # If necessary compile for the alternative machine arch.  This is only 
 # necessary in a native build.
-do_compile_prepend_class-native () {
+do_compile_native() {
 	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
 		# We need the 32-bit libpseudo on a 64-bit machine...
                 # ... and we really, really, hope that the native host is
@@ -56,18 +50,20 @@ do_compile_prepend_class-native () {
 		# prevent it from removing the lib, but remove everything else
 		make 'LIB=foo' ${MAKEOPTS} distclean 
 	fi
+	if [ "${SITEINFO_BITS}" = "64" ]; then
+	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+	else
+	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+	fi
+	oe_runmake ${MAKEOPTS}
 }
 
-do_compile_prepend_class-nativesdk () {
-	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
-		# We need the 32-bit libpseudo on a 64-bit machine...
-                # ... and we really, really, hope that the native host is
-                # x86, or else --bits may not work.
-		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
-		oe_runmake ${MAKEOPTS} libpseudo
-		# prevent it from removing the lib, but remove everything else
-		make 'LIB=foo' ${MAKEOPTS} distclean 
-	fi
+do_compile_class-native () {
+	do_compile_native
+}
+
+do_compile_class-nativesdk () {
+	do_compile_native
 }
 
 do_install () {
@@ -77,18 +73,20 @@ do_install () {
 # Two below are the same
 # If necessary install for the alternative machine arch.  This is only 
 # necessary in a native build.
-do_install_append_class-native () {
+do_install_native () {
 	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
 		mkdir -p ${D}${prefix}/lib/pseudo/lib
 		cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
 	fi
+	oe_runmake 'DESTDIR=${D}' ${MAKEOPTS} 'LIB=lib/pseudo/lib$(MARK64)' install
+}
+
+do_install_class-native () {
+	do_install_native
 }
 
 do_install_append_class-nativesdk () {
-	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
-		mkdir -p ${D}${prefix}/lib/pseudo/lib
-		cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
-	fi
+	do_install_native
 }
 
 BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/pseudo/pseudo_1.4.1.bb +1 -1
index 70fe9c0..8367a34 100644
@@ -1,6 +1,6 @@
 require pseudo.inc
 
-PR = "r13"
+PR = "r14"
 
 SRC_URI = "http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2"
 
meta/recipes-devtools/pseudo/pseudo_git.bb +1 -1
index e394ffb..c8ec5ad 100644
@@ -2,7 +2,7 @@ require pseudo.inc
 
 SRCREV = "398a264490713c912b4ce465251a8a82a7905f45"
 PV = "1.4.1+git${SRCPV}"
-PR = "r28"
+PR = "r29"
 
 DEFAULT_PREFERENCE = "-1"
 
Signature · 1 line
1.7.3.4
#31 lore raw

Re: [PATCH 21/22] pseudo: Rework target, native and nativesdk pseudo intergration

Quoted 36 lines · Mark Hatle

Pseudo was not building and installing properly for systems where baselib was not 'lib'. This change reworks the three scenerios to work properly.

---
  meta/recipes-devtools/pseudo/pseudo.inc      |   58 ++++++++++++-------------
  meta/recipes-devtools/pseudo/pseudo_1.4.1.bb |    2 +-
  meta/recipes-devtools/pseudo/pseudo_git.bb   |    2 +-
  3 files changed, 30 insertions(+), 32 deletions(-)
meta/recipes-devtools/pseudo/pseudo.inc +2 -10
index 98f706c..8dc7d72 100644
@@ -13,34 +13,28 @@ SRC_URI_append_class-nativesdk = " file://symver.patch"
 
  SRC_URI_append_class-native = " file://symver.patch"
 
-FILES_${PN} = "${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
-FILES_${PN}-dbg += "${libdir}/pseudo/lib*/.debug"
+FILES_${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
+FILES_${PN}-dbg += "${prefix}/lib/pseudo/lib*/.debug"
  PROVIDES += "virtual/fakeroot"
 
  MAKEOPTS = ""
 
  inherit siteinfo
 
-do_configure () {
-	:
-}
-
-NO32LIBS ??= "1"
-
-# Compile for the local machine arch...
-do_compile () {

meta/recipes-devtools/pseudo/pseudo.inc SRC_URI_append_class-nativesdk = " file://symver.patch" · line 30

Quoted 10 lines
meta/recipes-devtools/pseudo/pseudo.inc +4 -3
+do_configure_class-target () {
  	if [ "${SITEINFO_BITS}" = "64" ]; then
-	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+		mylibdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
  	else
-	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+		mylibdir=${prefix}/lib/pseudo/lib
  	fi
-	oe_runmake ${MAKEOPTS}
+	${S}/configure --prefix=${prefix} --libdir=$mylibdir --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath

You seem to have dropped the --with-sqlite and now it does not find sqlite3.h for the target build as can be seen in the build appliance failure.

http://autobuilder.yoctoproject.org:8010/builders/build-appliance/builds/154/steps/shell_46/logs/stdio

Sau!

Quoted 95 lines
meta/recipes-devtools/pseudo/pseudo.inc +22 -17
  }
 
-# Two below are the same
+NO32LIBS ??= "1"
+
  # If necessary compile for the alternative machine arch.  This is only
  # necessary in a native build.
-do_compile_prepend_class-native () {
+do_compile_native() {
  	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
  		# We need the 32-bit libpseudo on a 64-bit machine...
                  # ... and we really, really, hope that the native host is
@@ -56,18 +50,20 @@ do_compile_prepend_class-native () {
  		# prevent it from removing the lib, but remove everything else
  		make 'LIB=foo' ${MAKEOPTS} distclean
  	fi
+	if [ "${SITEINFO_BITS}" = "64" ]; then
+	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+	else
+	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+	fi
+	oe_runmake ${MAKEOPTS}
  }
 
-do_compile_prepend_class-nativesdk () {
-	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
-		# We need the 32-bit libpseudo on a 64-bit machine...
-                # ... and we really, really, hope that the native host is
-                # x86, or else --bits may not work.
-		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
-		oe_runmake ${MAKEOPTS} libpseudo
-		# prevent it from removing the lib, but remove everything else
-		make 'LIB=foo' ${MAKEOPTS} distclean
-	fi
+do_compile_class-native () {
+	do_compile_native
+}
+
+do_compile_class-nativesdk () {
+	do_compile_native
  }
 
  do_install () {
@@ -77,18 +73,20 @@ do_install () {
  # Two below are the same
  # If necessary install for the alternative machine arch.  This is only
  # necessary in a native build.
-do_install_append_class-native () {
+do_install_native () {
  	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
  		mkdir -p ${D}${prefix}/lib/pseudo/lib
  		cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
  	fi
+	oe_runmake 'DESTDIR=${D}' ${MAKEOPTS} 'LIB=lib/pseudo/lib$(MARK64)' install
+}
+
+do_install_class-native () {
+	do_install_native
  }
 
  do_install_append_class-nativesdk () {
-	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
-		mkdir -p ${D}${prefix}/lib/pseudo/lib
-		cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
-	fi
+	do_install_native
  }
 
  BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/pseudo/pseudo_1.4.1.bb +1 -1
index 70fe9c0..8367a34 100644
@@ -1,6 +1,6 @@
  require pseudo.inc
 
-PR = "r13"
+PR = "r14"
 
  SRC_URI = "http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2"
 
meta/recipes-devtools/pseudo/pseudo_git.bb +1 -1
index e394ffb..c8ec5ad 100644
@@ -2,7 +2,7 @@ require pseudo.inc
 
  SRCREV = "398a264490713c912b4ce465251a8a82a7905f45"
  PV = "1.4.1+git${SRCPV}"
-PR = "r28"
+PR = "r29"
 
  DEFAULT_PREFERENCE = "-1"
 
author
#32 lore raw

Re: [PATCH 21/22] pseudo: Rework target, native and nativesdk pseudo intergration

Quoted 43 lines · Saul Wold
Quoted 42 lines · Mark Hatle

Pseudo was not building and installing properly for systems where baselib was not 'lib'. This change reworks the three scenerios to work properly.

---
   meta/recipes-devtools/pseudo/pseudo.inc      |   58 ++++++++++++-------------
   meta/recipes-devtools/pseudo/pseudo_1.4.1.bb |    2 +-
   meta/recipes-devtools/pseudo/pseudo_git.bb   |    2 +-
   3 files changed, 30 insertions(+), 32 deletions(-)
meta/recipes-devtools/pseudo/pseudo.inc +4 -12
index 98f706c..8dc7d72 100644
@@ -13,34 +13,28 @@ SRC_URI_append_class-nativesdk = " file://symver.patch"
 
   SRC_URI_append_class-native = " file://symver.patch"
 
-FILES_${PN} = "${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
-FILES_${PN}-dbg += "${libdir}/pseudo/lib*/.debug"
+FILES_${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"
+FILES_${PN}-dbg += "${prefix}/lib/pseudo/lib*/.debug"
   PROVIDES += "virtual/fakeroot"
 
   MAKEOPTS = ""
 
   inherit siteinfo
 
-do_configure () {
-	:
-}
-
-NO32LIBS ??= "1"
-
-# Compile for the local machine arch...
-do_compile () {
+do_configure_class-target () {
   	if [ "${SITEINFO_BITS}" = "64" ]; then
-	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+		mylibdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
   	else
-	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
Quoted 8 lines

meta/recipes-devtools/pseudo/pseudo.inc SRC_URI_append_class-nativesdk = " file://symver.patch" · line 30

Quoted 4 lines
meta/recipes-devtools/pseudo/pseudo.inc +2 -1
+		mylibdir=${prefix}/lib/pseudo/lib
   	fi
-	oe_runmake ${MAKEOPTS}
+	${S}/configure --prefix=${prefix} --libdir=$mylibdir --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath

You seem to have dropped the --with-sqlite and now it does not find sqlite3.h for the target build as can be seen in the build appliance failure.

It should be sourcing it from the compiler with a #include. It was working on all of my test builds.

But either way, there are two bugs here.. the first is pseudo isn't building for the target -- it wasn't before either.

But the real issue is -why on earth- are we building pseudo at all for the target. It serves no purpose that I am aware of.

I'd prefer if the fix was simply to disable pseudo for target-class builds, and only build it for -native and -nativesdk cases.

Just drop this patch for now -- we can focus on fixing it a different way if target builds of pseudo are needed for some reason.

--Mark

Quoted 99 lines

http://autobuilder.yoctoproject.org:8010/builders/build-appliance/builds/154/steps/shell_46/logs/stdio

Sau!

Quoted 95 lines
meta/recipes-devtools/pseudo/pseudo.inc +22 -17
   }
 
-# Two below are the same
+NO32LIBS ??= "1"
+
   # If necessary compile for the alternative machine arch.  This is only
   # necessary in a native build.
-do_compile_prepend_class-native () {
+do_compile_native() {
   	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
   		# We need the 32-bit libpseudo on a 64-bit machine...
                   # ... and we really, really, hope that the native host is
@@ -56,18 +50,20 @@ do_compile_prepend_class-native () {
   		# prevent it from removing the lib, but remove everything else
   		make 'LIB=foo' ${MAKEOPTS} distclean
   	fi
+	if [ "${SITEINFO_BITS}" = "64" ]; then
+	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS} --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+	else
+	  ${S}/configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite --without-rpath
+	fi
+	oe_runmake ${MAKEOPTS}
   }
 
-do_compile_prepend_class-nativesdk () {
-	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
-		# We need the 32-bit libpseudo on a 64-bit machine...
-                # ... and we really, really, hope that the native host is
-                # x86, or else --bits may not work.
-		./configure --prefix=${prefix} --libdir=${prefix}/lib/pseudo/lib --with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32 --without-rpath
-		oe_runmake ${MAKEOPTS} libpseudo
-		# prevent it from removing the lib, but remove everything else
-		make 'LIB=foo' ${MAKEOPTS} distclean
-	fi
+do_compile_class-native () {
+	do_compile_native
+}
+
+do_compile_class-nativesdk () {
+	do_compile_native
   }
 
   do_install () {
@@ -77,18 +73,20 @@ do_install () {
   # Two below are the same
   # If necessary install for the alternative machine arch.  This is only
   # necessary in a native build.
-do_install_append_class-native () {
+do_install_native () {
   	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
   		mkdir -p ${D}${prefix}/lib/pseudo/lib
   		cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
   	fi
+	oe_runmake 'DESTDIR=${D}' ${MAKEOPTS} 'LIB=lib/pseudo/lib$(MARK64)' install
+}
+
+do_install_class-native () {
+	do_install_native
   }
 
   do_install_append_class-nativesdk () {
-	if [ "${SITEINFO_BITS}" = "64" -a -e "/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
-		mkdir -p ${D}${prefix}/lib/pseudo/lib
-		cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
-	fi
+	do_install_native
   }
 
   BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/pseudo/pseudo_1.4.1.bb +1 -1
index 70fe9c0..8367a34 100644
@@ -1,6 +1,6 @@
   require pseudo.inc
 
-PR = "r13"
+PR = "r14"
 
   SRC_URI = "http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2"
 
meta/recipes-devtools/pseudo/pseudo_git.bb +1 -1
index e394ffb..c8ec5ad 100644
@@ -2,7 +2,7 @@ require pseudo.inc
 
   SRCREV = "398a264490713c912b4ce465251a8a82a7905f45"
   PV = "1.4.1+git${SRCPV}"
-PR = "r28"
+PR = "r29"
 
   DEFAULT_PREFERENCE = "-1"
 
#33 lore raw

Re: [PATCH 21/22] pseudo: Rework target, native and nativesdk pseudo intergration

Quoted 69 lines · Mark Hatle
Quoted 59 lines · Saul Wold
Quoted 58 lines · Mark Hatle

Pseudo was not building and installing properly for systems where baselib
was not 'lib'. This change reworks the three scenerios to work properly.

---
   meta/recipes-devtools/pseudo/pseudo.inc      |   58
++++++++++++-------------
   meta/recipes-devtools/pseudo/pseudo_1.4.1.bb |    2 +-
   meta/recipes-devtools/pseudo/pseudo_git.bb   |    2 +-
   3 files changed, 30 insertions(+), 32 deletions(-)
meta/recipes-devtools/pseudo/pseudo.inc +0 -0
index 98f706c..8dc7d72 100644
@@ -13,34 +13,28 @@ SRC_URI_append_class-nativesdk = "

file://symver.patch"

SRC_URI_append_class-native = " file://symver.patch"

-FILES_${PN} = "${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"

meta/recipes-devtools/pseudo/pseudo.inc +1 -1
-FILES_${PN}-dbg += "${libdir}/pseudo/lib*/.debug"
+FILES_${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/*

${localstatedir}/pseudo ${prefix}/var/pseudo"

meta/recipes-devtools/pseudo/pseudo.inc +4 -18
+FILES_${PN}-dbg += "${prefix}/lib/pseudo/lib*/.debug"
   PROVIDES += "virtual/fakeroot"
 
   MAKEOPTS = ""
 
   inherit siteinfo
 
-do_configure () {
-    :
-}
-
-NO32LIBS ??= "1"
-
-# Compile for the local machine arch...
-do_compile () {
+do_configure_class-target () {
       if [ "${SITEINFO_BITS}" = "64" ]; then
-      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+        mylibdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
       else
-      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+        mylibdir=${prefix}/lib/pseudo/lib
Quoted 8 lines

meta/recipes-devtools/pseudo/pseudo.inc

Quoted 4 lines

fi

meta/recipes-devtools/pseudo/pseudo.inc +1 -2
-    oe_runmake ${MAKEOPTS}
+    ${S}/configure --prefix=${prefix} --libdir=$mylibdir
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath

You seem to have dropped the --with-sqlite and now it does not find sqlite3.h for the target build as can be seen in the build appliance failure.

Quoted 3 lines

It should be sourcing it from the compiler with a #include. It was working on all of my test builds.

Not that I am aware of, the configure script defaults to /usr, is it possible you have a host contamination issue with sqlite3 installed on your machine?

Quoted 3 lines

But either way, there are two bugs here.. the first is pseudo isn't building for the target -- it wasn't before either.

It has been building on the target in the past since we need it for the Build Appliance and it builds in world.

Quoted 3 lines

But the real issue is -why on earth- are we building pseudo at all for the target. It serves no purpose that I am aware of.

Build Appliance needs it.

Quoted 3 lines

I'd prefer if the fix was simply to disable pseudo for target-class builds, and only build it for -native and -nativesdk cases.

Not really an option

Quoted 3 lines

Just drop this patch for now -- we can focus on fixing it a different way if target builds of pseudo are needed for some reason.

consider it dropped.

Sau!

Quoted 133 lines

--Mark

Quoted 128 lines

http://autobuilder.yoctoproject.org:8010/builders/build-appliance/builds/154/steps/shell_46/logs/stdio

Sau!

Quoted 123 lines
   }
meta/recipes-devtools/pseudo/pseudo.inc +2 -1
-# Two below are the same
+NO32LIBS ??= "1"
+
   # If necessary compile for the alternative machine arch.  This is

only

   # necessary in a native build.
meta/recipes-devtools/pseudo/pseudo.inc +1 -1
-do_compile_prepend_class-native () {
+do_compile_native() {
       if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
# We need the 32-bit libpseudo on a 64-bit machine...
# ... and we really, really, hope that the native
host is

meta/recipes-devtools/pseudo/pseudo.inc +0 -0
@@ -56,18 +50,20 @@ do_compile_prepend_class-native () {
           # prevent it from removing the lib, but remove everything

else

           make 'LIB=foo' ${MAKEOPTS} distclean
       fi
meta/recipes-devtools/pseudo/pseudo.inc +6 -10
+    if [ "${SITEINFO_BITS}" = "64" ]; then
+      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+    else
+      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+    fi
+    oe_runmake ${MAKEOPTS}
   }
 
-do_compile_prepend_class-nativesdk () {
-    if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then

meta/recipes-devtools/pseudo/pseudo.inc +0 -2
-        # We need the 32-bit libpseudo on a 64-bit machine...
-                # ... and we really, really, hope that the native

host is

meta/recipes-devtools/pseudo/pseudo.inc +6 -9
-                # x86, or else --bits may not work.
-        ./configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
--without-rpath
-        oe_runmake ${MAKEOPTS} libpseudo
-        # prevent it from removing the lib, but remove everything else
-        make 'LIB=foo' ${MAKEOPTS} distclean
-    fi
+do_compile_class-native () {
+    do_compile_native
+}
+
+do_compile_class-nativesdk () {
+    do_compile_native
   }
 
   do_install () {
@@ -77,18 +73,20 @@ do_install () {
   # Two below are the same
   # If necessary install for the alternative machine arch.  This is

only

   # necessary in a native build.
meta/recipes-devtools/pseudo/pseudo.inc +1 -1
-do_install_append_class-native () {
+do_install_native () {
       if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then

           mkdir -p ${D}${prefix}/lib/pseudo/lib
           cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
       fi

+ oe_runmake 'DESTDIR=${D}' ${MAKEOPTS}
'LIB=lib/pseudo/lib$(MARK64)' install

meta/recipes-devtools/pseudo/pseudo.inc +4 -1
+}
+
+do_install_class-native () {
+    do_install_native
   }
 
   do_install_append_class-nativesdk () {
-    if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then

meta/recipes-devtools/pseudo/pseudo.inc +1 -3
-        mkdir -p ${D}${prefix}/lib/pseudo/lib
-        cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
-    fi
+    do_install_native
   }
 
   BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/pseudo/pseudo_1.4.1.bb +1 -1
index 70fe9c0..8367a34 100644
@@ -1,6 +1,6 @@
   require pseudo.inc
 
-PR = "r13"
+PR = "r14"
 
   SRC_URI =

"http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2"

meta/recipes-devtools/pseudo/pseudo_git.bb +1 -1
index e394ffb..c8ec5ad 100644
@@ -2,7 +2,7 @@ require pseudo.inc
 
   SRCREV = "398a264490713c912b4ce465251a8a82a7905f45"
   PV = "1.4.1+git${SRCPV}"
-PR = "r28"
+PR = "r29"
 
   DEFAULT_PREFERENCE = "-1"
 
author
#34 lore raw

Re: [PATCH 21/22] pseudo: Rework target, native and nativesdk pseudo intergration

Quoted 77 lines · Saul Wold
Quoted 69 lines · Mark Hatle
Quoted 59 lines · Saul Wold
Quoted 58 lines · Mark Hatle

Pseudo was not building and installing properly for systems where baselib
was not 'lib'. This change reworks the three scenerios to work properly.

---
    meta/recipes-devtools/pseudo/pseudo.inc      |   58
++++++++++++-------------
    meta/recipes-devtools/pseudo/pseudo_1.4.1.bb |    2 +-
    meta/recipes-devtools/pseudo/pseudo_git.bb   |    2 +-
    3 files changed, 30 insertions(+), 32 deletions(-)
meta/recipes-devtools/pseudo/pseudo.inc +0 -0
index 98f706c..8dc7d72 100644
@@ -13,34 +13,28 @@ SRC_URI_append_class-nativesdk = "

file://symver.patch"

SRC_URI_append_class-native = " file://symver.patch"

-FILES_${PN} = "${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"

meta/recipes-devtools/pseudo/pseudo.inc +1 -1
-FILES_${PN}-dbg += "${libdir}/pseudo/lib*/.debug"
+FILES_${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/*

${localstatedir}/pseudo ${prefix}/var/pseudo"

meta/recipes-devtools/pseudo/pseudo.inc +4 -18
+FILES_${PN}-dbg += "${prefix}/lib/pseudo/lib*/.debug"
    PROVIDES += "virtual/fakeroot"
 
    MAKEOPTS = ""
 
    inherit siteinfo
 
-do_configure () {
-    :
-}
-
-NO32LIBS ??= "1"
-
-# Compile for the local machine arch...
-do_compile () {
+do_configure_class-target () {
        if [ "${SITEINFO_BITS}" = "64" ]; then
-      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+        mylibdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
        else
-      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+        mylibdir=${prefix}/lib/pseudo/lib
Quoted 8 lines

meta/recipes-devtools/pseudo/pseudo.inc

Quoted 4 lines

fi

meta/recipes-devtools/pseudo/pseudo.inc +1 -2
-    oe_runmake ${MAKEOPTS}
+    ${S}/configure --prefix=${prefix} --libdir=$mylibdir
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath

You seem to have dropped the --with-sqlite and now it does not find sqlite3.h for the target build as can be seen in the build appliance failure.

Quoted 3 lines

It should be sourcing it from the compiler with a #include. It was working on all of my test builds.

Not that I am aware of, the configure script defaults to /usr, is it possible you have a host contamination issue with sqlite3 installed on your machine?

Quoted 5 lines
Quoted 3 lines

But either way, there are two bugs here.. the first is pseudo isn't building for the target -- it wasn't before either.

It has been building on the target in the past since we need it for the Build Appliance and it builds in world.

Enable multilibs, pseudo (target) will no longer build. The integration is hard coded currently to be looking for things in the 'lib' directory, which may not exist. In otherwords, it is broken -- and the autobuilds are missing any build-time tests for multilibs at this point.

Quoted 4 lines
Quoted 3 lines

But the real issue is -why on earth- are we building pseudo at all for the target. It serves no purpose that I am aware of.

Build Appliance needs it.

People keep telling me this, but honestly I can't figure out why it's needed. What actually uses pseudo in the build appliance?

I can easily build a system today, boot it, download OE-Core/Bitbake (or Poky) and build it on that system. It's that the purpose of the build appliance? Why is it needed?

Quoted 145 lines
Quoted 3 lines

I'd prefer if the fix was simply to disable pseudo for target-class builds, and only build it for -native and -nativesdk cases.

Not really an option

Quoted 3 lines

Just drop this patch for now -- we can focus on fixing it a different way if target builds of pseudo are needed for some reason.

consider it dropped.

Sau!

Quoted 133 lines

--Mark

Quoted 128 lines

http://autobuilder.yoctoproject.org:8010/builders/build-appliance/builds/154/steps/shell_46/logs/stdio

Sau!

Quoted 123 lines
    }
meta/recipes-devtools/pseudo/pseudo.inc +2 -1
-# Two below are the same
+NO32LIBS ??= "1"
+
    # If necessary compile for the alternative machine arch.  This is

only

    # necessary in a native build.
meta/recipes-devtools/pseudo/pseudo.inc +1 -1
-do_compile_prepend_class-native () {
+do_compile_native() {
        if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
# We need the 32-bit libpseudo on a 64-bit machine...
# ... and we really, really, hope that the native
host is

meta/recipes-devtools/pseudo/pseudo.inc +0 -0
@@ -56,18 +50,20 @@ do_compile_prepend_class-native () {
            # prevent it from removing the lib, but remove everything

else

            make 'LIB=foo' ${MAKEOPTS} distclean
        fi
meta/recipes-devtools/pseudo/pseudo.inc +6 -10
+    if [ "${SITEINFO_BITS}" = "64" ]; then
+      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+    else
+      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+    fi
+    oe_runmake ${MAKEOPTS}
    }
 
-do_compile_prepend_class-nativesdk () {
-    if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then

meta/recipes-devtools/pseudo/pseudo.inc +0 -2
-        # We need the 32-bit libpseudo on a 64-bit machine...
-                # ... and we really, really, hope that the native

host is

meta/recipes-devtools/pseudo/pseudo.inc +6 -9
-                # x86, or else --bits may not work.
-        ./configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
--without-rpath
-        oe_runmake ${MAKEOPTS} libpseudo
-        # prevent it from removing the lib, but remove everything else
-        make 'LIB=foo' ${MAKEOPTS} distclean
-    fi
+do_compile_class-native () {
+    do_compile_native
+}
+
+do_compile_class-nativesdk () {
+    do_compile_native
    }
 
    do_install () {
@@ -77,18 +73,20 @@ do_install () {
    # Two below are the same
    # If necessary install for the alternative machine arch.  This is

only

    # necessary in a native build.
meta/recipes-devtools/pseudo/pseudo.inc +1 -1
-do_install_append_class-native () {
+do_install_native () {
        if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then

            mkdir -p ${D}${prefix}/lib/pseudo/lib
            cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
        fi

+ oe_runmake 'DESTDIR=${D}' ${MAKEOPTS}
'LIB=lib/pseudo/lib$(MARK64)' install

meta/recipes-devtools/pseudo/pseudo.inc +4 -1
+}
+
+do_install_class-native () {
+    do_install_native
    }
 
    do_install_append_class-nativesdk () {
-    if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then

meta/recipes-devtools/pseudo/pseudo.inc +1 -3
-        mkdir -p ${D}${prefix}/lib/pseudo/lib
-        cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
-    fi
+    do_install_native
    }
 
    BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/pseudo/pseudo_1.4.1.bb +1 -1
index 70fe9c0..8367a34 100644
@@ -1,6 +1,6 @@
    require pseudo.inc
 
-PR = "r13"
+PR = "r14"
 
    SRC_URI =

"http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2"

meta/recipes-devtools/pseudo/pseudo_git.bb +1 -1
index e394ffb..c8ec5ad 100644
@@ -2,7 +2,7 @@ require pseudo.inc
 
    SRCREV = "398a264490713c912b4ce465251a8a82a7905f45"
    PV = "1.4.1+git${SRCPV}"
-PR = "r28"
+PR = "r29"
 
    DEFAULT_PREFERENCE = "-1"
 
#35 lore raw

Re: [PATCH 21/22] pseudo: Rework target, native and nativesdk pseudo intergration

Quoted 89 lines · Mark Hatle
Quoted 77 lines · Saul Wold
Quoted 69 lines · Mark Hatle
Quoted 59 lines · Saul Wold
Quoted 58 lines · Mark Hatle

Pseudo was not building and installing properly for systems where baselib
was not 'lib'. This change reworks the three scenerios to work properly.

---
    meta/recipes-devtools/pseudo/pseudo.inc      |   58
++++++++++++-------------
    meta/recipes-devtools/pseudo/pseudo_1.4.1.bb |    2 +-
    meta/recipes-devtools/pseudo/pseudo_git.bb   |    2 +-
    3 files changed, 30 insertions(+), 32 deletions(-)
meta/recipes-devtools/pseudo/pseudo.inc +0 -0
index 98f706c..8dc7d72 100644
@@ -13,34 +13,28 @@ SRC_URI_append_class-nativesdk = "

file://symver.patch"

SRC_URI_append_class-native = " file://symver.patch"

-FILES_${PN} = "${libdir}/pseudo/lib*/libpseudo.so ${bindir}/* ${localstatedir}/pseudo ${prefix}/var/pseudo"

meta/recipes-devtools/pseudo/pseudo.inc +1 -1
-FILES_${PN}-dbg += "${libdir}/pseudo/lib*/.debug"
+FILES_${PN} = "${prefix}/lib/pseudo/lib*/libpseudo.so ${bindir}/*

${localstatedir}/pseudo ${prefix}/var/pseudo"

meta/recipes-devtools/pseudo/pseudo.inc +4 -18
+FILES_${PN}-dbg += "${prefix}/lib/pseudo/lib*/.debug"
    PROVIDES += "virtual/fakeroot"
 
    MAKEOPTS = ""
 
    inherit siteinfo
 
-do_configure () {
-    :
-}
-
-NO32LIBS ??= "1"
-
-# Compile for the local machine arch...
-do_compile () {
+do_configure_class-target () {
        if [ "${SITEINFO_BITS}" = "64" ]; then
-      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+        mylibdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
        else
-      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+        mylibdir=${prefix}/lib/pseudo/lib
Quoted 8 lines

meta/recipes-devtools/pseudo/pseudo.inc

Quoted 4 lines

fi

meta/recipes-devtools/pseudo/pseudo.inc +1 -2
-    oe_runmake ${MAKEOPTS}
+    ${S}/configure --prefix=${prefix} --libdir=$mylibdir
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --without-rpath

You seem to have dropped the --with-sqlite and now it does not find sqlite3.h for the target build as can be seen in the build appliance failure.

Quoted 3 lines

It should be sourcing it from the compiler with a #include. It was working on all of my test builds.

Not that I am aware of, the configure script defaults to /usr, is it possible you have a host contamination issue with sqlite3 installed on your machine?

Quoted 5 lines
Quoted 3 lines

But either way, there are two bugs here.. the first is pseudo isn't building for the target -- it wasn't before either.

It has been building on the target in the past since we need it for the Build Appliance and it builds in world.

Enable multilibs, pseudo (target) will no longer build. The integration is hard coded currently to be looking for things in the 'lib' directory, which may not exist. In otherwords, it is broken -- and the autobuilds are missing any build-time tests for multilibs at this point.

Quoted 8 lines
Quoted 4 lines
Quoted 3 lines

But the real issue is -why on earth- are we building pseudo at all for the target. It serves no purpose that I am aware of.

Build Appliance needs it.

People keep telling me this, but honestly I can't figure out why it's needed. What actually uses pseudo in the build appliance?

The build appliance uses it to save time at start of HOB, since pseudo is needed to run hob first. If we needed to build it first that can cause issues. We have the sources available in the appliance, but it still does some network start up.

We want the hob to come up quickly, not have to wait for pseudo to be build.

Quoted 4 lines

I can easily build a system today, boot it, download OE-Core/Bitbake (or Poky) and build it on that system. It's that the purpose of the build appliance? Why is it needed?

Yes, it builds pseudo first as normal you have a network in place

Quoted 151 lines
Quoted 148 lines
Quoted 3 lines

I'd prefer if the fix was simply to disable pseudo for target-class builds, and only build it for -native and -nativesdk cases.

Not really an option

Quoted 3 lines

Just drop this patch for now -- we can focus on fixing it a different way if target builds of pseudo are needed for some reason.

consider it dropped.

Sau!

Quoted 136 lines

--Mark

Quoted 131 lines

http://autobuilder.yoctoproject.org:8010/builders/build-appliance/builds/154/steps/shell_46/logs/stdio

Sau!

Quoted 125 lines
    }
meta/recipes-devtools/pseudo/pseudo.inc +2 -1
-# Two below are the same
+NO32LIBS ??= "1"
+
    # If necessary compile for the alternative machine arch.  This is

only

    # necessary in a native build.
meta/recipes-devtools/pseudo/pseudo.inc +1 -1
-do_compile_prepend_class-native () {
+do_compile_native() {
        if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then
# We need the 32-bit libpseudo on a 64-bit machine...
# ... and we really, really, hope that the native
host is

meta/recipes-devtools/pseudo/pseudo.inc +0 -0
@@ -56,18 +50,20 @@ do_compile_prepend_class-native () {
            # prevent it from removing the lib, but remove everything

else

            make 'LIB=foo' ${MAKEOPTS} distclean
        fi
meta/recipes-devtools/pseudo/pseudo.inc +6 -10
+    if [ "${SITEINFO_BITS}" = "64" ]; then
+      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib${SITEINFO_BITS}
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+    else
+      ${S}/configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix}
--cflags="${CFLAGS}" --bits=${SITEINFO_BITS} --enable-static-sqlite
--without-rpath
+    fi
+    oe_runmake ${MAKEOPTS}
    }
 
-do_compile_prepend_class-nativesdk () {
-    if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then

meta/recipes-devtools/pseudo/pseudo.inc +0 -2
-        # We need the 32-bit libpseudo on a 64-bit machine...
-                # ... and we really, really, hope that the native

host is

meta/recipes-devtools/pseudo/pseudo.inc +0 -7
-                # x86, or else --bits may not work.
-        ./configure --prefix=${prefix}
--libdir=${prefix}/lib/pseudo/lib
--with-sqlite=${STAGING_DIR_TARGET}${exec_prefix} --bits=32
--without-rpath
-        oe_runmake ${MAKEOPTS} libpseudo
-        # prevent it from removing the lib, but remove everything

else

meta/recipes-devtools/pseudo/pseudo.inc +6 -2
-        make 'LIB=foo' ${MAKEOPTS} distclean
-    fi
+do_compile_class-native () {
+    do_compile_native
+}
+
+do_compile_class-nativesdk () {
+    do_compile_native
    }
 
    do_install () {
@@ -77,18 +73,20 @@ do_install () {
    # Two below are the same
    # If necessary install for the alternative machine arch.  This is

only

    # necessary in a native build.
meta/recipes-devtools/pseudo/pseudo.inc +1 -1
-do_install_append_class-native () {
+do_install_native () {
        if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then

            mkdir -p ${D}${prefix}/lib/pseudo/lib
            cp lib/pseudo/lib/libpseudo.so

${D}${prefix}/lib/pseudo/lib/.
fi
+ oe_runmake 'DESTDIR=${D}' ${MAKEOPTS}
'LIB=lib/pseudo/lib$(MARK64)' install

meta/recipes-devtools/pseudo/pseudo.inc +4 -1
+}
+
+do_install_class-native () {
+    do_install_native
    }
 
    do_install_append_class-nativesdk () {
-    if [ "${SITEINFO_BITS}" = "64" -a -e

"/usr/include/gnu/stubs-32.h" -a "${PN}" = "pseudo-native" -a "${NO32LIBS}" != "1" ]; then

meta/recipes-devtools/pseudo/pseudo.inc +1 -3
-        mkdir -p ${D}${prefix}/lib/pseudo/lib
-        cp lib/pseudo/lib/libpseudo.so ${D}${prefix}/lib/pseudo/lib/.
-    fi
+    do_install_native
    }
 
    BBCLASSEXTEND = "native nativesdk"
meta/recipes-devtools/pseudo/pseudo_1.4.1.bb +1 -1
index 70fe9c0..8367a34 100644
@@ -1,6 +1,6 @@
    require pseudo.inc
 
-PR = "r13"
+PR = "r14"
 
    SRC_URI =

"http://www.yoctoproject.org/downloads/${BPN}/${BPN}-${PV}.tar.bz2"

meta/recipes-devtools/pseudo/pseudo_git.bb +1 -1
index e394ffb..c8ec5ad 100644
@@ -2,7 +2,7 @@ require pseudo.inc
 
    SRCREV = "398a264490713c912b4ce465251a8a82a7905f45"
    PV = "1.4.1+git${SRCPV}"
-PR = "r28"
+PR = "r29"
 
    DEFAULT_PREFERENCE = "-1"
 
author
#36 lore raw

PATCH 22/22 license.bbclass: Avoid grep error message

In reply to Mark Hatle

Touch a file that is later greped to make sure it exists.

---
 meta/classes/license.bbclass |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)
meta/classes/license.bbclass +2 -1
index c7ca4a6..66cde1c 100644
@@ -13,7 +13,7 @@ do_populate_lic[cleandirs] = "${LICSSTATEDIR}"
 license_create_manifest() {
 	mkdir -p ${LICENSE_DIRECTORY}/${IMAGE_NAME}
 	# Get list of installed packages
-	list_installed_packages | grep -v "locale" |sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest
+	list_installed_packages | grep -v "locale" | sort > ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest
 	INSTALLED_PKGS=`cat ${LICENSE_DIRECTORY}/${IMAGE_NAME}/package.manifest`
 	LICENSE_MANIFEST="${LICENSE_DIRECTORY}/${IMAGE_NAME}/license.manifest"
 	# remove existing license.manifest file
@@ -21,6 +21,7 @@ license_create_manifest() {
 		rm ${LICENSE_MANIFEST}
 	fi
 	# list of installed packages is broken for deb
+	touch ${LICENSE_MANIFEST}
 	for pkg in ${INSTALLED_PKGS}; do
 		# not the best way to do this but licenses are not arch dependant iirc
 		filename=`ls ${TMPDIR}/pkgdata/*/runtime-reverse/${pkg}| head -1`
Signature · 1 line
1.7.3.4