createrepo/yumbased.py

[email protected] (Seth Vidal)
Newsgroups gmane.linux.rpm.metadata
Message-ID <[email protected]>
 createrepo/yumbased.py |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 20a4999107bd0493dbd3994d23a60b43a601b1dd
Author: Seth Vidal <[email protected]>
Date:   Fri Jan 11 16:08:51 2008 -0500

    return src for arch when it's a srpm

diff --git a/createrepo/yumbased.py b/createrepo/yumbased.py
index 44352be..db29f94 100644
--- a/createrepo/yumbased.py
+++ b/createrepo/yumbased.py
@@ -38,7 +38,14 @@ class CreateRepoPackage(YumLocalPackage):
         self._hdrstart = None
         self._hdrend = None
         self.xml_node = libxml2.newDoc("1.0")
-                
+        self.arch = self.isSrpm()
+        
+    def isSrpm(self):
+        if self.tagByName('sourcepackage') == 1 or not self.tagByName('sourcerpm'):
+            return 'src'
+        else:
+            return self.tagByName('arch')
+
         
     def _xml(self, item):
         item = utils.utf8String(item)
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.