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}??:
#Getjusttheoutput,thensplititby??,grabthefirstandsplit#againtogetverandrelfirst_line_output=output.split('??')[0]parts=first_line_output.split()iflen(parts)!=4:raiserpkgError('Could not get n-v-r-e from %r'% first_line_output)(self._module_name_spec,self._epoch,self._ver,self._rel)=parts
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.
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.