From 8ca17966d912f8f22d30bab217d085ec7f275adf Mon Sep 17 00:00:00 2001 From: Dennis Gilmore Date: Sun, 1 Aug 2010 18:13:01 -0500 Subject: set the loacl rpms macros to match whats set in olpc-release, fedora-release and redhat-release. fixes a bug on local rpm creation --- src/pyfedpkg/__init__.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/pyfedpkg/__init__.py b/src/pyfedpkg/__init__.py index 8cbbec9..1889837 100644 --- a/src/pyfedpkg/__init__.py +++ b/src/pyfedpkg/__init__.py @@ -725,18 +725,21 @@ class PackageModule: if self.branch.startswith('f'): self.distval = self.branch.split('f')[1] self.distvar = 'fedora' + self.distshort = 'fc%s' % self.distval self.dist = '.fc%s' % self.distval self.target = 'dist-f%s-updates-candidate' % self.distval self.mockconfig = 'fedora-%s-%s' % (self.distval, self.localarch) elif self.branch.startswith('el'): self.distval = self.branch.split('el')[1] - self.distvar = 'epel' + self.distvar = 'rhel' + self.distshort = 'el%s' % self.distval self.dist = '.el%s' % self.distval self.target = 'dist-%sE-epel-testing-candidate' % self.distval self.mockconfig = 'epel-%s-%s' % (self.distval, self.localarch) elif self.branch.startswith('olpc'): self.distval = self.branch.split('olpc')[1] self.distvar = 'olpc' + self.distshort = 'olpc%s' % self.distval self.dist = '.olpc%s' % self.distval self.target = 'dist-olpc%s' % self.distval # If we don't match one of the above, assume master or a branch of @@ -754,7 +757,7 @@ class PackageModule: "--define '_rpmdir %s'" % path, "--define 'dist %s'" % self.dist, "--define '%s %s'" % (self.distvar, self.distval), - "--define '%s 1'" % self.distvar] + "--define '%s 1'" % self.distshort] self.ver = self.getver() self.rel = self.getrel() -- cgit