Skip to contentSkip to conversation

x264_r2245: fix DEPENDS for x86

PATCH In review Bob Foerster 4 participants 7 messages May 4, 2011 – May 8, 2011

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 x264_r2245: fix DEPENDS for x86

The recipe intended to add "yasm-native" to the dependencies on x86, but it set DEPENDS_x86 = "yasm-native" which obliterated the base dependencies. On a fresh build, this package was failing since it was trying to build before the compiler was ready.

Depends is now set with DEPENDS_append_x86, which leaves the base dependencies intact.

---
 recipes/vlc/x264_r2245.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
recipes/vlc/x264_r2245.bb +1 -1
index 0cffea3..8c2b5b4 100644
@@ -23,7 +23,7 @@ X264_ECFLAGS_mipsel = "-fPIC"
 X264_DISABLE_ASM = "--disable-asm"
 # use assembler written functions for those archs supporting this
 X264_DISABLE_ASM_x86 = ""
-DEPENDS_x86 = "yasm-native"
+DEPENDS_append_x86 = "yasm-native"
 
 EXTRA_OECONF = '--enable-shared ${X264_DISABLE_ASM} --extra-cflags="${X264_ECFLAGS}"'
 
Signature · 1 line
1.7.1
#1 lore raw
Quoted 18 lines · Bob Foerster

The recipe intended to add "yasm-native" to the dependencies on x86, but it set DEPENDS_x86 = "yasm-native" which obliterated the base dependencies. On a fresh build, this package was failing since it was trying to build before the compiler was ready.

Depends is now set with DEPENDS_append_x86, which leaves the base dependencies intact.

---
 recipes/vlc/x264_r2245.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
recipes/vlc/x264_r2245.bb +0 -0
index 0cffea3..8c2b5b4 100644

recipes/vlc/x264_r2245.bb X264_ECFLAGS_mipsel = "-fPIC" · line 26

Quoted 5 lines
recipes/vlc/x264_r2245.bb +1 -1
@@ -23,7 +23,7 @@ X264_ECFLAGS_mipsel = "-fPIC"
 X264_DISABLE_ASM = "--disable-asm"
 # use assembler written functions for those archs supporting this
 X264_DISABLE_ASM_x86 = ""
-DEPENDS_x86 = "yasm-native"
+DEPENDS_append_x86 = "yasm-native"
                         ^

you need a space

Otherwise looks ok

Quoted 11 lines
recipes/vlc/x264_r2245.bb +0 -0
 EXTRA_OECONF = '--enable-shared ${X264_DISABLE_ASM} --extra-cflags="${X264_ECFLAGS}"'
 
Signature · 7 lines
1.7.1


_______________________________________________
Openembedded-devel mailing list
[email protected]
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-devel
Signature · 1 line
-Khem
#2 lore raw

Am Samstag, den 07.05.2011, 17:59 -0700 schrieb Khem Raj:

Quoted 1 line · Bob Foerster

You can be more specific in the commit summary.

do not override DEPENDS for x86

Quoted 1 line
Quoted 1 line

The recipe intended to add "yasm-native" to the dependencies on x86,

Use present tense. s/intended/intends/

Quoted 1 line
Quoted 1 line

but it set DEPENDS_x86 = "yasm-native" which obliterated the base

s/set/sets/

Quoted 22 lines
Quoted 16 lines

dependencies. On a fresh build, this package was failing since it was trying to build before the compiler was ready.

Depends is now set with DEPENDS_append_x86, which leaves the base dependencies intact.

---
 recipes/vlc/x264_r2245.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
recipes/vlc/x264_r2245.bb +0 -0
index 0cffea3..8c2b5b4 100644

recipes/vlc/x264_r2245.bb X264_ECFLAGS_mipsel = "-fPIC" · line 26

Quoted 5 lines
recipes/vlc/x264_r2245.bb +1 -1
@@ -23,7 +23,7 @@ X264_ECFLAGS_mipsel = "-fPIC"
 X264_DISABLE_ASM = "--disable-asm"
 # use assembler written functions for those archs supporting this
 X264_DISABLE_ASM_x86 = ""
-DEPENDS_x86 = "yasm-native"
+DEPENDS_append_x86 = "yasm-native"
                         ^
Quoted 1 line

you need a space

You should also be able to use +=, should not you?

Quoted 3 lines

Otherwise looks ok

Quoted 2 lines
recipes/vlc/x264_r2245.bb +0 -0
 EXTRA_OECONF = '--enable-shared ${X264_DISABLE_ASM} --extra-cflags="${X264_ECFLAGS}"'

Thanks,

Paul

#3 lore raw
Quoted 10 lines · Paul Menzel

Am Samstag, den 07.05.2011, 17:59 -0700 schrieb Khem Raj:

Quoted 1 line · Bob Foerster

You can be more specific in the commit summary.

do not override DEPENDS for x86

Quoted 1 line
Quoted 1 line

The recipe intended to add "yasm-native" to the dependencies on x86,

Use present tense. s/intended/intends/

If this is talking about the former, erroneous behaviour (which is corrected by this patch) then the past tense is correct.

Quoted 6 lines
Quoted 4 lines

recipes/vlc/x264_r2245.bb X264_ECFLAGS_mipsel = "-fPIC" · line 26

Quoted 2 lines
recipes/vlc/x264_r2245.bb +1 -1
-DEPENDS_x86 = "yasm-native"
+DEPENDS_append_x86 = "yasm-native"
                         ^

you need a space

You should also be able to use +=, should not you?

No, += doesn't work with overrides. "DEPENDS_x86 +=" would do the same wrong thing as the original "DEPENDS_x86".

p.

#4 lore raw

Am Sonntag, den 08.05.2011, 10:02 +0100 schrieb Phil Blundell:

Quoted 6 lines · Paul Menzel
Quoted 5 lines

Am Samstag, den 07.05.2011, 17:59 -0700 schrieb Khem Raj:

Quoted 1 line · Bob Foerster

You can be more specific in the commit summary.

Quoted 8 lines
Quoted 5 lines

do not override DEPENDS for x86

Quoted 1 line
Quoted 1 line

The recipe intended to add "yasm-native" to the dependencies on x86,

Use present tense. s/intended/intends/

If this is talking about the former, erroneous behaviour (which is corrected by this patch) then the past tense is correct.

I thought in minutes or proceeding always the present tense is used. The recipe behaves incorrectly until the patch is applied. But it is not very important.

Quoted 9 lines
Quoted 6 lines
Quoted 4 lines

recipes/vlc/x264_r2245.bb X264_ECFLAGS_mipsel = "-fPIC" · line 26

Quoted 2 lines
recipes/vlc/x264_r2245.bb +1 -1
-DEPENDS_x86 = "yasm-native"
+DEPENDS_append_x86 = "yasm-native"
                         ^

you need a space

You should also be able to use +=, should not you?

No, += doesn't work with overrides. "DEPENDS_x86 +=" would do the same wrong thing as the original "DEPENDS_x86".

Thank you for the clarification. Is for example RDEPENDS_${PN} also an override? If yes, then looking at

	$ git grep 'DEPENDS_'

returns a lot of incorrect usages.

Thanks,

Paul

#5 lore raw
Quoted 2 lines · Paul Menzel

Thank you for the clarification. Is for example RDEPENDS_${PN} also an override?

Not in the sense I was meaning here, no. (It is true that the ${PN} bit is technically an OVERRIDE, but in most/all cases RDEPENDS_${PN} is effectively a primary variable, i.e. there is no underlying RDEPENDS which it overrides.)

The issue with the "DEPENDS_x86" thing is that, as far as the initial metadata processing is concerned, DEPENDS and DEPENDS_x86 are distinct variables. You might hope that "DEPENDS_x86 += ..." would do a conditional append to DEPENDS, but it doesn't: what happens is that it creates a new variable "DEPENDS_x86" which then replaces the contents of DEPENDS during override processing. So the initial value of ${DEPENDS} is lost rather than being appended to.

This whole issue is basically the whole reason that the "_append" syntax hasn't been deprecated, since we don't currently have any other way to do conditional appending (apart from resorting to python).

Quoted 5 lines

If yes, then looking at

	$ git grep 'DEPENDS_'

returns a lot of incorrect usages.

From a quick glance at that output nothing jumped out at me as being incorrect, but there might well be a few wrong ones in there. This one, for example:

classes/vala.bbclass:DEPENDS_virtclass-native += "vala-native"

looks a bit dubious to me (for the same reasons as above) but without checking the recipe context it's impossible to say whether it's actually wrong or not.

p.

#6 lore raw
In reply to Khem Raj
Quoted 25 lines · Khem Raj
Quoted 18 lines · Bob Foerster

The recipe intended to add "yasm-native" to the dependencies on x86, but it set DEPENDS_x86 = "yasm-native" which obliterated the base dependencies. On a fresh build, this package was failing since it was trying to build before the compiler was ready.

Depends is now set with DEPENDS_append_x86, which leaves the base dependencies intact.

---
 recipes/vlc/x264_r2245.bb |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
recipes/vlc/x264_r2245.bb +0 -0
index 0cffea3..8c2b5b4 100644

recipes/vlc/x264_r2245.bb X264_ECFLAGS_mipsel = "-fPIC" · line 26

Quoted 5 lines
recipes/vlc/x264_r2245.bb +1 -1
@@ -23,7 +23,7 @@ X264_ECFLAGS_mipsel = "-fPIC"
 X264_DISABLE_ASM = "--disable-asm"
 # use assembler written functions for those archs supporting this
 X264_DISABLE_ASM_x86 = ""
-DEPENDS_x86 = "yasm-native"
+DEPENDS_append_x86 = "yasm-native"
                         ^
Quoted 3 lines

you need a space

Oddly, it works without the space. From bitbake -e:
DEPENDS="pkgconfig-native autoconf-native automake-native help2man-native libtool-native libtool-cross gnu-config-native virtual/i486-oe-linux-gcc virtual/libc yasm-native"

Nonetheless, I'll add a space and send a v2.

Quoted 22 lines

Otherwise looks ok

recipes/vlc/x264_r2245.bb X264_ECFLAGS_mipsel = "-fPIC" · line 27

Quoted 2 lines
recipes/vlc/x264_r2245.bb +0 -0
 EXTRA_OECONF = '--enable-shared ${X264_DISABLE_ASM}

--extra-cflags="${X264_ECFLAGS}"'

Quoted 9 lines
recipes/vlc/x264_r2245.bb +0 -1
--

1.7.1

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

--
-Khem

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