diff options
| -rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 4 | ||||
| -rw-r--r-- | bitbake/lib/bb/tests/fetch.py | 5 |
2 files changed, 8 insertions, 1 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index ac557176d7..cd7dc4f132 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
| @@ -1235,7 +1235,9 @@ def get_checksum_file_list(d): | |||
| 1235 | if os.path.exists(f): | 1235 | if os.path.exists(f): |
| 1236 | bb.warn("Getting checksum for %s SRC_URI entry %s: file not found except in DL_DIR" % (d.getVar('PN'), os.path.basename(f))) | 1236 | bb.warn("Getting checksum for %s SRC_URI entry %s: file not found except in DL_DIR" % (d.getVar('PN'), os.path.basename(f))) |
| 1237 | else: | 1237 | else: |
| 1238 | bb.warn("Unable to get checksum for %s SRC_URI entry %s: file could not be found" % (d.getVar('PN'), os.path.basename(f))) | 1238 | bb.fatal(("Unable to get checksum for %s SRC_URI entry %s: file could not be found" |
| 1239 | "\nThe following paths were searched:" | ||
| 1240 | "\n%s") % (d.getVar('PN'), os.path.basename(f), '\n'.join(paths))) | ||
| 1239 | filelist.append(f + ":" + str(os.path.exists(f))) | 1241 | filelist.append(f + ":" + str(os.path.exists(f))) |
| 1240 | 1242 | ||
| 1241 | return " ".join(filelist) | 1243 | return " ".join(filelist) |
diff --git a/bitbake/lib/bb/tests/fetch.py b/bitbake/lib/bb/tests/fetch.py index ee41bff43e..20d7953f35 100644 --- a/bitbake/lib/bb/tests/fetch.py +++ b/bitbake/lib/bb/tests/fetch.py | |||
| @@ -693,6 +693,11 @@ class FetcherLocalTest(FetcherTest): | |||
| 693 | flst.sort() | 693 | flst.sort() |
| 694 | return flst | 694 | return flst |
| 695 | 695 | ||
| 696 | def test_local_checksum_fails_no_file(self): | ||
| 697 | self.d.setVar("SRC_URI", "file://404") | ||
| 698 | with self.assertRaises(bb.BBHandledException): | ||
| 699 | bb.fetch.get_checksum_file_list(self.d) | ||
| 700 | |||
| 696 | def test_local(self): | 701 | def test_local(self): |
| 697 | tree = self.fetchUnpack(['file://a', 'file://dir/c']) | 702 | tree = self.fetchUnpack(['file://a', 'file://dir/c']) |
| 698 | self.assertEqual(tree, ['a', 'dir/c']) | 703 | self.assertEqual(tree, ['a', 'dir/c']) |
