diff options
| -rwxr-xr-x | scripts/find_packages.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/scripts/find_packages.py b/scripts/find_packages.py index f3b3a85..ddd9034 100755 --- a/scripts/find_packages.py +++ b/scripts/find_packages.py | |||
| @@ -4,9 +4,10 @@ import os.path | |||
| 4 | import sys | 4 | import sys |
| 5 | 5 | ||
| 6 | scripts_path = os.path.dirname(os.path.realpath(__file__)) | 6 | scripts_path = os.path.dirname(os.path.realpath(__file__)) |
| 7 | lib_path = os.path.abspath(scripts_path + '/../../poky/bitbake/lib') | 7 | bb_lib_path = os.path.abspath(scripts_path + '/../../poky/bitbake/lib') |
| 8 | sys.path = sys.path + [lib_path] | 8 | sys.path = sys.path + [bb_lib_path] |
| 9 | 9 | ||
| 10 | import bb.fetch2 | ||
| 10 | import bb.tinfoil | 11 | import bb.tinfoil |
| 11 | 12 | ||
| 12 | 13 | ||
| @@ -46,8 +47,14 @@ def print_deps(tinfoil, abcd_file, rn): | |||
| 46 | abcd_file.write(' homepage_url: "%s"\n' % homepage) | 47 | abcd_file.write(' homepage_url: "%s"\n' % homepage) |
| 47 | abcd_file.write(' source_artifact:\n') | 48 | abcd_file.write(' source_artifact:\n') |
| 48 | for src in src_uri: | 49 | for src in src_uri: |
| 49 | # TODO: Get full path of patches? | 50 | if src[0:7] == 'file://': |
| 50 | abcd_file.write(' - "%s"\n' % src) | 51 | # TODO: Get full path of patches and other files within the source |
| 52 | # repo, not just the filesystem? | ||
| 53 | fetch = bb.fetch2.Fetch([], data) | ||
| 54 | local = fetch.localpath(src) | ||
| 55 | abcd_file.write(' - "%s"\n' % local) | ||
| 56 | else: | ||
| 57 | abcd_file.write(' - "%s"\n' % src) | ||
| 51 | # TODO: Check more than the first and not just git | 58 | # TODO: Check more than the first and not just git |
| 52 | if src_uri and 'git' in src_uri[0]: | 59 | if src_uri and 'git' in src_uri[0]: |
| 53 | abcd_file.write(' vcs:\n') | 60 | abcd_file.write(' vcs:\n') |
