mirror of
https://git.yoctoproject.org/git/opkg-utils
synced 2026-03-21 09:11:28 +01:00
opkg.py: fix write_package when called from main test
* there is no self.meta_dir before self._setup_scratch_area * control file needs to be closed before packing it with tar, otherwise it could be empty Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
This commit is contained in:
committed by
Richard Purdie
parent
2bb6037ead
commit
c30dcd27d4
8
opkg.py
8
opkg.py
@@ -344,11 +344,11 @@ class Package:
|
||||
return self.file_ext_opk
|
||||
|
||||
def write_package(self, dirname):
|
||||
buf = self.render_control()
|
||||
file = open("%s/control" % self.meta_dir, 'w')
|
||||
file.write(buf)
|
||||
|
||||
self._setup_scratch_area()
|
||||
file = open("%s/control" % self.meta_dir, 'w')
|
||||
file.write(str(self))
|
||||
file.close()
|
||||
|
||||
cmd = "cd %s ; tar cvfz %s/control.tar.gz control" % (self.meta_dir,
|
||||
self.scratch_dir)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user