find_packages.py: Get full path for patches and other local files.
It might be even better to get the path relative to the root of the repo
the files live in, but this is at least a step in the right direction.
@@ -4,9 +4,10 @@ import os.path
import sys
scripts_path = os.path.dirname(os.path.realpath(__file__))
-lib_path = os.path.abspath(scripts_path + '/../../poky/bitbake/lib')
-sys.path = sys.path + [lib_path]
+bb_lib_path = os.path.abspath(scripts_path + '/../../poky/bitbake/lib')
+sys.path = sys.path + [bb_lib_path]
+import bb.fetch2
import bb.tinfoil
@@ -46,7 +47,13 @@ def print_deps(tinfoil, abcd_file, rn):
abcd_file.write(' homepage_url: "%s"\n' % homepage)
abcd_file.write(' source_artifact:\n')
for src in src_uri:
- # TODO: Get full path of patches?
+ if src[0:7] == 'file://':
+ # TODO: Get full path of patches and other files within the source
+ # repo, not just the filesystem?
+ fetch = bb.fetch2.Fetch([], data)
+ local = fetch.localpath(src)
+ abcd_file.write(' - "%s"\n' % local)
+ else:
abcd_file.write(' - "%s"\n' % src)
# TODO: Check more than the first and not just git
if src_uri and 'git' in src_uri[0]:
