Re: [OE-core] [PATCH] i2c-tools: Split binaries and library

2019-05-07 Thread John Ernberg
Ping?

On 4/18/19 8:39 AM, John Ernberg wrote:
> 
> On 4/16/19 2:36 PM, Adrian Bunk wrote:
>> On Tue, Apr 16, 2019 at 12:02:04PM +, John Ernberg wrote:
>>> ...
>>> --- a/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
>>> +++ b/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
>>> ...
>>> -PACKAGES =+ "${PN}-misc"
>>> +PACKAGES =+ "${PN}-misc ${PN}-utils "
>>> ...
>> i2c-tools-utils is a weird name.
>>
>> It would be better to add a new package libi2c for the library instead.
>>
>> This would also not break backwards compatibility for people
>> already installing i2c-tools to their images.
>>
>> cu
>> Adrian
>>
> I tinkered with this and ran into the SHLIB handling where it renames 
> the packages based on libraries, are there any example recipes I can 
> look at because defining libi2c as a package with PACKAGES breaks the 
> dependency graph due to the SHLIB handling and I cannot figure out how 
> to write the recipe so that doesn't happen.
> 
> Thanks.
> 
> Best regards // John Ernberg
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] i2c-tools: Split binaries and library

2019-04-18 Thread John Ernberg


On 4/16/19 2:36 PM, Adrian Bunk wrote:
> On Tue, Apr 16, 2019 at 12:02:04PM +, John Ernberg wrote:
>> ...
>> --- a/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
>> +++ b/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
>> ...
>> -PACKAGES =+ "${PN}-misc"
>> +PACKAGES =+ "${PN}-misc ${PN}-utils "
>> ...
> i2c-tools-utils is a weird name.
>
> It would be better to add a new package libi2c for the library instead.
>
> This would also not break backwards compatibility for people
> already installing i2c-tools to their images.
>
> cu
> Adrian
>
I tinkered with this and ran into the SHLIB handling where it renames 
the packages based on libraries, are there any example recipes I can 
look at because defining libi2c as a package with PACKAGES breaks the 
dependency graph due to the SHLIB handling and I cannot figure out how 
to write the recipe so that doesn't happen.

Thanks.

Best regards // John Ernberg
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] i2c-tools: Split binaries and library

2019-04-17 Thread John Ernberg


On 4/16/19 2:36 PM, Adrian Bunk wrote:
> On Tue, Apr 16, 2019 at 12:02:04PM +, John Ernberg wrote:
>> ...
>> --- a/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
>> +++ b/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
>> ...
>> -PACKAGES =+ "${PN}-misc"
>> +PACKAGES =+ "${PN}-misc ${PN}-utils "
>> ...
> i2c-tools-utils is a weird name.
>
> It would be better to add a new package libi2c for the library instead.
>
> This would also not break backwards compatibility for people
> already installing i2c-tools to their images.
>
> cu
> Adrian
>
I tried to avoid breaking the backwards compatibility with the 
RRECOMMENDS, but I do agree with the package name suggestion so I'll 
tinker with it and send a V2 when I get something going.

Best regards // John Ernberg
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] i2c-tools: Split binaries and library

2019-04-16 Thread Adrian Bunk
On Tue, Apr 16, 2019 at 12:02:04PM +, John Ernberg wrote:
>...
> --- a/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
> +++ b/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
>...
> -PACKAGES =+ "${PN}-misc"
> +PACKAGES =+ "${PN}-misc ${PN}-utils "
>...

i2c-tools-utils is a weird name.

It would be better to add a new package libi2c for the library instead.

This would also not break backwards compatibility for people 
already installing i2c-tools to their images.

cu
Adrian

-- 

   "Is there not promise of rain?" Ling Tan asked suddenly out
of the darkness. There had been need of rain for many days.
   "Only a promise," Lao Er said.
   Pearl S. Buck - Dragon Seed

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] i2c-tools: Split binaries and library

2019-04-16 Thread John Ernberg
From: John Ernberg 

Since the library is differently licensed, split it from the executables.

According to the README of i2c-tools the library is LGPLv2.1 while the
executables are GPLv2.

License-update: Additional license file.

Signed-off-by: John Ernberg 
---
 meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb | 13 +
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb 
b/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
index 2b4563d4f0..b827a8274a 100644
--- a/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
+++ b/meta/recipes-devtools/i2c-tools/i2c-tools_4.1.bb
@@ -1,8 +1,10 @@
 SUMMARY = "Set of i2c tools for linux"
 HOMEPAGE = "https://i2c.wiki.kernel.org/index.php/I2C_Tools;
 SECTION = "base"
-LICENSE = "GPLv2+"
-LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
+LICENSE = "LGPLv2.1 & GPLv2+"
+LICENSE_${PN} = "LGPLv2.1"
+LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
+file://COPYING.LGPL;md5=4fbd65380cdd255951079008b364516c"
 
 SRC_URI = "${KERNELORG_MIRROR}/software/utils/i2c-tools/${BP}.tar.gz \
 "
@@ -21,20 +23,23 @@ do_install() {
 oe_runmake 'DESTDIR=${D}' install
 }
 
-PACKAGES =+ "${PN}-misc"
+PACKAGES =+ "${PN}-misc ${PN}-utils "
 FILES_${PN}-misc = "${sbindir}/i2c-stub-from-dump \
 ${bindir}/ddcmon \
 ${bindir}/decode-edid \
 ${bindir}/decode-dimms \
 ${bindir}/decode-vaio \
"
+FILES_${PN}-utils = "${sbindir}"
+RRECOMMENDS_${PN}_class-target = "${PN}-utils"
+
 RDEPENDS_${PN}-misc = "${PN} perl perl-module-posix \
perl-module-constant perl-module-file-basename \
perl-module-fcntl perl-module-strict perl-module-vars \
   "
 
 ALTERNATIVE_PRIORITY = "100"
-ALTERNATIVE_${PN} = "i2cdetect i2cdump i2cget i2cset"
+ALTERNATIVE_${PN}-utils = "i2cdetect i2cdump i2cget i2cset"
 ALTERNATIVE_LINK_NAME[i2cdetect] = "${sbindir}/i2cdetect"
 ALTERNATIVE_LINK_NAME[i2cdump] = "${sbindir}/i2cdump"
 ALTERNATIVE_LINK_NAME[i2cget] = "${sbindir}/i2cget"
-- 
2.21.0
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core