generic-poky/bitbake/lib
Ulf Magnusson c3f630df52 bitbake: bitbake: fetch2: Make SRCREV_FORMAT name substitution safer
The implementation of SRCREV_FORMAT has at least two issues:

 1. Given two names "foo" and "foobar" and SRCREV_FORMAT = "foo_foobar",
    "foo" might currently get substituted twice, and "foobar" not at
    all.

 2. If the revision substitued for some name happens to contain another
    name as a substring, then that substring might incorrectly get
    replaced.

Fix both issues by sorting the names with the longest ones first and
replacing all names at once with a regular expression. This was inspired
by
http://stackoverflow.com/questions/6116978/python-replace-multiple-strings.

(Bitbake rev: 8e6a893cb7f13ea14051fc40c6c9baf41aa47fee)

Signed-off-by: Ulf Magnusson <ulfalizer@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2016-09-15 12:15:07 +01:00
..
bb bitbake: bitbake: fetch2: Make SRCREV_FORMAT name substitution safer 2016-09-15 12:15:07 +01:00
bblayers bitbake: bitbake: Initial multi-config support 2016-08-18 10:06:27 +01:00
bs4 bitbake: bitbake/bs4: Upgrade 4.3.2 -> 4.4.1 (python 3 version) 2016-06-02 08:24:02 +01:00
ply bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
progressbar bitbake: lib: implement basic task progress support 2016-07-08 09:57:26 +01:00
prserv bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
toaster bitbake: toaster: orm Update IMAGE_FSTYPES values 2016-09-08 00:33:47 +01:00
codegen.py bitbake: bitbake: Convert to python 3 2016-06-02 08:24:02 +01:00
pyinotify.py bitbake: bitbake/pyinotify.py: Upgrade to py3 version 2016-06-02 08:24:02 +01:00