Skip to contentSkip to conversation

Package management DB in old-style SDK

DISCUSSION Denys Dmytriyenko 3 participants 7 messages Apr 18, 2016 – Apr 22, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

I'm still using the old-style SDK (meta-toolchain) for our products due to some code customizations in it and some of our use cases rely on the opkg package management database being present in sysroots, so packages can be manipulated in SDK with opkg command. It appears that /var/lib/opkg is now empty and the package database is no longer supplied with the SDK.

I know about the new-style populate_sdk and the even newer Extensible SDK, but not yet ready to convert our old use cases to that. Since there were lots of changes around the way SDKs work in OE-Core in the past couple releases, I'm failing to find the change that causes opkg DB to be missing from the old style SDK. I'll appreciate any pointers in helping me debug and/or fix this issue with my SDKs. Thanks.

Signature · 1 line
Denys
#1 lore raw

Hi Denys,

Quoted 6 lines · On Mon, 18 Apr 2016 18:14:55 Denys Dmytriyenko wrote:

I'm still using the old-style SDK (meta-toolchain) for our products due to some code customizations in it and some of our use cases rely on the opkg package management database being present in sysroots, so packages can be manipulated in SDK with opkg command. It appears that /var/lib/opkg is now empty and the package database is no longer supplied with the SDK.

Quoted 6 lines

I know about the new-style populate_sdk and the even newer Extensible SDK, but not yet ready to convert our old use cases to that. Since there were lots of changes around the way SDKs work in OE-Core in the past couple releases, I'm failing to find the change that causes opkg DB to be missing from the old style SDK. I'll appreciate any pointers in helping me debug and/or fix this issue with my SDKs. Thanks.

As far as ipk is concerned I think it was this commit:

http://cgit.openembedded.org/openembedded-core/commit/?id=c8e0ec2da9ad4ce1c103966906a85f68c15400dd

Unfortunately it wasn't made optional.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#2 lore raw
Quoted 16 lines · Paul Eggleton

Hi Denys,

Quoted 6 lines · On Mon, 18 Apr 2016 18:14:55 Denys Dmytriyenko wrote:

I'm still using the old-style SDK (meta-toolchain) for our products due to some code customizations in it and some of our use cases rely on the opkg package management database being present in sysroots, so packages can be manipulated in SDK with opkg command. It appears that /var/lib/opkg is now empty and the package database is no longer supplied with the SDK.

Quoted 6 lines

I know about the new-style populate_sdk and the even newer Extensible SDK, but not yet ready to convert our old use cases to that. Since there were lots of changes around the way SDKs work in OE-Core in the past couple releases, I'm failing to find the change that causes opkg DB to be missing from the old style SDK. I'll appreciate any pointers in helping me debug and/or fix this issue with my SDKs. Thanks.

Quoted 5 lines

As far as ipk is concerned I think it was this commit:

http://cgit.openembedded.org/openembedded-core/commit/?id=c8e0ec2da9ad4ce1c103966906a85f68c15400dd

Unfortunately it wasn't made optional.

Thanks, Paul!

Unfortunately, the change is in the library, which is quite difficult to override in another layer...

Will there be any objections for making that change optional with the default being like it is now, but with the ability to restore the old way with a variable?

Signature · 1 line
Denys
#3 lore raw
Quoted 22 lines · On Mon, 18 Apr 2016 21:01:27 Denys Dmytriyenko wrote:
Quoted 16 lines · Paul Eggleton

Hi Denys,

Quoted 7 lines · On Mon, 18 Apr 2016 18:14:55 Denys Dmytriyenko wrote:

I'm still using the old-style SDK (meta-toolchain) for our products due to some code customizations in it and some of our use cases rely on the opkg package management database being present in sysroots, so packages can be manipulated in SDK with opkg command. It appears that /var/lib/opkg is now empty and the package database is no longer supplied with the SDK.

Quoted 6 lines

I know about the new-style populate_sdk and the even newer Extensible SDK, but not yet ready to convert our old use cases to that. Since there were lots of changes around the way SDKs work in OE-Core in the past couple releases, I'm failing to find the change that causes opkg DB to be missing from the old style SDK. I'll appreciate any pointers in helping me debug and/or fix this issue with my SDKs. Thanks.

Quoted 4 lines

As far as ipk is concerned I think it was this commit:
http://cgit.openembedded.org/openembedded-core/commit/?id=c8e0ec2da9ad4c
e1c103966906a85f68c15400dd>
Unfortunately it wasn't made optional.

Quoted 8 lines

Thanks, Paul!

Unfortunately, the change is in the library, which is quite difficult to override in another layer...

Will there be any objections for making that change optional with the default being like it is now, but with the ability to restore the old way with a variable?

As long as we make it have the same effect across the three different package managers, no objection from me at least. Thinking about it we could even make it switch based on package-management being in SDKIMAGE_FEATURES and then it would be consistent with how it works for images as well.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#4 lore raw
Quoted 19 lines · Paul Eggleton
Quoted 4 lines · On Mon, 18 Apr 2016 21:01:27 Denys Dmytriyenko wrote:
Quoted 3 lines · Paul Eggleton

Hi Denys,

Quoted 1 line · On Mon, 18 Apr 2016 18:14:55 Denys Dmytriyenko wrote:

I'm still using the old-style SDK (meta-toolchain) for our products

due

Quoted 1 line
Quoted 1 line
Quoted 1 line

to some code customizations in it and some of our use cases rely on

the

Quoted 1 line
Quoted 1 line
Quoted 1 line

opkg package management database being present in sysroots, so

packages

Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

can be manipulated in SDK with opkg command. It appears that /var/lib/opkg is now empty and the package database is no longer supplied with the SDK.

I know about the new-style populate_sdk and the even newer Extensible SDK, but not yet ready to convert our old use cases to that. Since

there

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

were lots of changes around the way SDKs work in OE-Core in the past couple releases, I'm failing to find the change that causes opkg DB

Quoted 15 lines

to

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

be missing from the old style SDK. I'll appreciate any pointers in helping me debug and/or fix this issue with my SDKs. Thanks.

As far as ipk is concerned I think it was this commit:

http://cgit.openembedded.org/openembedded-core/commit/?id=c8e0ec2da9ad4c

Quoted 7 lines
Quoted 2 lines

e1c103966906a85f68c15400dd>
Unfortunately it wasn't made optional.

Thanks, Paul!

Unfortunately, the change is in the library, which is quite difficult to override in another layer...

Actually, overriding a library is trivial given the way we do our python package. Copy meta/lib/oe/__init__.py into <your layer>/lib/oe/, copy meta/lib/oe/sdk.py to <your layer>/lib/oe/ and modify, and make sure your layer is prioritized correctly, and your forked version will be used in preference.

It's not ideal, for the same reasons it's not ideal to override a class -- you're stuck keeping it in sync, so for that reason I'd not recommend it, but it's not difficult to do the override :)

#5 lore raw
Quoted 46 lines · Christopher Larson
Quoted 20 lines · Paul Eggleton
Quoted 4 lines · On Mon, 18 Apr 2016 21:01:27 Denys Dmytriyenko wrote:
Quoted 3 lines · Paul Eggleton

Hi Denys,

Quoted 1 line · On Mon, 18 Apr 2016 18:14:55 Denys Dmytriyenko wrote:

I'm still using the old-style SDK (meta-toolchain) for our products

due

Quoted 1 line
Quoted 1 line
Quoted 1 line

to some code customizations in it and some of our use cases rely on

the

Quoted 1 line
Quoted 1 line
Quoted 1 line

opkg package management database being present in sysroots, so

packages

Quoted 5 lines
Quoted 5 lines
Quoted 5 lines

can be manipulated in SDK with opkg command. It appears that /var/lib/opkg is now empty and the package database is no longer supplied with the SDK.

I know about the new-style populate_sdk and the even newer

Extensible

Quoted 1 line
Quoted 1 line
Quoted 1 line

SDK, but not yet ready to convert our old use cases to that. Since

there

Quoted 2 lines
Quoted 2 lines
Quoted 2 lines

were lots of changes around the way SDKs work in OE-Core in the past couple releases, I'm failing to find the change that causes opkg DB

Quoted 15 lines

to

Quoted 5 lines
Quoted 5 lines
Quoted 2 lines

be missing from the old style SDK. I'll appreciate any pointers in helping me debug and/or fix this issue with my SDKs. Thanks.

As far as ipk is concerned I think it was this commit:

http://cgit.openembedded.org/openembedded-core/commit/?id=c8e0ec2da9ad4c

Quoted 7 lines
Quoted 2 lines

e1c103966906a85f68c15400dd>
Unfortunately it wasn't made optional.

Thanks, Paul!

Unfortunately, the change is in the library, which is quite difficult to override in another layer...

Actually, overriding a library is trivial given the way we do our python package. Copy meta/lib/oe/__init__.py into <your layer>/lib/oe/, copy meta/lib/oe/sdk.py to <your layer>/lib/oe/ and modify, and make sure your layer is prioritized correctly, and your forked version will be used in preference.

Quoted 4 lines

It's not ideal, for the same reasons it's not ideal to override a class -- you're stuck keeping it in sync, so for that reason I'd not recommend it, but it's not difficult to do the override :)

Just as an FYI, we've done this on many occasions in meta-mentor-staging as a temporary measure while waiting for the fix to propagate to upstream. It's handy for cases like that, where the lifetime is limited.

#6 lore raw
In reply to Paul Eggleton
Quoted 28 lines · Paul Eggleton
Quoted 27 lines · On Mon, 18 Apr 2016 21:01:27 Denys Dmytriyenko wrote:
Quoted 16 lines · Paul Eggleton

Hi Denys,

Quoted 7 lines · On Mon, 18 Apr 2016 18:14:55 Denys Dmytriyenko wrote:

I'm still using the old-style SDK (meta-toolchain) for our products due to some code customizations in it and some of our use cases rely on the opkg package management database being present in sysroots, so packages can be manipulated in SDK with opkg command. It appears that /var/lib/opkg is now empty and the package database is no longer supplied with the SDK.

Quoted 6 lines

I know about the new-style populate_sdk and the even newer Extensible SDK, but not yet ready to convert our old use cases to that. Since there were lots of changes around the way SDKs work in OE-Core in the past couple releases, I'm failing to find the change that causes opkg DB to be missing from the old style SDK. I'll appreciate any pointers in helping me debug and/or fix this issue with my SDKs. Thanks.

Quoted 4 lines

As far as ipk is concerned I think it was this commit:
http://cgit.openembedded.org/openembedded-core/commit/?id=c8e0ec2da9ad4c
e1c103966906a85f68c15400dd>
Unfortunately it wasn't made optional.

Thanks, Paul!

Unfortunately, the change is in the library, which is quite difficult to override in another layer...

Quoted 8 lines
Quoted 3 lines

Will there be any objections for making that change optional with the default being like it is now, but with the ability to restore the old way with a variable?

As long as we make it have the same effect across the three different package managers, no objection from me at least. Thinking about it we could even make it switch based on package-management being in SDKIMAGE_FEATURES and then it would be consistent with how it works for images as well.

Hi, Paul,

I submitted a patch yesterday to make the discussed change - can you please review and provide feedback? Thanks.

Signature · 1 line
Denys