Lines Matching refs:file
53 # rpm is used for the per-file dependency identification
102 f: full path to the file/directory match
119 root rather than just the file name
168 for file in files:
169 relpath = os.path.join(walkroot, file).replace(dvar + root + '/', '', 1)
239 PACKAGE_DEPENDS += "file-native"
254 # Get a list of files from file vars by searching files under current working directory
281 bb.warn("FILES contains file '%s' which resides under a "
283 "real path for the file." % f[1:])
330 def checkbuildpath(file, d):
332 with open(file) as f:
348 def source_info(file, d, fatal=True):
351 cmd = ["dwarfsrcfiles", file]
359 …# 255 means a specific file wasn't fully parsed to get the debug file list, which is not a fatal f…
370 def splitdebuginfo(file, dvar, dv, d):
371 # Function to split a single file into two components, one is the stripped
380 src = file[len(dvar):]
385 if file.endswith(".ko") and file.find("/lib/modules/") != -1:
386 if oe.package.is_kernel_module_signed(file):
387 bb.debug(1, "Skip strip on signed module %s" % file)
388 return (file, sources)
390 # Split the file...
392 #bb.note("Split %s -> %s" % (file, debugfile))
399 if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
400 origmode = os.stat(file)[stat.ST_MODE]
402 os.chmod(file, newmode)
406 sources = source_info(file, d)
410 … subprocess.check_output([objcopy, '--only-keep-debug', file, debugfile], stderr=subprocess.STDOUT)
412 # Set the debuglink to have the view of the file path on the target
413 …subprocess.check_output([objcopy, '--add-gnu-debuglink', debugfile, file], stderr=subprocess.STDOU…
416 os.chmod(file, origmode)
418 return (file, sources)
420 def splitstaticdebuginfo(file, dvar, dv, d):
431 src = file[len(dvar):]
436 # Copy the file...
438 #bb.note("Copy %s -> %s" % (file, debugfile))
443 if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
444 origmode = os.stat(file)[stat.ST_MODE]
446 os.chmod(file, newmode)
450 sources = source_info(file, d)
455 shutil.copy2(file, debugfile)
458 os.chmod(file, origmode)
460 return (file, sources)
462 def inject_minidebuginfo(file, dvar, dv, d):
475 src = file[len(dvar):]
484 bb.debug(1, 'ELF file {} has no debuginfo, skipping minidebuginfo injection'.format(file))
495 … bb.debug(1, 'ELF file {} is not executable/shared, skipping minidebuginfo injection'.format(file))
521 …for line in subprocess.check_output([nm, '-D', file, '--format=posix', '--defined-only'], universa…
540 … bb.debug(1, 'ELF file {} contains no symbols, skipping minidebuginfo injection'.format(file))
552 …bprocess.check_call([objcopy, '--add-section', '.gnu_debugdata={}.xz'.format(minidebugfile), file])
762 bb.fatal("Can NOT get PRAUTO from lockdown exported file")
884 # the fs-perms.txt file
901 # fs_perms_entry.fmode = expected file mode or None
902 # fs_perms_entry.fuid = expected file uid or -1
903 # fs_perms_entry_fgid = expected file gid or -1
1119 if d.getVar('PACKAGE_DEBUG_SPLIT_STYLE') == 'debug-file-directory':
1120 # Single debug-file-directory style debug info
1194 file = os.path.join(root, f)
1197 if dv["append"] and file.endswith(dv["append"]):
1199 if dv["dir"] and dv["dir"] in os.path.dirname(file[len(dvar):]):
1202 if file in skipfiles:
1205 if oe.package.is_static_lib(file):
1206 staticlibs.append(file)
1210 ltarget = cpath.realpath(file, dvar, False)
1223 or ((file.startswith(libdir) or file.startswith(baselibdir)) \
1227 if cpath.islink(file):
1228 checkelflinks[file] = ltarget
1232 checkelf[file] = (file, file_reference)
1238 for file in checkelflinks:
1239 ltarget = checkelflinks[file]
1240 # If it's a symlink, and points to an ELF file, we capture the readlink target
1242 target = os.readlink(file)
1244 symlinks[file] = target
1248 # Sort results by file path. This ensures that the files are always
1253 for (file, elf_file) in results:
1254 # It's a file (or hardlink), not a link
1259 … bb.note("Skipping file %s from %s for already-stripped QA test" % (file[len(dvar):], pn))
1261 …le '%s' from %s was already stripped, this will prevent future debugging!" % (file[len(dvar):], pn)
1265 # At this point we have an unstripped elf file. We need to:
1266 … # a) Make sure any file we strip is not hardlinked to anything else outside this tree
1267 # b) Only strip any hardlinked file once (no races)
1268 … # c) Track any hardlinks between files so that we can reconstruct matching debug file hardlinks
1271 file_reference = checkelf[file][1]
1273 os.unlink(file)
1274 os.link(inodes[file_reference][0], file)
1275 inodes[file_reference].append(file)
1277 inodes[file_reference] = [file]
1279 bb.utils.break_hardlinks(file)
1280 elffiles[file] = elf_file
1281 # Modified the file so clear the cache
1282 cpath.updatecache(file)
1302 for file in staticlibs:
1303 results.append( (file,source_info(file, d)) )
1317 for file in inodes[ref][1:]:
1318 src = file[len(dvar):]
1323 # Only one hardlink of separated debug info file in each directory
1329 for file in symlinks:
1330 src = file[len(dvar):]
1342 ltarget = symlinks[file]
1368 for file in elffiles:
1369 elf_file = int(elffiles[file])
1370 #bb.note("Strip %s" % file)
1371 sfiles.append((file, elf_file, strip))
1406 # doesn't exist and add the source file contents to the source package.
1466 for file in files:
1467 if (not cpath.islink(file)) and (not cpath.exists(file)):
1469 if file in seen:
1471 seen.append(file)
1495 if cpath.isdir(file) and not cpath.islink(file):
1496 mkdir_recurse(dvar, root, file)
1499 mkdir_recurse(dvar, root, os.path.dirname(file))
1500 fpath = os.path.join(root,file)
1501 if not cpath.islink(file):
1502 os.link(file, fpath)
1504 ret = bb.utils.copyfile(file, fpath)
1509 for file in symlink_paths:
1510 if not os.path.exists(os.path.join(root,file)):
1515 (file, pkg))
1806 # FILERPROVIDES:filepath:pkg - per file dep
1809 # FILERDEPENDS:filepath:pkg - per file dep
1844 for file in sorted(provides):
1845 provides_files[pkg].append(file)
1846 key = "FILERPROVIDES:" + file + ":" + pkg
1847 d.appendVar(key, " " + " ".join(provides[file]))
1849 for file in sorted(requires):
1850 requires_files[pkg].append(file)
1851 key = "FILERDEPENDS:" + file + ":" + pkg
1852 d.appendVar(key, " " + " ".join(requires[file]))
1903 def linux_so(file, pkg, pkgver, d):
1908 ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '')
1909 cmd = d.getVar('OBJDUMP') + " -p " + pipes.quote(file) + " 2>/dev/null"
1924 needed.add((dep, file, rpath))
1934 if libdir_re.match(os.path.dirname(file)):
1936 if needs_ldconfig and snap_symlinks and (os.path.basename(file) != this_soname):
1937 renames.append((file, os.path.join(os.path.dirname(file), this_soname)))
1940 def darwin_so(file, needed, sonames, renames, pkgver):
1941 if not os.path.exists(file):
1943 ldir = os.path.dirname(file).replace(pkgdest + "/" + pkg, '')
1958 …if (file.endswith('.dylib') or file.endswith('.so')) and not pkg.endswith('-dev') and not pkg.ends…
1960 name = os.path.basename(file).rsplit(".",1)[0]
1967 if file.endswith('.dylib') or file.endswith('.so'):
1969 …p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-l', file], stdout=subprocess.PIPE, stderr…
1978 …p = subprocess.Popen([d.expand("${HOST_PREFIX}otool"), '-L', file], stdout=subprocess.PIPE, stderr…
1986 if "is not an object file" in l:
1990 needed[pkg].add((name, file, tuple()))
1992 def mingw_dll(file, needed, sonames, renames, pkgver):
1993 if not os.path.exists(file):
1996 if file.endswith(".dll"):
1998 …sonames.add((os.path.basename(file), os.path.dirname(file).replace(pkgdest + "/" + pkg, ''), pkgve…
2000 if (file.endswith(".dll") or file.endswith(".exe")):
2002 …p = subprocess.Popen([d.expand("${HOST_PREFIX}objdump"), "-p", file], stdout=subprocess.PIPE, stde…
2009 needed[pkg].add((dllname, file, tuple()))
2036 for file in pkgfiles[pkg]:
2038 if cpath.islink(file):
2041 darwin_so(file, needed, sonames, renames, pkgver)
2043 mingw_dll(file, needed, sonames, renames, pkgver)
2044 elif os.access(file, os.X_OK) or lib_re.match(file):
2045 linuxlist.append(file)
2170 for file in sorted(pkgfiles[pkg]):
2171 m = pc_re.match(file)
2176 if not os.access(file, os.R_OK):
2178 with open(file, 'r') as f:
2205 for file in sorted(os.listdir(dir)):
2206 m = re.match(r'^(.*)\.pclist$', file)
2209 with open(os.path.join(dir, file)) as fd:
2507 for file in files:
2508 pkgfiles[pkg].append(walkroot + os.sep + file)