[OE-core] [PATCH] package.bbclass: search for dangling links in installation directory

Enrico Scholz enrico.scholz at sigma-chemnitz.de
Mon Oct 29 15:20:56 UTC 2012


Phil Blundell <philb-mXXj517/zsQ at public.gmane.org> writes:

>> >> +                # make path absolute; do not use os.path.join() here
>> >> +                # because target might start with multiple '/'
>> >> +                rtarget = inst_root + target
>> >
>> > I think you can use the join()
> ...
> You somehow chopped off the important part of Chris's text.  What he
> actually wrote was "... the join() which is in the oe python package",
> which is not the same as os.path.join.  
>
> As the comment says, it is...
>
>     """Like os.path.join but doesn't treat absolute RHS specially"""

ah ok... I misread 'oe' and 'os'... It is probably not the best idea, to
use such similar names for functions with a so much different semantik.

But there are no reasons to use one of these functions.  Beside the
design error of handling absolute paths specially, the purpose of
'os.path.join' is to concatenate paths with the correct delimiter ('/'
vs. '\').

But because RHS is guaranteed to be absolute in this case, they can be
joined directly.


Enrico




More information about the Openembedded-core mailing list