summaryrefslogtreecommitdiffstats
path: root/bitbake
diff options
context:
space:
mode:
authorMatt Madison <matt@madison.systems>2016-08-21 08:02:46 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2016-08-25 22:53:43 +0100
commitc22293622dd80fc9cdd49e96c52357c65fa3e9ef (patch)
tree865384744697814630ba103fdd791e130dada120 /bitbake
parent970ff6c0fd7dfce2f309fc46b0879b8e927774b9 (diff)
downloadpoky-c22293622dd80fc9cdd49e96c52357c65fa3e9ef.tar.gz
bitbake: fetch2: clean up remaining cwd saves/changes
Now that the fetchers all preserve the current working directory, the cwd changes in the try_mirror_url, download, and checkstatus methods are no longer needed. (Bitbake rev: 0ed8975c42718342a104a9764a58816f964ec4ea) Signed-off-by: Matt Madison <matt@madison.systems> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake')
-rw-r--r--bitbake/lib/bb/fetch2/__init__.py11
1 files changed, 0 insertions, 11 deletions
diff --git a/bitbake/lib/bb/fetch2/__init__.py b/bitbake/lib/bb/fetch2/__init__.py
index 7a3eb3c5ab..65c426f8fb 100644
--- a/bitbake/lib/bb/fetch2/__init__.py
+++ b/bitbake/lib/bb/fetch2/__init__.py
@@ -935,8 +935,6 @@ def try_mirror_url(fetch, origud, ud, ld, check = False):
935 return found 935 return found
936 return False 936 return False
937 937
938 os.chdir(ld.getVar("DL_DIR", True))
939
940 if not verify_donestamp(ud, ld, origud) or ud.method.need_update(ud, ld): 938 if not verify_donestamp(ud, ld, origud) or ud.method.need_update(ud, ld):
941 ud.method.download(ud, ld) 939 ud.method.download(ud, ld)
942 if hasattr(ud.method,"build_mirror_data"): 940 if hasattr(ud.method,"build_mirror_data"):
@@ -1553,8 +1551,6 @@ class Fetch(object):
1553 network = self.d.getVar("BB_NO_NETWORK", True) 1551 network = self.d.getVar("BB_NO_NETWORK", True)
1554 premirroronly = (self.d.getVar("BB_FETCH_PREMIRRORONLY", True) == "1") 1552 premirroronly = (self.d.getVar("BB_FETCH_PREMIRRORONLY", True) == "1")
1555 1553
1556 save_cwd = os.getcwd()
1557
1558 for u in urls: 1554 for u in urls:
1559 ud = self.ud[u] 1555 ud = self.ud[u]
1560 ud.setup_localpath(self.d) 1556 ud.setup_localpath(self.d)
@@ -1577,8 +1573,6 @@ class Fetch(object):
1577 if premirroronly: 1573 if premirroronly:
1578 self.d.setVar("BB_NO_NETWORK", "1") 1574 self.d.setVar("BB_NO_NETWORK", "1")
1579 1575
1580 os.chdir(self.d.getVar("DL_DIR", True))
1581
1582 firsterr = None 1576 firsterr = None
1583 verified_stamp = verify_donestamp(ud, self.d) 1577 verified_stamp = verify_donestamp(ud, self.d)
1584 if not localpath and (not verified_stamp or m.need_update(ud, self.d)): 1578 if not localpath and (not verified_stamp or m.need_update(ud, self.d)):
@@ -1629,7 +1623,6 @@ class Fetch(object):
1629 raise 1623 raise
1630 1624
1631 finally: 1625 finally:
1632 os.chdir(save_cwd)
1633 if ud.lockfile: 1626 if ud.lockfile:
1634 bb.utils.unlockfile(lf) 1627 bb.utils.unlockfile(lf)
1635 1628
@@ -1638,8 +1631,6 @@ class Fetch(object):
1638 Check all urls exist upstream 1631 Check all urls exist upstream
1639 """ 1632 """
1640 1633
1641 save_cwd = os.getcwd()
1642
1643 if not urls: 1634 if not urls:
1644 urls = self.urls 1635 urls = self.urls
1645 1636
@@ -1663,8 +1654,6 @@ class Fetch(object):
1663 if not ret: 1654 if not ret:
1664 raise FetchError("URL %s doesn't work" % u, u) 1655 raise FetchError("URL %s doesn't work" % u, u)
1665 1656
1666 os.chdir(save_cwd)
1667
1668 def unpack(self, root, urls=None): 1657 def unpack(self, root, urls=None):
1669 """ 1658 """
1670 Check all urls exist upstream 1659 Check all urls exist upstream