diff options
| author | Ola x Nilsson <ola.x.nilsson@axis.com> | 2019-10-21 12:30:29 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-10-23 16:30:36 +0100 |
| commit | f3f15972494efad3688236d868d1b3eda2877207 (patch) | |
| tree | 61dae468aa793795f097b2f94abbd755ec7bcf6e /meta | |
| parent | 3af1c66939a678d8b66db604bf9850bf735267e7 (diff) | |
| download | poky-f3f15972494efad3688236d868d1b3eda2877207.tar.gz | |
lib/oe/package_manager: Use with to control file handle lifetime
(From OE-Core rev: e3e86d6683e305865c9fd171c6081aec037d9870)
Signed-off-by: Ola x Nilsson <olani@axis.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
| -rw-r--r-- | meta/lib/oe/package_manager.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/meta/lib/oe/package_manager.py b/meta/lib/oe/package_manager.py index 7c373715ad..c841fdbf29 100644 --- a/meta/lib/oe/package_manager.py +++ b/meta/lib/oe/package_manager.py | |||
| @@ -298,7 +298,7 @@ class DpkgIndexer(Indexer): | |||
| 298 | release.write("Label: %s\n" % arch) | 298 | release.write("Label: %s\n" % arch) |
| 299 | 299 | ||
| 300 | cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive | 300 | cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive |
| 301 | 301 | ||
| 302 | index_cmds.append(cmd) | 302 | index_cmds.append(cmd) |
| 303 | 303 | ||
| 304 | deb_dirs_found = True | 304 | deb_dirs_found = True |
| @@ -655,7 +655,7 @@ def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencie | |||
| 655 | pn = d.getVar("PN") | 655 | pn = d.getVar("PN") |
| 656 | seendirs = set() | 656 | seendirs = set() |
| 657 | multilibs = {} | 657 | multilibs = {} |
| 658 | 658 | ||
| 659 | bb.utils.remove(subrepo_dir, recurse=True) | 659 | bb.utils.remove(subrepo_dir, recurse=True) |
| 660 | bb.utils.mkdirhier(subrepo_dir) | 660 | bb.utils.mkdirhier(subrepo_dir) |
| 661 | 661 | ||
| @@ -1006,8 +1006,8 @@ class RpmPM(PackageManager): | |||
| 1006 | def load_old_install_solution(self): | 1006 | def load_old_install_solution(self): |
| 1007 | if not os.path.exists(self.solution_manifest): | 1007 | if not os.path.exists(self.solution_manifest): |
| 1008 | return [] | 1008 | return [] |
| 1009 | 1009 | with open(self.solution_manifest, 'r') as fd: | |
| 1010 | return open(self.solution_manifest, 'r').read().split() | 1010 | return fd.read().split() |
| 1011 | 1011 | ||
| 1012 | def _script_num_prefix(self, path): | 1012 | def _script_num_prefix(self, path): |
| 1013 | files = os.listdir(path) | 1013 | files = os.listdir(path) |
