diff options
author | Peter Kjellerstedt <peter.kjellerstedt@axis.com> | 2023-11-21 03:09:51 +0100 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-11-23 12:06:06 +0000 |
commit | 2a2320001e2f4700d144d4c3bc914f8d4f68904d (patch) | |
tree | 92b96041a9fb6d0be58e097c5f31f8f663fb6cff /bitbake/lib/bb/cache.py | |
parent | 02c2d31d4d842cd8247cc36abb4342514cfc3302 (diff) | |
download | poky-2a2320001e2f4700d144d4c3bc914f8d4f68904d.tar.gz |
bitbake: cache: Simplify virtualfn2realfn()
Also correct the description of variant2virtual().
(Bitbake rev: d766e9bd22ec6392fbf1694eea5032b9d09f1949)
Signed-off-by: Peter Kjellerstedt <peter.kjellerstedt@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/lib/bb/cache.py')
-rw-r--r-- | bitbake/lib/bb/cache.py | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/bitbake/lib/bb/cache.py b/bitbake/lib/bb/cache.py index 5ea41c5de0..18d5574a31 100644 --- a/bitbake/lib/bb/cache.py +++ b/bitbake/lib/bb/cache.py | |||
@@ -344,9 +344,7 @@ def virtualfn2realfn(virtualfn): | |||
344 | """ | 344 | """ |
345 | mc = "" | 345 | mc = "" |
346 | if virtualfn.startswith('mc:') and virtualfn.count(':') >= 2: | 346 | if virtualfn.startswith('mc:') and virtualfn.count(':') >= 2: |
347 | elems = virtualfn.split(':') | 347 | (_, mc, virtualfn) = virtualfn.split(':', 2) |
348 | mc = elems[1] | ||
349 | virtualfn = ":".join(elems[2:]) | ||
350 | 348 | ||
351 | fn = virtualfn | 349 | fn = virtualfn |
352 | cls = "" | 350 | cls = "" |
@@ -369,7 +367,7 @@ def realfn2virtual(realfn, cls, mc): | |||
369 | 367 | ||
370 | def variant2virtual(realfn, variant): | 368 | def variant2virtual(realfn, variant): |
371 | """ | 369 | """ |
372 | Convert a real filename + the associated subclass keyword to a virtual filename | 370 | Convert a real filename + a variant to a virtual filename |
373 | """ | 371 | """ |
374 | if variant == "": | 372 | if variant == "": |
375 | return realfn | 373 | return realfn |