sclorg / rpm-list-builder

RPM List Builder helps you to build a list of defined RPM packages including Software Collection from the recipe file
GNU General Public License v2.0
4 stars 8 forks source link

Bogusly edited spec #109

Open hroncok opened 6 years ago

hroncok commented 6 years ago

https://src.fedoraproject.org/rpms/python-pyquery @ 53427c

    - python-pyquery:
        replaced_macros:
          with_tests: 0
$ diff -u python-pyquery.spec.orig python-pyquery.spec
--- python-pyquery.spec.orig    2018-05-29 20:09:05.370166519 +0200
+++ python-pyquery.spec 2018-05-29 21:26:46.873034057 +0200
@@ -1,8 +1,9 @@
+# Edited by rpmlb
 %if 0%{?fedora} || 0%{?rhel} > 7
 %global with_python3 1
 %endif
 %global real_name pyquery
-%global with_tests 1
+%global with_tests 0

 Name:           python-%{real_name}
 Version:        1.3.0
@@ -31,8 +32,7 @@
 BuildRequires:  python2-webtest
 %endif

-%global _description\
-python-pyquery allows you to make jQuery queries on XML documents. The API is\
+%global _description\ python-pyquery allows you to make jQuery queries on XML documents. The API is\
 as much as possible the similar to jQuery. python-pyquery uses lxml for fast\
 XML and HTML manipulation.
khardix commented 6 years ago

The culprit is probably this line: https://github.com/sclorg/rpm-list-builder/blob/7af5e1fa20938ea5cdca592d1a9d137f287fe6f0/rpmlb/builder/base.py#L21

This part of regex matches any non-whitespace character as macro name, which is wrong -- we should at least add the character \ here.

But since the macro in question should not be touched at all, the first fix should probably be in the replace_macros method -- adjust just the macros in replaced_macros dictionary, leave others as they were.

hroncok commented 6 years ago

So basically we should do both.