diff options
-rw-r--r-- | scripts/lib/devtool/upgrade.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/lib/devtool/upgrade.py b/scripts/lib/devtool/upgrade.py index 680cbf132d..a085f78c43 100644 --- a/scripts/lib/devtool/upgrade.py +++ b/scripts/lib/devtool/upgrade.py @@ -145,7 +145,15 @@ def _get_uri(rd): srcuris = rd.getVar('SRC_URI', True).split() if not len(srcuris): raise DevtoolError('SRC_URI not found on recipe') - srcuri = srcuris[0] # it is assumed, URI is at first position + # Get first non-local entry in SRC_URI - usually by convention it's + # the first entry, but not always! + srcuri = None + for entry in srcuris: + if not entry.startswith('file://'): + srcuri = entry + break + if not srcuri: + raise DevtoolError('Unable to find non-local entry in SRC_URI') srcrev = '${AUTOREV}' if '://' in srcuri: # Fetch a URL |