mirror of
https://git.yoctoproject.org/poky
synced 2026-04-20 23:39:22 +00:00
devtool: split out function for naming bbappend
We're repeating this in a couple of places, so we might as well have a function to do it. (From OE-Core rev: 67a28109a1ee1383d1b17a8dafa4fe510948238b) Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
6acbdc9cf1
commit
2074654423
@@ -22,6 +22,7 @@ import os
|
||||
import sys
|
||||
import subprocess
|
||||
import logging
|
||||
import re
|
||||
|
||||
logger = logging.getLogger('devtool')
|
||||
|
||||
@@ -199,3 +200,17 @@ def setup_git_repo(repodir, version, devbranch, basetag='devtool-base'):
|
||||
|
||||
bb.process.run('git checkout -b %s' % devbranch, cwd=repodir)
|
||||
bb.process.run('git tag -f %s' % basetag, cwd=repodir)
|
||||
|
||||
def recipe_to_append(recipefile, config, wildcard=False):
|
||||
"""
|
||||
Convert a recipe file to a bbappend file path within the workspace.
|
||||
NOTE: if the bbappend already exists, you should be using
|
||||
workspace[args.recipename]['bbappend'] instead of calling this
|
||||
function.
|
||||
"""
|
||||
appendname = os.path.splitext(os.path.basename(recipefile))[0]
|
||||
if wildcard:
|
||||
appendname = re.sub(r'_.*', '_%', appendname)
|
||||
appendpath = os.path.join(config.workspace_path, 'appends')
|
||||
appendfile = os.path.join(appendpath, appendname + '.bbappend')
|
||||
return appendfile
|
||||
|
||||
Reference in New Issue
Block a user