2 commits - createrepo/__init__.py

[email protected]
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
 createrepo/__init__.py |   15 ++++++++-------
 1 file changed, 8 insertions(+), 7 deletions(-)

New commits:
commit 69199d9106f63aeafd5e957390b0472f4d30a0ab
Author: Seth Vidal <[email protected]>
Date:   Tue Feb 3 09:08:25 2009 -0500

    and one more mistake

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 84a4248..970ccb2 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -575,10 +575,11 @@ class MetaDataGenerator:
             self.otherfile.write('\n</otherdata>')
             self.otherfile.close()
 
-        if not self.conf.quiet:
-            self.callback.log(_('Saving delta metadata'))
-        self.deltafile.write('\n</prestodelta>')
-        self.deltafile.close()
+        if self.conf.deltas:
+            if not self.conf.quiet:
+                self.callback.log(_('Saving delta metadata'))
+            self.deltafile.write('\n</prestodelta>')
+            self.deltafile.close()
 
     def _do_delta_rpm_package(self, pkg):
         """makes the drpms, if possible, for this package object.
commit c00a13fe745b029dd789267b7d039000ec25b62d
Author: Seth Vidal <[email protected]>
Date:   Tue Feb 3 09:06:30 2009 -0500

    correct tabbing so createrepo works when you're NOT using deltas

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 2b3acac..84a4248 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -188,9 +188,9 @@ class MetaDataGenerator:
 
         if self.conf.deltas:
             temp_delta = os.path.join(self.conf.outputdir, self.conf.delta_relative)
-        if not checkAndMakeDir(temp_delta):
-            raise MDError, _('Cannot create/verify %s') % temp_delta
-        self.conf.deltadir = temp_delta
+            if not checkAndMakeDir(temp_delta):
+                raise MDError, _('Cannot create/verify %s') % temp_delta
+            self.conf.deltadir = temp_delta
 
         if os.path.exists(os.path.join(self.conf.outputdir, self.conf.olddir)):
             raise MDError, _('Old data directory exists, please remove: %s') % self.conf.olddir
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.