[dak/master] remove the release file before generating the new one

View: New views
1 Messages — Rating Filter:   Alert me  

[dak/master] remove the release file before generating the new one

by Mark Hymers-3 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Signed-off-by: Mark Hymers <mhy@...>
---
 daklib/dbconn.py |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)

diff --git a/daklib/dbconn.py b/daklib/dbconn.py
index c7c1476..c29040a 100644
--- a/daklib/dbconn.py
+++ b/daklib/dbconn.py
@@ -514,6 +514,14 @@ class BuildQueue(object):
             bname = os.path.basename(self.path)
             os.chdir(self.path)
             os.chdir('..')
+
+            # We have to remove the Release file otherwise it'll be included in the
+            # new one
+            try:
+                os.unlink(os.path.join(bname, 'Release'))
+            except OSError:
+                pass
+
             os.system("""apt-ftparchive -qq -o APT::FTPArchive::Release::Origin="%s" -o APT::FTPArchive::Release::Label="%s" -o APT::FTPArchive::Release::Description="%s" -o APT::FTPArchive::Release::Architectures="%s" release %s > Release""" % (self.origin, self.label, self.releasedescription, arches, bname))
 
             # Sign if necessary
--
1.6.3.3


--
To UNSUBSCRIBE, email to debian-dak-request@...
with a subject of "unsubscribe". Trouble? Contact listmaster@...