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

login
register
mail settings
Submitter Mark Hatle
Date Dec. 4, 2012, 5:14 p.m.
Message ID <0d97e14c48d2368ad4801994416eba990654254d.1354641032.git.mark.hatle@windriver.com>
Download mbox | patch
Permalink /patch/40323/
State Accepted
Commit f9ddae16ef31b2c1cd988e1b416a39d516c986c4
Headers show

Comments

Mark Hatle - Dec. 4, 2012, 5:14 p.m.
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.

Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
---
 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(-)
Paul Eggleton - Dec. 6, 2012, 1:16 p.m.
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.
> 
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
> ---
>  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(-)
> 
> diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig.inc
> b/meta/recipes-devtools/pkgconfig/pkgconfig.inc index 83a9cdf..27d4071
> 100644
> --- a/meta/recipes-devtools/pkgconfig/pkgconfig.inc
> +++ b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
> @@ -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})"
> diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
> b/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb index 1e60c54..d0a2b1f
> 100644
> --- a/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
> +++ b/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
> @@ -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
> --- a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
> +++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
> @@ -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
Otavio Salvador - Dec. 6, 2012, 1:30 p.m.
On Tue, Dec 4, 2012 at 3:14 PM, Mark Hatle <mark.hatle@windriver.com> 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.
>
> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
>

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).
Mark Hatle - Dec. 6, 2012, 5:12 p.m.
On 12/6/12 7:30 AM, Otavio Salvador wrote:
>
>
>
> On Tue, Dec 4, 2012 at 3:14 PM, Mark Hatle <mark.hatle@windriver.com
> <mailto:mark.hatle@windriver.com>> 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.
>
>     Signed-off-by: Mark Hatle <mark.hatle@windriver.com
>     <mailto:mark.hatle@windriver.com>>
>
>
> 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

> --
> Otavio Salvador                             O.S. Systems
> E-mail: otavio@ossystems.com.br <mailto:otavio@ossystems.com.br>
> http://www.ossystems.com.br
> Mobile: +55 53 9981-7854 http://projetos.ossystems.com.br
>
Mark Hatle - Dec. 6, 2012, 5:13 p.m.
On 12/6/12 7:16 AM, Paul Eggleton wrote:
> 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.
>>
>> Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
>> ---
>>   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(-)
>>
>> diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig.inc
>> b/meta/recipes-devtools/pkgconfig/pkgconfig.inc index 83a9cdf..27d4071
>> 100644
>> --- a/meta/recipes-devtools/pkgconfig/pkgconfig.inc
>> +++ b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
>> @@ -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})"
>> diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
>> b/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb index 1e60c54..d0a2b1f
>> 100644
>> --- a/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
>> +++ b/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
>> @@ -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
>> --- a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
>> +++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
>> @@ -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.

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

> Cheers,
> Paul
>

Patch

diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig.inc b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
index 83a9cdf..27d4071 100644
--- a/meta/recipes-devtools/pkgconfig/pkgconfig.inc
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig.inc
@@ -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})"
diff --git a/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb b/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
index 1e60c54..d0a2b1f 100644
--- a/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig_0.25.bb
@@ -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
--- a/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
+++ b/meta/recipes-devtools/pkgconfig/pkgconfig_git.bb
@@ -8,6 +8,7 @@  S = "${WORKDIR}/git/"
 
 SRCREV = "66d49f1375fec838bcd301bb4ca2ef76cee0e47c"
 PV = "0.23+git${SRCPV}"
+PR = "r1"
 
 DEFAULT_PREFERENCE = "-1"