| |
@@ -657,7 +657,8 @@
|
| |
self.section_changelog = defaultChangelogFormat%(version, release)
|
| |
|
| |
def get_base_dir(self):
|
| |
- return "test-rpmbuild-%s-%s-%s"%(self.name, self.version, self.release)
|
| |
+ # replace %'s in the directory name, so that macros don't confuse rpmbuild
|
| |
+ return ("test-rpmbuild-%s-%s-%s"%(self.name, self.version, self.release)).replace('%', '_')
|
| |
|
| |
def get_subpackage_names(self):
|
| |
"""
|
| |
@@ -1839,6 +1840,11 @@
|
| |
srpmHdr = self.rpmbuild.get_built_srpm_header()
|
| |
self.assertEquals(3, srpmHdr[rpm.RPMTAG_EPOCH])
|
| |
|
| |
+ def test_dist_tag(self):
|
| |
+ """Ensuring that macros in the NVR work"""
|
| |
+ self.rpmbuild.release = '1%{?dist}'
|
| |
+ self.rpmbuild.make()
|
| |
+
|
| |
|
| |
class YumRepoBuildTests(unittest.TestCase):
|
| |
def assert_is_dir(self, dirname):
|
| |
Macros in the base directory name cause trouble, since rpmfluff does not
expand macros when creating the base directory, but rpmbuild will expand
macros provided in arguments. Remove any % characters to keep things
consistent.