diff options
Diffstat (limited to 'scripts/lib/devtool')
| -rw-r--r-- | scripts/lib/devtool/standard.py | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py index 13612d64c4..8fb4b934d4 100644 --- a/scripts/lib/devtool/standard.py +++ b/scripts/lib/devtool/standard.py | |||
| @@ -956,6 +956,26 @@ def modify(args, config, basepath, workspace): | |||
| 956 | 956 | ||
| 957 | bb.utils.mkdirhier(os.path.dirname(appendfile)) | 957 | bb.utils.mkdirhier(os.path.dirname(appendfile)) |
| 958 | with open(appendfile, 'w') as f: | 958 | with open(appendfile, 'w') as f: |
| 959 | # if not present, add type=git-dependency to the secondary sources | ||
| 960 | # (non local files) so they can be extracted correctly when building a recipe after | ||
| 961 | # doing a devtool modify on it | ||
| 962 | src_uri = rd.getVar('SRC_URI').split() | ||
| 963 | src_uri_append = [] | ||
| 964 | src_uri_remove = [] | ||
| 965 | |||
| 966 | # Assume first entry is main source extracted in ${S} so skip it | ||
| 967 | src_uri = src_uri[1::] | ||
| 968 | |||
| 969 | #Add "type=git-dependency" to all non local sources | ||
| 970 | for url in src_uri: | ||
| 971 | if not url.startswith('file://') and not 'type=' in url: | ||
| 972 | src_uri_remove.append(url) | ||
| 973 | src_uri_append.append('%s;type=git-dependency' % url) | ||
| 974 | |||
| 975 | if src_uri_remove: | ||
| 976 | f.write('SRC_URI:remove = "%s"\n' % ' '.join(src_uri_remove)) | ||
| 977 | f.write('SRC_URI:append = "%s"\n\n' % ' '.join(src_uri_append)) | ||
| 978 | |||
| 959 | f.write('FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n') | 979 | f.write('FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"\n') |
| 960 | # Local files can be modified/tracked in separate subdir under srctree | 980 | # Local files can be modified/tracked in separate subdir under srctree |
| 961 | # Mostly useful for packages with S != WORKDIR | 981 | # Mostly useful for packages with S != WORKDIR |
