patch from Christoph Thiel to make it work on suse 9.3 and to allow for non
authorSeth Vidal <skvidal@linux.duke.edu>
Wed, 2 Nov 2005 20:23:56 +0000 (20:23 +0000)
committerSeth Vidal <skvidal@linux.duke.edu>
Wed, 2 Nov 2005 20:23:56 +0000 (20:23 +0000)
absolute-path cache dirs.

dumpMetadata.py
genpkgmetadata.py

index 5bb717a697dc5d370f71ac4224efb902976809bb..bdd675689ed5d6894f8ed797ca496122cbcc0a45 100644 (file)
@@ -562,7 +562,7 @@ class RpmMetaData:
         if not self.options['cache']:
             return getChecksum(self.options['sumtype'], fo)
         
-        csumtag = '%s-%s' % (self.hdr['name'] , self.hdr['hdrid'])
+        csumtag = '%s-%s' % (self.hdr['name'] , self.hdr[rpm.RPMTAG_SHA1HEADER])
         csumfile = '%s/%s' % (self.options['cachedir'], csumtag)
         if os.path.exists(csumfile):
             csumo = open(csumfile, 'r')
index 5018e4856a98026639b49b2339e0f95ca094adb7..186f9be64ba721a571dc4d6690b1ae626a2be0f2 100755 (executable)
@@ -203,6 +203,8 @@ def parseArgs(args):
                 errorprint(_('This option is deprecated'))
             elif arg in ['-c', '--cachedir']:
                 cmds['cache'] = True
+                if not os.path.isabs(a):
+                   a = os.path.join(os.getcwd(), a)
                 cmds['cachedir'] = a
                 if not checkAndMakeDir(a):
                     errorprint(_('Error: cannot open/write to cache dir %s' % a))