diff options
-rw-r--r-- | BuildManager/package.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/BuildManager/package.py b/BuildManager/package.py index d324453..c3c3efb 100644 --- a/BuildManager/package.py +++ b/BuildManager/package.py @@ -111,7 +111,12 @@ class _package_spec(_package): elif not self.version and lowerline[:8] == "version:": self.version = self._rpm_vars((line[8:]).strip(), defines) elif not self.release and lowerline[:8] == "release:": - self.release = self._rpm_vars((line[8:]).strip(), defines) + rel = self._rpm_vars((line[8:]).strip(), defines) + if rel.startswith("%mkrel"): + p = subprocess.run(["rpm", "--eval", rel], text=True, capture_output=True) + self.release = p.stdout + else: + self.release = rel elif lowerline[:7] == "%define": token = (line[7:]).split() if len(token) == 2: |