diff options
Diffstat (limited to 'bitbake/lib/bb/fetch2/__init__.py')
-rw-r--r-- | bitbake/lib/bb/fetch2/__init__.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py index eb112f069d..756f60212f 100644 --- a/bitbake/lib/bb/fetch2/__init__.py +++ b/bitbake/lib/bb/fetch2/__init__.py | |||
@@ -1617,6 +1617,13 @@ class FetchMethod(object): | |||
1617 | return True | 1617 | return True |
1618 | return False | 1618 | return False |
1619 | 1619 | ||
1620 | def implicit_urldata(self, ud, d): | ||
1621 | """ | ||
1622 | Get a list of FetchData objects for any implicit URLs that will also | ||
1623 | be downloaded when we fetch the given URL. | ||
1624 | """ | ||
1625 | return [] | ||
1626 | |||
1620 | class Fetch(object): | 1627 | class Fetch(object): |
1621 | def __init__(self, urls, d, cache = True, localonly = False, connection_cache = None): | 1628 | def __init__(self, urls, d, cache = True, localonly = False, connection_cache = None): |
1622 | if localonly and cache: | 1629 | if localonly and cache: |
@@ -1842,6 +1849,24 @@ class Fetch(object): | |||
1842 | if ud.lockfile: | 1849 | if ud.lockfile: |
1843 | bb.utils.unlockfile(lf) | 1850 | bb.utils.unlockfile(lf) |
1844 | 1851 | ||
1852 | def expanded_urldata(self, urls=None): | ||
1853 | """ | ||
1854 | Get an expanded list of FetchData objects covering both the given | ||
1855 | URLS and any additional implicit URLs that are added automatically by | ||
1856 | the appropriate FetchMethod. | ||
1857 | """ | ||
1858 | |||
1859 | if not urls: | ||
1860 | urls = self.urls | ||
1861 | |||
1862 | urldata = [] | ||
1863 | for url in urls: | ||
1864 | ud = self.ud[url] | ||
1865 | urldata.append(ud) | ||
1866 | urldata += ud.method.implicit_urldata(ud, self.d) | ||
1867 | |||
1868 | return urldata | ||
1869 | |||
1845 | class FetchConnectionCache(object): | 1870 | class FetchConnectionCache(object): |
1846 | """ | 1871 | """ |
1847 | A class which represents an container for socket connections. | 1872 | A class which represents an container for socket connections. |