summaryrefslogtreecommitdiffstats
path: root/scripts/lib/recipetool/append.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/lib/recipetool/append.py')
-rw-r--r--scripts/lib/recipetool/append.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/scripts/lib/recipetool/append.py b/scripts/lib/recipetool/append.py
index 3e85a0cb0f..def4f9027c 100644
--- a/scripts/lib/recipetool/append.py
+++ b/scripts/lib/recipetool/append.py
@@ -48,7 +48,7 @@ def find_target_file(targetpath, d, pkglist=None):
48 """Find the recipe installing the specified target path, optionally limited to a select list of packages""" 48 """Find the recipe installing the specified target path, optionally limited to a select list of packages"""
49 import json 49 import json
50 50
51 pkgdata_dir = d.getVar('PKGDATA_DIR', True) 51 pkgdata_dir = d.getVar('PKGDATA_DIR')
52 52
53 # The mix between /etc and ${sysconfdir} here may look odd, but it is just 53 # The mix between /etc and ${sysconfdir} here may look odd, but it is just
54 # being consistent with usage elsewhere 54 # being consistent with usage elsewhere
@@ -110,8 +110,8 @@ def determine_file_source(targetpath, rd):
110 import oe.recipeutils 110 import oe.recipeutils
111 111
112 # See if it's in do_install for the recipe 112 # See if it's in do_install for the recipe
113 workdir = rd.getVar('WORKDIR', True) 113 workdir = rd.getVar('WORKDIR')
114 src_uri = rd.getVar('SRC_URI', True) 114 src_uri = rd.getVar('SRC_URI')
115 srcfile = '' 115 srcfile = ''
116 modpatches = [] 116 modpatches = []
117 elements = check_do_install(rd, targetpath) 117 elements = check_do_install(rd, targetpath)
@@ -190,7 +190,7 @@ def get_source_path(cmdelements):
190 190
191def get_func_deps(func, d): 191def get_func_deps(func, d):
192 """Find the function dependencies of a shell function""" 192 """Find the function dependencies of a shell function"""
193 deps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func, True)) 193 deps = bb.codeparser.ShellParser(func, logger).parse_shell(d.getVar(func))
194 deps |= set((d.getVarFlag(func, "vardeps", True) or "").split()) 194 deps |= set((d.getVarFlag(func, "vardeps", True) or "").split())
195 funcdeps = [] 195 funcdeps = []
196 for dep in deps: 196 for dep in deps:
@@ -200,12 +200,12 @@ def get_func_deps(func, d):
200 200
201def check_do_install(rd, targetpath): 201def check_do_install(rd, targetpath):
202 """Look at do_install for a command that installs/copies the specified target path""" 202 """Look at do_install for a command that installs/copies the specified target path"""
203 instpath = os.path.abspath(os.path.join(rd.getVar('D', True), targetpath.lstrip('/'))) 203 instpath = os.path.abspath(os.path.join(rd.getVar('D'), targetpath.lstrip('/')))
204 do_install = rd.getVar('do_install', True) 204 do_install = rd.getVar('do_install')
205 # Handle where do_install calls other functions (somewhat crudely, but good enough for this purpose) 205 # Handle where do_install calls other functions (somewhat crudely, but good enough for this purpose)
206 deps = get_func_deps('do_install', rd) 206 deps = get_func_deps('do_install', rd)
207 for dep in deps: 207 for dep in deps:
208 do_install = do_install.replace(dep, rd.getVar(dep, True)) 208 do_install = do_install.replace(dep, rd.getVar(dep))
209 209
210 # Look backwards through do_install as we want to catch where a later line (perhaps 210 # Look backwards through do_install as we want to catch where a later line (perhaps
211 # from a bbappend) is writing over the top 211 # from a bbappend) is writing over the top
@@ -322,12 +322,12 @@ def appendfile(args):
322def appendsrc(args, files, rd, extralines=None): 322def appendsrc(args, files, rd, extralines=None):
323 import oe.recipeutils 323 import oe.recipeutils
324 324
325 srcdir = rd.getVar('S', True) 325 srcdir = rd.getVar('S')
326 workdir = rd.getVar('WORKDIR', True) 326 workdir = rd.getVar('WORKDIR')
327 327
328 import bb.fetch 328 import bb.fetch
329 simplified = {} 329 simplified = {}
330 src_uri = rd.getVar('SRC_URI', True).split() 330 src_uri = rd.getVar('SRC_URI').split()
331 for uri in src_uri: 331 for uri in src_uri:
332 if uri.endswith(';'): 332 if uri.endswith(';'):
333 uri = uri[:-1] 333 uri = uri[:-1]
@@ -340,7 +340,7 @@ def appendsrc(args, files, rd, extralines=None):
340 for newfile, srcfile in files.items(): 340 for newfile, srcfile in files.items():
341 src_destdir = os.path.dirname(srcfile) 341 src_destdir = os.path.dirname(srcfile)
342 if not args.use_workdir: 342 if not args.use_workdir:
343 if rd.getVar('S', True) == rd.getVar('STAGING_KERNEL_DIR', True): 343 if rd.getVar('S') == rd.getVar('STAGING_KERNEL_DIR'):
344 srcdir = os.path.join(workdir, 'git') 344 srcdir = os.path.join(workdir, 'git')
345 if not bb.data.inherits_class('kernel-yocto', rd): 345 if not bb.data.inherits_class('kernel-yocto', rd):
346 logger.warn('S == STAGING_KERNEL_DIR and non-kernel-yocto, unable to determine path to srcdir, defaulting to ${WORKDIR}/git') 346 logger.warn('S == STAGING_KERNEL_DIR and non-kernel-yocto, unable to determine path to srcdir, defaulting to ${WORKDIR}/git')