[oe] [PATCH 1/2] source-checker: usability tweaks

Chris Larson clarson at kergoth.com
Mon Jun 29 14:38:05 UTC 2009


On Mon, Jun 29, 2009 at 3:04 AM, Marcin
Juszkiewicz<marcin at juszkiewicz.com.pl> wrote:
> Dnia sobota, 27 czerwca 2009 o 23:29:38 Michael Smith napisał(a):
>
>> checksum sorter, source checker:
>
>> exit(1) on failure;
>
> OK with it
>
>> send usage to stderr;
>
> NACK - most of tools which I use use stdout for --help/usage stuff.
>
>> make executable
>
> OK
>
>> checksum sorter:
>
>> read from stdin if no arg;
>
> OK
>
>> accept --inplace option to read and write from the same file.
>
> Idea nice but:
>
> 12:00 hrw at home:openembedded$ contrib/source-checker/oe-checksums-
> sorter.py -i conf/checksums.ini
> Traceback (most recent call last):
>  File "contrib/source-checker/oe-checksums-sorter.py", line 104, in
> <module>
>    os.rename(outfn, args[0])
> OSError: [Errno 18] Invalid cross-device link
>
> /tmp/ is tmpfs, /home/ is ext3 and Python documentation says "The
> operation may fail on some Unix flavors if src and dst are on different
> filesystems".

This should be using shutil.move(), which knows to use rename when
possible and copy/unlink when not.
-- 
Chris Larson
clarson at kergoth dot com
clarson at mvista dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Software Engineer
MontaVista Software, Inc.




More information about the Openembedded-devel mailing list