Skip to contentSkip to conversation

package.bbclass: when running 'file', be explicit about the path to the magic

PATCH In review Chris Larson 4 participants 7 messages Feb 19, 2010 – Mar 1, 2010

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package.bbclass: when running 'file', be explicit about the path to the magic

From: Tom Rini <[email protected]>

This works around one relocation issue.

---
 classes/package.bbclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
classes/package.bbclass +3 -2
index 062f782..72c9053 100644
@@ -155,11 +155,12 @@ def runstrip(file, d):
     import commands, stat
 
     pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
+    magicfile = "%s/file/magic" % bb.data.getVar('STAGING_DATADIR_NATIVE', d, True) 
 
-    ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
+    ret, result = commands.getstatusoutput("%sfile -m %s '%s'" % (pathprefix, magicfile, file))
 
     if ret:
-        bb.error("runstrip: 'file %s' failed (forced strip)" % file)
+        bb.error("runstrip: 'file -m %s %s' failed (forced strip)" % (magicfile, file))
 
     if "not stripped" not in result:
         bb.debug(1, "runstrip: skip %s" % file)
Signature · 1 line
1.6.3.3
#1 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I don't have 'file/' in STAGING_DATADIR_NATIVE so I now have lots of unstripped stuff (150MB libxul.so). Could you please add an extra check to see if file/magic exists?

regards,

Koen

Quoted 19 lines · Chris Larson

From: Tom Rini <[email protected]>

This works around one relocation issue.

---
 classes/package.bbclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
classes/package.bbclass +1 -0
index 062f782..72c9053 100644
@@ -155,11 +155,12 @@ def runstrip(file, d):
     import commands, stat
 
     pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
+    magicfile = "%s/file/magic" % bb.data.getVar('STAGING_DATADIR_NATIVE', d, True) 

classes/package.bbclass def runstrip(file, d): · line 166

Quoted 10 lines
classes/package.bbclass +2 -2
 
-    ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
+    ret, result = commands.getstatusoutput("%sfile -m %s '%s'" % (pathprefix, magicfile, file))
 
     if ret:
-        bb.error("runstrip: 'file %s' failed (forced strip)" % file)
+        bb.error("runstrip: 'file -m %s %s' failed (forced strip)" % (magicfile, file))
 
     if "not stripped" not in result:
         bb.debug(1, "runstrip: skip %s" % file)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLi4YRMkyGM64RGpERAoPBAKCdNJV1xR2zZTGU6XSn/jHIDfrNCQCbBFWS DrZI2u7qsGPg1ABHQh4loHU=
=spj2
-----END PGP SIGNATURE-----

#2 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think I know what's happening.

On my (debian) buildhost I have file 4.26. (Re)building file-native 5.04 gives me:

./staging/x86_64-linux/usr/share/misc/magic.mgc

Graeme has file 5.03 on his buildhost and has

./staging/x86_64-linux/usr/share/file/magic

So it seems that the buildhost contamination also affects file-native :(

regards,

Koen

Quoted 6 lines · Koen Kooi

Hi,

I don't have 'file/' in STAGING_DATADIR_NATIVE so I now have lots of unstripped stuff (150MB libxul.so). Could you please add an extra check to see if file/magic exists?

Quoted 35 lines

regards,

Koen

Quoted 29 lines · Chris Larson

From: Tom Rini <[email protected]>

This works around one relocation issue.

---
 classes/package.bbclass |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
classes/package.bbclass +3 -2
index 062f782..72c9053 100644
@@ -155,11 +155,12 @@ def runstrip(file, d):
     import commands, stat
 
     pathprefix = "export PATH=%s; " % bb.data.getVar('PATH', d, True)
+    magicfile = "%s/file/magic" % bb.data.getVar('STAGING_DATADIR_NATIVE', d, True) 
 
-    ret, result = commands.getstatusoutput("%sfile '%s'" % (pathprefix, file))
+    ret, result = commands.getstatusoutput("%sfile -m %s '%s'" % (pathprefix, magicfile, file))
 
     if ret:
-        bb.error("runstrip: 'file %s' failed (forced strip)" % file)
+        bb.error("runstrip: 'file -m %s %s' failed (forced strip)" % (magicfile, file))
 
     if "not stripped" not in result:
         bb.debug(1, "runstrip: skip %s" % file)

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLi4poMkyGM64RGpERAjszAJ9OFI03ODoZTYp40teNRyKwkK38uQCdGlo6 5QfkyN8ldZ/E67X8ETrxtb8=
=X6Dm
-----END PGP SIGNATURE-----

#3 lore raw
Quoted 8 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think I know what's happening.

On my (debian) buildhost I have file 4.26. (Re)building file-native 5.04 gives me:

Quoted 8 lines

./staging/x86_64-linux/usr/share/misc/magic.mgc

Graeme has file 5.03 on his buildhost and has

./staging/x86_64-linux/usr/share/file/magic

So it seems that the buildhost contamination also affects file-native :(

Its not contamination, its just simply that file 5.XX moved its magic file to /usr/share/misc/

Im still building 4.21 for some reason so dont see this.

Graeme

#4 lore raw

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 13 lines · Graeme Gregory
Quoted 12 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think I know what's happening.

On my (debian) buildhost I have file 4.26. (Re)building file-native 5.04 gives me:

./staging/x86_64-linux/usr/share/misc/magic.mgc

Graeme has file 5.03 on his buildhost and has

Quoted 8 lines
Quoted 4 lines

./staging/x86_64-linux/usr/share/file/magic

So it seems that the buildhost contamination also affects file-native :(

Its not contamination, its just simply that file 5.XX moved its magic file to /usr/share/misc/

Im still building 4.21 for some reason so dont see this.

Bitbake 1.8.x? I'm using bitbake master from git, that has a different sorting algo AIUI.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLi40oMkyGM64RGpERAjEIAJ4+rW+07FQBjx9std0w7ZE1tYcdtQCgtgI6 X6RRtXw6ttRVlMSfzyUAUBk=
=QSlm
-----END PGP SIGNATURE-----

#5 lore raw

Ugh, lovely. Okay, I'll take care of it today, sorry for the hassle.

Quoted 46 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 13 lines · Graeme Gregory
Quoted 12 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think I know what's happening.

On my (debian) buildhost I have file 4.26. (Re)building file-native 5.04 gives me:

./staging/x86_64-linux/usr/share/misc/magic.mgc

Graeme has file 5.03 on his buildhost and has

Quoted 8 lines
Quoted 4 lines

./staging/x86_64-linux/usr/share/file/magic

So it seems that the buildhost contamination also affects file-native :(

Its not contamination, its just simply that file 5.XX moved its magic file to /usr/share/misc/

Im still building 4.21 for some reason so dont see this.

Bitbake 1.8.x? I'm using bitbake master from git, that has a different sorting algo AIUI.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLi40oMkyGM64RGpERAjEIAJ4+rW+07FQBjx9std0w7ZE1tYcdtQCgtgI6 X6RRtXw6ttRVlMSfzyUAUBk=
=QSlm
-----END PGP SIGNATURE-----

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

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#6 lore raw
Quoted 1 line · Chris Larson

Ugh, lovely. Okay, I'll take care of it today, sorry for the hassle.

It is Monday after all :)

Philip

Quoted 52 lines · Koen Kooi
Quoted 47 lines

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Quoted 13 lines · Graeme Gregory
Quoted 12 lines · Koen Kooi

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I think I know what's happening.

On my (debian) buildhost I have file 4.26. (Re)building file-native 5.04 gives me:

./staging/x86_64-linux/usr/share/misc/magic.mgc

Graeme has file 5.03 on his buildhost and has

Quoted 8 lines
Quoted 4 lines

./staging/x86_64-linux/usr/share/file/magic

So it seems that the buildhost contamination also affects file-native :(

Its not contamination, its just simply that file 5.XX moved its magic file to /usr/share/misc/

Im still building 4.21 for some reason so dont see this.

Bitbake 1.8.x? I'm using bitbake master from git, that has a different sorting algo AIUI.

regards,

Koen
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)

iD8DBQFLi40oMkyGM64RGpERAjEIAJ4+rW+07FQBjx9std0w7ZE1tYcdtQCgtgI6 X6RRtXw6ttRVlMSfzyUAUBk=
=QSlm
-----END PGP SIGNATURE-----

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