mirror of
https://git.yoctoproject.org/poky
synced 2026-05-08 17:19:20 +00:00
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>
This commit is contained in:
committed by
Richard Purdie
parent
3af1c66939
commit
f3f1597249
@@ -298,7 +298,7 @@ class DpkgIndexer(Indexer):
|
||||
release.write("Label: %s\n" % arch)
|
||||
|
||||
cmd += "PSEUDO_UNLOAD=1 %s release . >> Release" % apt_ftparchive
|
||||
|
||||
|
||||
index_cmds.append(cmd)
|
||||
|
||||
deb_dirs_found = True
|
||||
@@ -655,7 +655,7 @@ def create_packages_dir(d, subrepo_dir, deploydir, taskname, filterbydependencie
|
||||
pn = d.getVar("PN")
|
||||
seendirs = set()
|
||||
multilibs = {}
|
||||
|
||||
|
||||
bb.utils.remove(subrepo_dir, recurse=True)
|
||||
bb.utils.mkdirhier(subrepo_dir)
|
||||
|
||||
@@ -1006,8 +1006,8 @@ class RpmPM(PackageManager):
|
||||
def load_old_install_solution(self):
|
||||
if not os.path.exists(self.solution_manifest):
|
||||
return []
|
||||
|
||||
return open(self.solution_manifest, 'r').read().split()
|
||||
with open(self.solution_manifest, 'r') as fd:
|
||||
return fd.read().split()
|
||||
|
||||
def _script_num_prefix(self, path):
|
||||
files = os.listdir(path)
|
||||
|
||||
Reference in New Issue
Block a user