diff options
author | Patrick Vacek <patrickvacek@gmail.com> | 2018-05-25 12:16:46 +0200 |
---|---|---|
committer | Patrick Vacek <patrickvacek@gmail.com> | 2018-05-28 13:19:44 +0200 |
commit | 39665ee8c87853f93d56c56754470261a0d19d1d (patch) | |
tree | e96b6abe8625bb653a93013066f974dcc39cafd0 /scripts/find_packages.py | |
parent | 79f5e6ade9e4a9f9438077ba71610bf3f54afd9b (diff) | |
download | meta-updater-39665ee8c87853f93d56c56754470261a0d19d1d.tar.gz |
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.
Diffstat (limited to 'scripts/find_packages.py')
-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') |