From 7566e913f9804ef59f93430295dd4b28470bd063 Mon Sep 17 00:00:00 2001 From: Alec Leamas Date: Aug 19 2013 06:42:31 +0000 Subject: spec_file: Handle %file -n %{name} properly. Old code did not expand the macro. Spotted in mhash (fc20). also, old code gives errors when conditionals in %files line. Spotted in many packages e. g. system-config-network --- diff --git a/src/FedoraReview/spec_file.py b/src/FedoraReview/spec_file.py index c4e2aed..d0bec69 100644 --- a/src/FedoraReview/spec_file.py +++ b/src/FedoraReview/spec_file.py @@ -137,6 +137,7 @@ class SpecFile(object): def _parse_files_pkg_name(self, line): ''' Figure out the package name in a %files line. ''' + line = rpm.expandMacro(line) tokens = line.split() assert tokens.pop(0) == '%files' while tokens: