Skip to contentSkip to conversation

package.bbclass: Let pn be eglibc for eglibc-locale

PATCH In review Saul Wold 5 participants 10 messages Jul 26, 2012 – Jul 29, 2012

lore
Share & tools
lore

Saul Wold

author
#0 lore raw

PATCH 1/1 package.bbclass: Let pn be eglibc for eglibc-locale

From: Khem Raj <[email protected]>

eglibc-locale is creating the individual locale files which have runtime dependency on ${PN} which is 'eglibc-locale' but problem is that eglibc-locale is an empty package and does not get created so when one asks for adding locales to image then due to the missing dependency in the feeds root file system can not be created.

This patch treates eglibc-locale as if it was eglibc and hence the dependency then is created on libc6 and not not existing eglibc-locale package.

---
 meta/classes/package.bbclass |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
meta/classes/package.bbclass +2 -0
index 0c7fe80..06e2e04 100644
@@ -389,6 +389,8 @@ python package_do_split_locales() {
 
     dvar = d.getVar('PKGD', True)
     pn = d.getVar('PN', True)
+    if pn == "eglibc-locale":
+        pn = "eglibc"
 
     if pn + '-locale' in packages:
         packages.remove(pn + '-locale')
Signature · 1 line
1.7.7.6
#1 lore raw

meta/classes/package.bbclass python package_do_split_locales() { · line 393

Quoted 10 lines · Saul Wold
meta/classes/package.bbclass +2 -0
index 0c7fe80..06e2e04 100644
@@ -389,6 +389,8 @@ python package_do_split_locales() {
 
     dvar = d.getVar('PKGD', True)
     pn = d.getVar('PN', True)
+    if pn == "eglibc-locale":
+        pn = "eglibc"

Bletch! There must surely be some way to solve this problem without hacking recipe names into package.bbclass.

p.

#2 lore raw
Quoted 3 lines · Phil Blundell

Bletch! There must surely be some way to solve this problem without hacking recipe names into package.bbclass.

Yes making eglibc-locale base package to be non empty. So if we put in something there that it never turns out to be empty is one way

#3 lore raw
Quoted 7 lines · Khem Raj
Quoted 3 lines · Phil Blundell

Bletch! There must surely be some way to solve this problem without hacking recipe names into package.bbclass.

Yes making eglibc-locale base package to be non empty. So if we put in something there that it never turns out to be empty is one way

Well, having things depending on eglibc-locale-locale is wrong in many ways :/. eglibc is just the only package we split the locale generation into a separate recipe for.

A more generic check in there which would work for multiple libcs would be:

if pn.endswith("-locale"):

    pn = pn[:-7]

the other alternative which comes to mind would be so set a variable with the name we want used there, defaulting it to PN.

Cheers,

Richard

#4 lore raw
Quoted 13 lines · Richard Purdie
Quoted 7 lines · Khem Raj
Quoted 3 lines · Phil Blundell

Bletch! There must surely be some way to solve this problem without hacking recipe names into package.bbclass.

Yes making eglibc-locale base package to be non empty. So if we put in something there that it never turns out to be empty is one way

Well, having things depending on eglibc-locale-locale is wrong in many ways :/. eglibc is just the only package we split the locale generation into a separate recipe for.

Quoted 5 lines

A more generic check in there which would work for multiple libcs would be:

if pn.endswith("-locale"):

     pn = pn[:-7]

This sounds like a good alternative. It still enables breakups of the locales, if appropriate, with the only rule being that the core part of the name be consistent with whatever it's targeting.

i.e. eglibc and eglibc-locale

Quoted 2 lines

the other alternative which comes to mind would be so set a variable with the name we want used there, defaulting it to PN.

I had suggested changing the PN of the eglibc-locale to "eglibc", but I believe Khem ran into a number of problems doing this.

--Mark

Quoted 10 lines

Cheers,

Richard

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

#5 lore raw
In reply to Richard Purdie
Quoted 2 lines · Richard Purdie

the other alternative which comes to mind would be so set a variable with the name we want used there, defaulting it to PN.

That sounds like the most wholesome plan to me.

p.

#6 lore raw
Quoted 5 lines · Phil Blundell
Quoted 2 lines · Richard Purdie

the other alternative which comes to mind would be so set a variable with the name we want used there, defaulting it to PN.

That sounds like the most wholesome plan to me.

can we use BPN, unless we generate locale for native and nativesdk cross and crosssdk
class of recipes that should work too. I thought about it and thought it was too
intrusive.

#7 lore raw
Quoted 5 lines · Khem Raj
Quoted 4 lines · Phil Blundell
Quoted 2 lines · Richard Purdie

the other alternative which comes to mind would be so set a variable with the name we want used there, defaulting it to PN.

Quoted 7 lines
Quoted 1 line

That sounds like the most wholesome plan to me.

can we use BPN, unless we generate locale for native and nativesdk cross and crosssdk
class of recipes that should work too. I thought about it and thought it was too
intrusive.

There are cases for multilibs where locales for specific multilib packages will be generated. We theoretically could generate them for native(sdk) and cross(sdk) as well, but I don't believe we do that in the general cases.

--Mark

#8 lore raw
Quoted 20 lines · Mark Hatle
Quoted 9 lines · Khem Raj
Quoted 7 lines · Phil Blundell
Quoted 3 lines · Richard Purdie

the other alternative which comes to mind would be so set a variable with the name we want used there, defaulting it to PN.

Quoted 8 lines
Quoted 1 line

That sounds like the most wholesome plan to me.

can we use BPN, unless we generate locale for native and nativesdk cross and crosssdk
class of recipes that should work too. I thought about it and thought it was too
intrusive.

Quoted 5 lines

There are cases for multilibs where locales for specific multilib packages will be generated. We theoretically could generate them for native(sdk) and cross(sdk) as well, but I don't believe we do that in the general cases.

--Mark

After RPs fix and Paul's root file system rework I am still seeing

temp/run.do_rootfs.25593: 932: local: locale-base-en-gb: bad variable name

Quoted 8 lines

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

#9 lore raw
Quoted 6 lines

After RPs fix and Paul's root file system rework I am still seeing

temp/run.do_rootfs.25593: 932: local: locale-base-en-gb: bad variable name

OK I think my fault is that I am dash'ing and not bash'ing and meta/classes/package_rpm.bbclass is full of bashism