| |
@@ -690,7 +690,7 @@
|
| |
# We make sure there is a space at the end of our query so that
|
| |
# we can split it later. When there are subpackages, we get a
|
| |
# listing for each subpackage. We only care about the first.
|
| |
- cmd.extend(['-q', '--qf', '"%{NAME} %{EPOCH} %{VERSION} %{RELEASE}??"',
|
| |
+ cmd.extend(['-q', '--qf', '"??%{NAME} %{EPOCH} %{VERSION} %{RELEASE}??"',
|
| |
'--specfile', '"%s"' % os.path.join(self.path, self.spec)])
|
| |
joined_cmd = ' '.join(cmd)
|
| |
try:
|
| |
@@ -712,7 +712,7 @@
|
| |
self.log.error(err)
|
| |
# Get just the output, then split it by ??, grab the first and split
|
| |
# again to get ver and rel
|
| |
- first_line_output = output.split('??')[0]
|
| |
+ first_line_output = output.split('??')[1]
|
| |
parts = first_line_output.split()
|
| |
if len(parts) != 4:
|
| |
raise rpkgError('Could not get n-v-r-e from %r'
|
| |
Signed-off-by: Robert-André Mauchin zebob.m@gmail.com
If the rpm build process output some text (like with rpm.expand("%{echo:Some text}") notably used in the new Go packaging), the following code in load_nameverrel grabs the RPM output before %{NAME} %{EPOCH} %{VERSION} %{RELEASE}??:
output.split('??')[0] does not then contain the 4 parts variables and thus fails.
This patch simply add a split point ?? before %{NAME} %{EPOCH} %{VERSION} %{RELEASE} to separate the RPM output from the rest and then grab the second split instead of the first.