All of lore.kernel.org
 help / color / mirror / Atom feed
* [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist
@ 2020-03-20 18:04 Peter Kjellerstedt
  2020-04-03 16:24 ` [OE-core] " Peter Kjellerstedt
       [not found] ` <16025BE698C394B5.19764@lists.openembedded.org>
  0 siblings, 2 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2020-03-20 18:04 UTC (permalink / raw)
  To: openembedded-core

Rewrite relocatable_native_pcfiles() so that it can handle that any of
the checked pkgconfig directories are empty without causing an
exception.

Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
---
 meta/classes/relocatable.bbclass | 20 +++++++++++---------
 1 file changed, 11 insertions(+), 9 deletions(-)

diff --git a/meta/classes/relocatable.bbclass b/meta/classes/relocatable.bbclass
index 582812c1cf..af04be5cca 100644
--- a/meta/classes/relocatable.bbclass
+++ b/meta/classes/relocatable.bbclass
@@ -6,13 +6,15 @@ python relocatable_binaries_preprocess() {
     rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
 }
 
-relocatable_native_pcfiles () {
-	if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
-		rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('libdir') + "/pkgconfig")}
-		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
-	fi
-	if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then
-		rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('datadir') + "/pkgconfig")}
-		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc
-	fi
+relocatable_native_pcfiles() {
+	for dir in ${libdir}/pkgconfig ${datadir}/pkgconfig; do
+		files_template=${SYSROOT_DESTDIR}$dir/*.pc
+		# Expand to any files matching $files_template
+		files=$(echo $files_template)
+		# $files_template and $files will differ if any files were found
+		if [ "$files_template" != "$files" ]; then
+			rel=$(realpath -m --relative-to=$dir ${base_prefix})
+			sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" $files
+		fi
+	done
 }
-- 
2.21.1



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

* Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist
  2020-03-20 18:04 [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist Peter Kjellerstedt
@ 2020-04-03 16:24 ` Peter Kjellerstedt
       [not found] ` <16025BE698C394B5.19764@lists.openembedded.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2020-04-03 16:24 UTC (permalink / raw)
  To: openembedded-core

*ping*

//Peter

> -----Original Message-----
> From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-
> bounces@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> Sent: den 20 mars 2020 19:04
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an
> exception if an empty pkgconfig dir exist
> 
> Rewrite relocatable_native_pcfiles() so that it can handle that any of
> the checked pkgconfig directories are empty without causing an
> exception.
> 
> Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> ---
>  meta/classes/relocatable.bbclass | 20 +++++++++++---------
>  1 file changed, 11 insertions(+), 9 deletions(-)
> 
> diff --git a/meta/classes/relocatable.bbclass b/meta/classes/relocatable.bbclass
> index 582812c1cf..af04be5cca 100644
> --- a/meta/classes/relocatable.bbclass
> +++ b/meta/classes/relocatable.bbclass
> @@ -6,13 +6,15 @@ python relocatable_binaries_preprocess() {
>      rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
>  }
> 
> -relocatable_native_pcfiles () {
> -	if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
> -		rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('libdir') + "/pkgconfig")}
> -		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
> -	fi
> -	if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then
> -		rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('datadir') + "/pkgconfig")}
> -		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc
> -	fi
> +relocatable_native_pcfiles() {
> +	for dir in ${libdir}/pkgconfig ${datadir}/pkgconfig; do
> +		files_template=${SYSROOT_DESTDIR}$dir/*.pc
> +		# Expand to any files matching $files_template
> +		files=$(echo $files_template)
> +		# $files_template and $files will differ if any files were found
> +		if [ "$files_template" != "$files" ]; then
> +			rel=$(realpath -m --relative-to=$dir ${base_prefix})
> +			sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" $files
> +		fi
> +	done
>  }
> --
> 2.21.1

//Peter


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

* Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist
       [not found] ` <16025BE698C394B5.19764@lists.openembedded.org>
@ 2020-04-25  9:16   ` Peter Kjellerstedt
       [not found]   ` <16090558444D87E6.18576@lists.openembedded.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2020-04-25  9:16 UTC (permalink / raw)
  To: openembedded-core

*ping again*

//Peter

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> Sent: den 3 april 2020 18:24
> To: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid
> an exception if an empty pkgconfig dir exist
> 
> *ping*
> 
> //Peter
> 
> > -----Original Message-----
> > From: openembedded-core-bounces@lists.openembedded.org <openembedded-
> core-
> > bounces@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > Sent: den 20 mars 2020 19:04
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an
> > exception if an empty pkgconfig dir exist
> >
> > Rewrite relocatable_native_pcfiles() so that it can handle that any of
> > the checked pkgconfig directories are empty without causing an
> > exception.
> >
> > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > ---
> >  meta/classes/relocatable.bbclass | 20 +++++++++++---------
> >  1 file changed, 11 insertions(+), 9 deletions(-)
> >
> > diff --git a/meta/classes/relocatable.bbclass
> b/meta/classes/relocatable.bbclass
> > index 582812c1cf..af04be5cca 100644
> > --- a/meta/classes/relocatable.bbclass
> > +++ b/meta/classes/relocatable.bbclass
> > @@ -6,13 +6,15 @@ python relocatable_binaries_preprocess() {
> >      rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
> >  }
> >
> > -relocatable_native_pcfiles () {
> > -	if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
> > -		rel=${@os.path.relpath(d.getVar('base_prefix'),
> d.getVar('libdir') + "/pkgconfig")}
> > -		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g"
> ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
> > -	fi
> > -	if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then
> > -		rel=${@os.path.relpath(d.getVar('base_prefix'),
> d.getVar('datadir') + "/pkgconfig")}
> > -		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g"
> ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc
> > -	fi
> > +relocatable_native_pcfiles() {
> > +	for dir in ${libdir}/pkgconfig ${datadir}/pkgconfig; do
> > +		files_template=${SYSROOT_DESTDIR}$dir/*.pc
> > +		# Expand to any files matching $files_template
> > +		files=$(echo $files_template)
> > +		# $files_template and $files will differ if any
> files were found
> > +		if [ "$files_template" != "$files" ]; then
> > +			rel=$(realpath -m --relative-to=$dir
> ${base_prefix})
> > +			sed -i -e
> "s:${base_prefix}:\${pcfiledir}/$rel:g" $files
> > +		fi
> > +	done
> >  }
> > --
> > 2.21.1
> 
> //Peter


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

* Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist
       [not found]   ` <16090558444D87E6.18576@lists.openembedded.org>
@ 2020-05-28  1:25     ` Peter Kjellerstedt
       [not found]     ` <16130CCABBD4F064.18282@lists.openembedded.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2020-05-28  1:25 UTC (permalink / raw)
  To: openembedded-core

*ping* *ping* *ping*

I am not sure why this is being ignored. It is two months since I 
first sent it and the third time I ping it. I have not received any 
objections, yet it has never made it even to master-next as far as 
I know. 

This should not be taken as a complaint. I know there has been 
problems with the autobuilder and that patch integration has been 
slowed, and during this time all other patches I have sent have 
been applied on the first try. So it just seems to be this one that 
has been left out, and I would like to know if there is a reason or 
if it just has fallen between the cracks.

//Peter

PS. The patch of course applies to Dunfell now too in addition to 
master and Zeus since it has been released in the meantime.

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> Sent: den 25 april 2020 11:17
> To: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist
> 
> *ping again*
> 
> //Peter
> 
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > Sent: den 3 april 2020 18:24
> > To: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist
> >
> > *ping*
> >
> > //Peter
> >
> > > -----Original Message-----
> > > From: openembedded-core-bounces@lists.openembedded.org <openembedded-core-bounces@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > > Sent: den 20 mars 2020 19:04
> > > To: openembedded-core@lists.openembedded.org
> > > Subject: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist
> > >
> > > Rewrite relocatable_native_pcfiles() so that it can handle that any of
> > > the checked pkgconfig directories are empty without causing an
> > > exception.
> > >
> > > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > > ---
> > >  meta/classes/relocatable.bbclass | 20 +++++++++++---------
> > >  1 file changed, 11 insertions(+), 9 deletions(-)
> > >
> > > diff --git a/meta/classes/relocatable.bbclass b/meta/classes/relocatable.bbclass
> > > index 582812c1cf..af04be5cca 100644
> > > --- a/meta/classes/relocatable.bbclass
> > > +++ b/meta/classes/relocatable.bbclass
> > > @@ -6,13 +6,15 @@ python relocatable_binaries_preprocess() {
> > >      rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
> > >  }
> > >
> > > -relocatable_native_pcfiles () {
> > > -	if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
> > > -		rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('libdir') + "/pkgconfig")}
> > > -		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
> > > -	fi
> > > -	if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then
> > > -		rel=${@os.path.relpath(d.getVar('base_prefix'), d.getVar('datadir') + "/pkgconfig")}
> > > -		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc
> > > -	fi
> > > +relocatable_native_pcfiles() {
> > > +	for dir in ${libdir}/pkgconfig ${datadir}/pkgconfig; do
> > > +		files_template=${SYSROOT_DESTDIR}$dir/*.pc
> > > +		# Expand to any files matching $files_template
> > > +		files=$(echo $files_template)
> > > +		# $files_template and $files will differ if any files were found
> > > +		if [ "$files_template" != "$files" ]; then
> > > +			rel=$(realpath -m --relative-to=$dir ${base_prefix})
> > > +			sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" $files
> > > +		fi
> > > +	done
> > >  }
> > > --
> > > 2.21.1
> >
> > //Peter


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

* Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist
       [not found]     ` <16130CCABBD4F064.18282@lists.openembedded.org>
@ 2020-06-12 16:25       ` Peter Kjellerstedt
       [not found]       ` <1617D89C6070B90C.14082@lists.openembedded.org>
  1 sibling, 0 replies; 8+ messages in thread
From: Peter Kjellerstedt @ 2020-06-12 16:25 UTC (permalink / raw)
  To: openembedded-core

*ping* *ping* *ping* *ping*

Ok, it was only two weeks since I pinged this the last time, but 
since I'm going on vacation in a week I thought I'd give it a shot 
before then. I am still waiting for any kind of reaction to this 
patch...

//Peter

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> Sent: den 28 maj 2020 03:26
> To: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid
> an exception if an empty pkgconfig dir exist
> 
> *ping* *ping* *ping*
> 
> I am not sure why this is being ignored. It is two months since I
> first sent it and the third time I ping it. I have not received any
> objections, yet it has never made it even to master-next as far as
> I know.
> 
> This should not be taken as a complaint. I know there has been
> problems with the autobuilder and that patch integration has been
> slowed, and during this time all other patches I have sent have
> been applied on the first try. So it just seems to be this one that
> has been left out, and I would like to know if there is a reason or
> if it just has fallen between the cracks.
> 
> //Peter
> 
> PS. The patch of course applies to Dunfell now too in addition to
> master and Zeus since it has been released in the meantime.
> 
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > Sent: den 25 april 2020 11:17
> > To: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid
> an exception if an empty pkgconfig dir exist
> >
> > *ping again*
> >
> > //Peter
> >
> > > -----Original Message-----
> > > From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > > Sent: den 3 april 2020 18:24
> > > To: openembedded-core@lists.openembedded.org
> > > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass:
> Avoid an exception if an empty pkgconfig dir exist
> > >
> > > *ping*
> > >
> > > //Peter
> > >
> > > > -----Original Message-----
> > > > From: openembedded-core-bounces@lists.openembedded.org
> <openembedded-core-bounces@lists.openembedded.org> On Behalf Of Peter
> Kjellerstedt
> > > > Sent: den 20 mars 2020 19:04
> > > > To: openembedded-core@lists.openembedded.org
> > > > Subject: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid
> an exception if an empty pkgconfig dir exist
> > > >
> > > > Rewrite relocatable_native_pcfiles() so that it can handle that any
> of
> > > > the checked pkgconfig directories are empty without causing an
> > > > exception.
> > > >
> > > > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > > > ---
> > > >  meta/classes/relocatable.bbclass | 20 +++++++++++---------
> > > >  1 file changed, 11 insertions(+), 9 deletions(-)
> > > >
> > > > diff --git a/meta/classes/relocatable.bbclass
> b/meta/classes/relocatable.bbclass
> > > > index 582812c1cf..af04be5cca 100644
> > > > --- a/meta/classes/relocatable.bbclass
> > > > +++ b/meta/classes/relocatable.bbclass
> > > > @@ -6,13 +6,15 @@ python relocatable_binaries_preprocess() {
> > > >      rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
> > > >  }
> > > >
> > > > -relocatable_native_pcfiles () {
> > > > -	if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
> > > > -		rel=${@os.path.relpath(d.getVar('base_prefix'),
> d.getVar('libdir') + "/pkgconfig")}
> > > > -		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g"
> ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
> > > > -	fi
> > > > -	if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then
> > > > -		rel=${@os.path.relpath(d.getVar('base_prefix'),
> d.getVar('datadir') + "/pkgconfig")}
> > > > -		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g"
> ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc
> > > > -	fi
> > > > +relocatable_native_pcfiles() {
> > > > +	for dir in ${libdir}/pkgconfig ${datadir}/pkgconfig; do
> > > > +		files_template=${SYSROOT_DESTDIR}$dir/*.pc
> > > > +		# Expand to any files matching $files_template
> > > > +		files=$(echo $files_template)
> > > > +		# $files_template and $files will differ if any
> files were found
> > > > +		if [ "$files_template" != "$files" ]; then
> > > > +			rel=$(realpath -m --relative-to=$dir
> ${base_prefix})
> > > > +			sed -i -e
> "s:${base_prefix}:\${pcfiledir}/$rel:g" $files
> > > > +		fi
> > > > +	done
> > > >  }
> > > > --
> > > > 2.21.1
> > >
> > > //Peter


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

* Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist
       [not found]       ` <1617D89C6070B90C.14082@lists.openembedded.org>
@ 2020-06-17  1:50         ` Peter Kjellerstedt
  2020-09-01 16:33           ` Andreas Müller
  0 siblings, 1 reply; 8+ messages in thread
From: Peter Kjellerstedt @ 2020-06-17  1:50 UTC (permalink / raw)
  To: Steve Sakoman, akuster; +Cc: openembedded-core

This has been integrated to master now (commit f9c5df6d). 
Please cherry-pick it to Dunfell and Zeus.

//Peter

> -----Original Message-----
> From: openembedded-core@lists.openembedded.org <openembedded-
> core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> Sent: den 12 juni 2020 18:26
> To: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid
> an exception if an empty pkgconfig dir exist
> 
> *ping* *ping* *ping* *ping*
> 
> Ok, it was only two weeks since I pinged this the last time, but
> since I'm going on vacation in a week I thought I'd give it a shot
> before then. I am still waiting for any kind of reaction to this
> patch...
> 
> //Peter
> 
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-
> > core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > Sent: den 28 maj 2020 03:26
> > To: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid
> > an exception if an empty pkgconfig dir exist
> >
> > *ping* *ping* *ping*
> >
> > I am not sure why this is being ignored. It is two months since I
> > first sent it and the third time I ping it. I have not received any
> > objections, yet it has never made it even to master-next as far as
> > I know.
> >
> > This should not be taken as a complaint. I know there has been
> > problems with the autobuilder and that patch integration has been
> > slowed, and during this time all other patches I have sent have
> > been applied on the first try. So it just seems to be this one that
> > has been left out, and I would like to know if there is a reason or
> > if it just has fallen between the cracks.
> >
> > //Peter
> >
> > PS. The patch of course applies to Dunfell now too in addition to
> > master and Zeus since it has been released in the meantime.
> >
> > > -----Original Message-----
> > > From: openembedded-core@lists.openembedded.org <openembedded-
> > core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > > Sent: den 25 april 2020 11:17
> > > To: openembedded-core@lists.openembedded.org
> > > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass:
> Avoid
> > an exception if an empty pkgconfig dir exist
> > >
> > > *ping again*
> > >
> > > //Peter
> > >
> > > > -----Original Message-----
> > > > From: openembedded-core@lists.openembedded.org <openembedded-
> > core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > > > Sent: den 3 april 2020 18:24
> > > > To: openembedded-core@lists.openembedded.org
> > > > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass:
> > Avoid an exception if an empty pkgconfig dir exist
> > > >
> > > > *ping*
> > > >
> > > > //Peter
> > > >
> > > > > -----Original Message-----
> > > > > From: openembedded-core-bounces@lists.openembedded.org
> > <openembedded-core-bounces@lists.openembedded.org> On Behalf Of Peter
> > Kjellerstedt
> > > > > Sent: den 20 mars 2020 19:04
> > > > > To: openembedded-core@lists.openembedded.org
> > > > > Subject: [OE-core] [master][zeus][PATCH] relocatable.bbclass:
> Avoid
> > an exception if an empty pkgconfig dir exist
> > > > >
> > > > > Rewrite relocatable_native_pcfiles() so that it can handle that
> any
> > of
> > > > > the checked pkgconfig directories are empty without causing an
> > > > > exception.
> > > > >
> > > > > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > > > > ---
> > > > >  meta/classes/relocatable.bbclass | 20 +++++++++++---------
> > > > >  1 file changed, 11 insertions(+), 9 deletions(-)
> > > > >
> > > > > diff --git a/meta/classes/relocatable.bbclass
> > b/meta/classes/relocatable.bbclass
> > > > > index 582812c1cf..af04be5cca 100644
> > > > > --- a/meta/classes/relocatable.bbclass
> > > > > +++ b/meta/classes/relocatable.bbclass
> > > > > @@ -6,13 +6,15 @@ python relocatable_binaries_preprocess() {
> > > > >      rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
> > > > >  }
> > > > >
> > > > > -relocatable_native_pcfiles () {
> > > > > -	if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
> > > > > -		rel=${@os.path.relpath(d.getVar('base_prefix'),
> > d.getVar('libdir') + "/pkgconfig")}
> > > > > -		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g"
> > ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
> > > > > -	fi
> > > > > -	if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then
> > > > > -		rel=${@os.path.relpath(d.getVar('base_prefix'),
> > d.getVar('datadir') + "/pkgconfig")}
> > > > > -		sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g"
> > ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc
> > > > > -	fi
> > > > > +relocatable_native_pcfiles() {
> > > > > +	for dir in ${libdir}/pkgconfig ${datadir}/pkgconfig; do
> > > > > +		files_template=${SYSROOT_DESTDIR}$dir/*.pc
> > > > > +		# Expand to any files matching $files_template
> > > > > +		files=$(echo $files_template)
> > > > > +		# $files_template and $files will differ if any
> > files were found
> > > > > +		if [ "$files_template" != "$files" ]; then
> > > > > +			rel=$(realpath -m --relative-to=$dir
> > ${base_prefix})
> > > > > +			sed -i -e
> > "s:${base_prefix}:\${pcfiledir}/$rel:g" $files
> > > > > +		fi
> > > > > +	done
> > > > >  }
> > > > > --
> > > > > 2.21.1
> > > >
> > > > //Peter


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

* Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist
  2020-06-17  1:50         ` Peter Kjellerstedt
@ 2020-09-01 16:33           ` Andreas Müller
  2020-09-01 16:41             ` Andreas Müller
  0 siblings, 1 reply; 8+ messages in thread
From: Andreas Müller @ 2020-09-01 16:33 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Steve Sakoman, akuster, openembedded-core

On Wed, Jun 17, 2020 at 3:50 AM Peter Kjellerstedt
<peter.kjellerstedt@axis.com> wrote:
>
> This has been integrated to master now (commit f9c5df6d).
> Please cherry-pick it to Dunfell and Zeus.
>
> //Peter
>
> > -----Original Message-----
> > From: openembedded-core@lists.openembedded.org <openembedded-
> > core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > Sent: den 12 juni 2020 18:26
> > To: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid
> > an exception if an empty pkgconfig dir exist
> >
> > *ping* *ping* *ping* *ping*
> >
> > Ok, it was only two weeks since I pinged this the last time, but
> > since I'm going on vacation in a week I thought I'd give it a shot
> > before then. I am still waiting for any kind of reaction to this
> > patch...
> >
> > //Peter
> >
> > > -----Original Message-----
> > > From: openembedded-core@lists.openembedded.org <openembedded-
> > > core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > > Sent: den 28 maj 2020 03:26
> > > To: openembedded-core@lists.openembedded.org
> > > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid
> > > an exception if an empty pkgconfig dir exist
> > >
> > > *ping* *ping* *ping*
> > >
> > > I am not sure why this is being ignored. It is two months since I
> > > first sent it and the third time I ping it. I have not received any
> > > objections, yet it has never made it even to master-next as far as
> > > I know.
> > >
> > > This should not be taken as a complaint. I know there has been
> > > problems with the autobuilder and that patch integration has been
> > > slowed, and during this time all other patches I have sent have
> > > been applied on the first try. So it just seems to be this one that
> > > has been left out, and I would like to know if there is a reason or
> > > if it just has fallen between the cracks.
> > >
> > > //Peter
> > >
> > > PS. The patch of course applies to Dunfell now too in addition to
> > > master and Zeus since it has been released in the meantime.
> > >
> > > > -----Original Message-----
> > > > From: openembedded-core@lists.openembedded.org <openembedded-
> > > core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > > > Sent: den 25 april 2020 11:17
> > > > To: openembedded-core@lists.openembedded.org
> > > > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass:
> > Avoid
> > > an exception if an empty pkgconfig dir exist
> > > >
> > > > *ping again*
> > > >
> > > > //Peter
> > > >
> > > > > -----Original Message-----
> > > > > From: openembedded-core@lists.openembedded.org <openembedded-
> > > core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > > > > Sent: den 3 april 2020 18:24
> > > > > To: openembedded-core@lists.openembedded.org
> > > > > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass:
> > > Avoid an exception if an empty pkgconfig dir exist
> > > > >
> > > > > *ping*
> > > > >
> > > > > //Peter
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: openembedded-core-bounces@lists.openembedded.org
> > > <openembedded-core-bounces@lists.openembedded.org> On Behalf Of Peter
> > > Kjellerstedt
> > > > > > Sent: den 20 mars 2020 19:04
> > > > > > To: openembedded-core@lists.openembedded.org
> > > > > > Subject: [OE-core] [master][zeus][PATCH] relocatable.bbclass:
> > Avoid
> > > an exception if an empty pkgconfig dir exist
> > > > > >
> > > > > > Rewrite relocatable_native_pcfiles() so that it can handle that
> > any
> > > of
> > > > > > the checked pkgconfig directories are empty without causing an
> > > > > > exception.
> > > > > >
> > > > > > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > > > > > ---
> > > > > >  meta/classes/relocatable.bbclass | 20 +++++++++++---------
> > > > > >  1 file changed, 11 insertions(+), 9 deletions(-)
> > > > > >
> > > > > > diff --git a/meta/classes/relocatable.bbclass
> > > b/meta/classes/relocatable.bbclass
> > > > > > index 582812c1cf..af04be5cca 100644
> > > > > > --- a/meta/classes/relocatable.bbclass
> > > > > > +++ b/meta/classes/relocatable.bbclass
> > > > > > @@ -6,13 +6,15 @@ python relocatable_binaries_preprocess() {
> > > > > >      rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
> > > > > >  }
> > > > > >
> > > > > > -relocatable_native_pcfiles () {
> > > > > > -     if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
> > > > > > -             rel=${@os.path.relpath(d.getVar('base_prefix'),
> > > d.getVar('libdir') + "/pkgconfig")}
> > > > > > -             sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g"
> > > ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
> > > > > > -     fi
> > > > > > -     if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then
> > > > > > -             rel=${@os.path.relpath(d.getVar('base_prefix'),
> > > d.getVar('datadir') + "/pkgconfig")}
> > > > > > -             sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g"
> > > ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc
> > > > > > -     fi
> > > > > > +relocatable_native_pcfiles() {
> > > > > > +     for dir in ${libdir}/pkgconfig ${datadir}/pkgconfig; do
> > > > > > +             files_template=${SYSROOT_DESTDIR}$dir/*.pc
> > > > > > +             # Expand to any files matching $files_template
> > > > > > +             files=$(echo $files_template)
> > > > > > +             # $files_template and $files will differ if any
> > > files were found
> > > > > > +             if [ "$files_template" != "$files" ]; then
> > > > > > +                     rel=$(realpath -m --relative-to=$dir
> > > ${base_prefix})
> > > > > > +                     sed -i -e
> > > "s:${base_prefix}:\${pcfiledir}/$rel:g" $files
> > > > > > +             fi
> > > > > > +     done
> > > > > >  }
> > > > > > --
> > > > > > 2.21.1
> > > > >
> > > > > //Peter
Bisected it: Since this one is in dunfell I am unable to build on
autobuilder. I see

|  virtual:native:/home/jenkins/workspace/Weekly-4-MT310s2-COM5003/sources/openembedded-core/meta/recipes-extended/libnsl/libnsl2_git.bb:do_compile
|  virtual:native:/home/jenkins/workspace/Weekly-4-MT310s2-COM5003/sources/openembedded-core/meta/recipes-graphics/fontconfig/fontconfig_2.13.1.bb:do_compile
|  virtual:native:/home/jenkins/workspace/Weekly-4-MT310s2-COM5003/sources/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.17.bb:do_compile

Makefile says (don't have *.pc at the moment):

LIBUSB_CFLAGS =
-I/home/jenkins/workspace/Weekly-4-MT310s2-COM5003/build/tmp-glibc/work/x86_64-linux/libmtp-native/1.1.17-r0/recipe-sysroot-native/usr/lib/pkgconfig//usr/include/libusb-1.0
LIBUSB_LIBS = -L/home/jenkins/workspace/Weekly-4-MT310s2-COM5003/build/tmp-glibc/work/x86_64-linux/libmtp-native/1.1.17-r0/recipe-sysroot-native/usr/lib/pkgconfig//usr/lib
-lusb-1.0

so libusb.h is not found (yes the path is wrong). Why do we replace by
${pcfiledir} exactly?

Andreas

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

* Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist
  2020-09-01 16:33           ` Andreas Müller
@ 2020-09-01 16:41             ` Andreas Müller
  0 siblings, 0 replies; 8+ messages in thread
From: Andreas Müller @ 2020-09-01 16:41 UTC (permalink / raw)
  To: Peter Kjellerstedt; +Cc: Steve Sakoman, akuster, openembedded-core

On Tue, Sep 1, 2020 at 6:33 PM Andreas Müller <schnitzeltony@gmail.com> wrote:
>
> On Wed, Jun 17, 2020 at 3:50 AM Peter Kjellerstedt
> <peter.kjellerstedt@axis.com> wrote:
> >
> > This has been integrated to master now (commit f9c5df6d).
> > Please cherry-pick it to Dunfell and Zeus.
> >
> > //Peter
> >
> > > -----Original Message-----
> > > From: openembedded-core@lists.openembedded.org <openembedded-
> > > core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > > Sent: den 12 juni 2020 18:26
> > > To: openembedded-core@lists.openembedded.org
> > > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid
> > > an exception if an empty pkgconfig dir exist
> > >
> > > *ping* *ping* *ping* *ping*
> > >
> > > Ok, it was only two weeks since I pinged this the last time, but
> > > since I'm going on vacation in a week I thought I'd give it a shot
> > > before then. I am still waiting for any kind of reaction to this
> > > patch...
> > >
> > > //Peter
> > >
> > > > -----Original Message-----
> > > > From: openembedded-core@lists.openembedded.org <openembedded-
> > > > core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > > > Sent: den 28 maj 2020 03:26
> > > > To: openembedded-core@lists.openembedded.org
> > > > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass: Avoid
> > > > an exception if an empty pkgconfig dir exist
> > > >
> > > > *ping* *ping* *ping*
> > > >
> > > > I am not sure why this is being ignored. It is two months since I
> > > > first sent it and the third time I ping it. I have not received any
> > > > objections, yet it has never made it even to master-next as far as
> > > > I know.
> > > >
> > > > This should not be taken as a complaint. I know there has been
> > > > problems with the autobuilder and that patch integration has been
> > > > slowed, and during this time all other patches I have sent have
> > > > been applied on the first try. So it just seems to be this one that
> > > > has been left out, and I would like to know if there is a reason or
> > > > if it just has fallen between the cracks.
> > > >
> > > > //Peter
> > > >
> > > > PS. The patch of course applies to Dunfell now too in addition to
> > > > master and Zeus since it has been released in the meantime.
> > > >
> > > > > -----Original Message-----
> > > > > From: openembedded-core@lists.openembedded.org <openembedded-
> > > > core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > > > > Sent: den 25 april 2020 11:17
> > > > > To: openembedded-core@lists.openembedded.org
> > > > > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass:
> > > Avoid
> > > > an exception if an empty pkgconfig dir exist
> > > > >
> > > > > *ping again*
> > > > >
> > > > > //Peter
> > > > >
> > > > > > -----Original Message-----
> > > > > > From: openembedded-core@lists.openembedded.org <openembedded-
> > > > core@lists.openembedded.org> On Behalf Of Peter Kjellerstedt
> > > > > > Sent: den 3 april 2020 18:24
> > > > > > To: openembedded-core@lists.openembedded.org
> > > > > > Subject: Re: [OE-core] [master][zeus][PATCH] relocatable.bbclass:
> > > > Avoid an exception if an empty pkgconfig dir exist
> > > > > >
> > > > > > *ping*
> > > > > >
> > > > > > //Peter
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: openembedded-core-bounces@lists.openembedded.org
> > > > <openembedded-core-bounces@lists.openembedded.org> On Behalf Of Peter
> > > > Kjellerstedt
> > > > > > > Sent: den 20 mars 2020 19:04
> > > > > > > To: openembedded-core@lists.openembedded.org
> > > > > > > Subject: [OE-core] [master][zeus][PATCH] relocatable.bbclass:
> > > Avoid
> > > > an exception if an empty pkgconfig dir exist
> > > > > > >
> > > > > > > Rewrite relocatable_native_pcfiles() so that it can handle that
> > > any
> > > > of
> > > > > > > the checked pkgconfig directories are empty without causing an
> > > > > > > exception.
> > > > > > >
> > > > > > > Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
> > > > > > > ---
> > > > > > >  meta/classes/relocatable.bbclass | 20 +++++++++++---------
> > > > > > >  1 file changed, 11 insertions(+), 9 deletions(-)
> > > > > > >
> > > > > > > diff --git a/meta/classes/relocatable.bbclass
> > > > b/meta/classes/relocatable.bbclass
> > > > > > > index 582812c1cf..af04be5cca 100644
> > > > > > > --- a/meta/classes/relocatable.bbclass
> > > > > > > +++ b/meta/classes/relocatable.bbclass
> > > > > > > @@ -6,13 +6,15 @@ python relocatable_binaries_preprocess() {
> > > > > > >      rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
> > > > > > >  }
> > > > > > >
> > > > > > > -relocatable_native_pcfiles () {
> > > > > > > -     if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
> > > > > > > -             rel=${@os.path.relpath(d.getVar('base_prefix'),
> > > > d.getVar('libdir') + "/pkgconfig")}
> > > > > > > -             sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g"
> > > > ${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
> > > > > > > -     fi
> > > > > > > -     if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then
> > > > > > > -             rel=${@os.path.relpath(d.getVar('base_prefix'),
> > > > d.getVar('datadir') + "/pkgconfig")}
> > > > > > > -             sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g"
> > > > ${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc
> > > > > > > -     fi
> > > > > > > +relocatable_native_pcfiles() {
> > > > > > > +     for dir in ${libdir}/pkgconfig ${datadir}/pkgconfig; do
> > > > > > > +             files_template=${SYSROOT_DESTDIR}$dir/*.pc
> > > > > > > +             # Expand to any files matching $files_template
> > > > > > > +             files=$(echo $files_template)
> > > > > > > +             # $files_template and $files will differ if any
> > > > files were found
> > > > > > > +             if [ "$files_template" != "$files" ]; then
> > > > > > > +                     rel=$(realpath -m --relative-to=$dir
> > > > ${base_prefix})
> > > > > > > +                     sed -i -e
> > > > "s:${base_prefix}:\${pcfiledir}/$rel:g" $files
> > > > > > > +             fi
> > > > > > > +     done
> > > > > > >  }
> > > > > > > --
> > > > > > > 2.21.1
> > > > > >
> > > > > > //Peter
> Bisected it: Since this one is in dunfell I am unable to build on
> autobuilder. I see
>
> |  virtual:native:/home/jenkins/workspace/Weekly-4-MT310s2-COM5003/sources/openembedded-core/meta/recipes-extended/libnsl/libnsl2_git.bb:do_compile
> |  virtual:native:/home/jenkins/workspace/Weekly-4-MT310s2-COM5003/sources/openembedded-core/meta/recipes-graphics/fontconfig/fontconfig_2.13.1.bb:do_compile
> |  virtual:native:/home/jenkins/workspace/Weekly-4-MT310s2-COM5003/sources/meta-openembedded/meta-oe/recipes-connectivity/libmtp/libmtp_1.1.17.bb:do_compile
>
> Makefile says (don't have *.pc at the moment):
>
> LIBUSB_CFLAGS =
> -I/home/jenkins/workspace/Weekly-4-MT310s2-COM5003/build/tmp-glibc/work/x86_64-linux/libmtp-native/1.1.17-r0/recipe-sysroot-native/usr/lib/pkgconfig//usr/include/libusb-1.0
> LIBUSB_LIBS = -L/home/jenkins/workspace/Weekly-4-MT310s2-COM5003/build/tmp-glibc/work/x86_64-linux/libmtp-native/1.1.17-r0/recipe-sysroot-native/usr/lib/pkgconfig//usr/lib
> -lusb-1.0
>
> so libusb.h is not found (yes the path is wrong). Why do we replace by
> ${pcfiledir} exactly?
>
Cross checked this with my local - more modern OS machine: That path
looks OK - seems I am in trouble with realpath...

Andreas

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

end of thread, other threads:[~2020-09-01 16:41 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-20 18:04 [master][zeus][PATCH] relocatable.bbclass: Avoid an exception if an empty pkgconfig dir exist Peter Kjellerstedt
2020-04-03 16:24 ` [OE-core] " Peter Kjellerstedt
     [not found] ` <16025BE698C394B5.19764@lists.openembedded.org>
2020-04-25  9:16   ` Peter Kjellerstedt
     [not found]   ` <16090558444D87E6.18576@lists.openembedded.org>
2020-05-28  1:25     ` Peter Kjellerstedt
     [not found]     ` <16130CCABBD4F064.18282@lists.openembedded.org>
2020-06-12 16:25       ` Peter Kjellerstedt
     [not found]       ` <1617D89C6070B90C.14082@lists.openembedded.org>
2020-06-17  1:50         ` Peter Kjellerstedt
2020-09-01 16:33           ` Andreas Müller
2020-09-01 16:41             ` Andreas Müller

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.