[oe] [RFC] patch file location

Frans Meulenbroeks fransmeulenbroeks at gmail.com
Tue Jun 22 08:03:16 UTC 2010


2010/6/22 Marcin Juszkiewicz <marcin at juszkiewicz.com.pl>:
> Dnia wtorek, 22 czerwca 2010 o 09:03:43 Frans Meulenbroeks napisał(a):
>> I'd like to draw the attention to the location of patch files.
>> My original understanding was that these should be in either the files
>> dir (if they apply to all), or in a dir with the name of the recipe
>> (replacing the _ with a - ).
>>
>> And I kind-a assumed that if a patch is in a recipe dir it would have
>> priority above a version in the files dir.
>
> This is controlled by FILESPATHPKG and OVERRIDES.
>
>> Frankly speaking I have no clue at all which version of the patch will
>> be used by the 2.10.1 recipe.
>
> glibc-2.4/ one - check FILESPATHPKG setting in glibc_2.10.1.bb recipe.
>
>> The only ways to find out is to study the class code that does the patch or
>> to actually build the package (in the hope it selects the patch in a
>> deterministic way).
>
> I did "grep FILES glibc/*" to find out.
>
>> I don't think it is good that if someone is debugging a problem that they
>> should have such a hard time to find out what version of a file is
>> actually used
>
>> My proposal:
>> - only apply patches (seek for patches) in the recipe dir (e.g. in the
>> example for glibc_2.10.1.bb this would be glibc-2.10.1) and in the
>> files directory
>
> It is not only patches. It is everything in SRC_URI. And we have this
> mechanism since beginning.
>
>> (optionally we might allow for a mechanism that allows specifying
>> patches for higher level recipes; e.g. glibc_2.10.1 could look in
>> glibc-2.10.1, glibc-2.10, glibc-2, glibc and files).
>
> We have such mechanism already - it is FILESPATHPKG and related vars.
>
>> How do people feel about this? Any implementation hints?
>
> Why implement when it is already implemented?
>

hrw thanks for your clarification.
Guess the confusion is caused because FILESPATHPKG does not seem to be
documented, so I was unaware of its existence and meaning.

http://docs.openembedded.org/usermanual/html/recipes_directories.html#recipes_filespath_dir
does not mention it but does explain the standard structure.
Guess something could be added there

BTW: I feel referring to patches in dirs of other versions (like
2.10.1 referring to 2.4) is not too clear and somewhat more
error-prone, and should be discouraged.

Did a quick grep. On 47 places there is a FILESPATHPKG.
Some just do things like: :FILESPATHPKG .= ":gcc-$PV (actually
shouldn't that be gcc-${PV} )
That might be added to the default search path.

(actually even found a forward reference:
recipes/gcc/gcc-4.1.0.inc:FILESPATHPKG .= ":gcc-4.1.1") :-)

Frans.




More information about the Openembedded-devel mailing list