]> git.ipfire.org Git - thirdparty/openembedded/openembedded-core-contrib.git/commit
recipetool: create: fix name/version extraction from filename
authorPaul Eggleton <paul.eggleton@linux.intel.com>
Sun, 18 Sep 2016 20:08:06 +0000 (08:08 +1200)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 20 Sep 2016 14:11:07 +0000 (15:11 +0100)
commite30276cb185b5b4448628b39fbbd533abbb0f94e
tree1515436b7929cb5975bfb441d984b88b9ebd934c
parent9aa1cf3a28eab3420e15f14daba7cf3b8c484a6d
recipetool: create: fix name/version extraction from filename

I ran into an example where recipetool was getting the name/version
completely wrong:

https://bitbucket.org/sortsmill/libunicodenames/downloads/libunicodenames-1.1.0_beta1.tar.xz

>From this it would create a libunicodenames-1.1.0-beta1_1.1.0-beta1.bb
file (likely because it couldn't split the file name and therefore took
all of it, then got the version from one of the files inside the
tarball). When this happens it's just irritating because you then have
to delete the recipe / run devtool reset and then run recipetool create
/ devtool add again and specify the version manually.

This patch is the result of systematically running the
determine_from_filename() function over the files on the Yocto Project
source mirror and my local downloads directory and fixing as many of the
generic issues as reasonably practical - it now gets the name and
version correct much more often. There are still cases where it won't,
but they are now in the minority.

(From OE-Core rev: 7b018b1d493a8d10fd02b8cc220990b191c87fe5)

Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/recipetool/create.py