%prep section in spec files was used as a %pre section. This commit
correct this issue.
Signed-off-by: Kévin THIERRY <kevin.thierry@open.eurogiciel.org>
'''
Return the list of pre script section of the spec file.
get_section_key() can't be used in this case since it will also
- return the %preun results.
+ return the %preun and %prep results.
'''
res_script_section = []
for section_key in self.__spect_dico.keys():
- if section_key.startswith("%pre") and not section_key.startswith("%preun"):
+ if section_key.startswith("%pre") and \
+ not section_key.startswith("%preun") and \
+ not section_key.startswith("%prep"):
res_script_section.append(section_key)
return res_script_section