[yocto] [opkg-utils][PATCH 20/22] opkg.py: fix write_package when called from main test
Martin Jansa
martin.jansa at gmail.com
Thu Mar 29 15:22:54 PDT 2012
* 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 at gmail.com>
---
opkg.py | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/opkg.py b/opkg.py
index 9daff9e..ad3a695 100644
--- a/opkg.py
+++ b/opkg.py
@@ -344,11 +344,11 @@ class Package:
return self.file_ext_opk
def write_package(self, dirname):
- buf = self.render_control()
+ self._setup_scratch_area()
file = open("%s/control" % self.meta_dir, 'w')
- file.write(buf)
+ file.write(str(self))
+ file.close()
- self._setup_scratch_area()
cmd = "cd %s ; tar cvfz %s/control.tar.gz control" % (self.meta_dir,
self.scratch_dir)
--
1.7.8.5
More information about the yocto
mailing list