blob: 029ccc48ad02a4cf43cd6d504ac2c299e9aa98dc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
From: Martin Jansa <Martin.Jansa@gmail.com>
Date: Thu, 29 Mar 2012 22:47:50 +0200
Subject: [PATCH] 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>
---
opkg.py | 6 +++---
1 file 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)
|