#63 misc fixes
Merged 2 months ago by ignatenkobrain. Opened 2 months ago by nim.
rpms/ nim/redhat-rpm-config more-fixes  into  master

file modified
+5 -1

@@ -154,7 +154,11 @@ 

          wl = bad

        end

        if (pos == 0) then

-         advance = string.gsub(word, "^(%s*).*", "%1")

+         advance, n = string.gsub(word, "^(%s*– ).*", "%1")

+         if (n == 0) then

+           advance = string.gsub(word, "^(%s*).*", "%1")

+         end

+         advance = string.gsub(advance, "– ", "  ")

          pos = pos + wl

        elseif  (pos + wl < 81) then

          pos = pos + wl

file modified
+2 -2

@@ -12,9 +12,9 @@ 

  # Arguments passed to the macro without flags will be interpreted as inclusion

  # globs.

  %listfiles(i:x:) %{expand:

- %if "%{?-i*}%{expand:?listfiles_include}%*" != ""

+ %if %{lua: print(string.len(rpm.expand("%{?-i*}%{?listfiles_include}%*")))}

    listfiles_include=$(realpath -e --relative-base=. %{?-i*} %{?listfiles_include} %* | sort -u)

-   %if "%{?-x*}%{expand:?listfiles_exclude}" != ""

+   %if  %{lua: print(string.len(rpm.expand("%{?-x*}%{?listfiles_exclude}")))}

      while IFS= read -r finc ; do

        realpath -qe --relative-base=. %{?-x*} %{?listfiles_exclude} \\

          | sort -u | grep -q "${finc}" || echo "${finc}"

file modified
+6 -1

@@ -6,7 +6,7 @@ 

  

  Summary: Red Hat specific rpm configuration files

  Name: redhat-rpm-config

- Version: 136

+ Version: 137

  Release: 1%{?dist}

  # No version specified.

  License: GPL+

@@ -202,6 +202,11 @@ 

  %{_rpmconfigdir}/macros.d/macros.kmp

  

  %changelog

+ * Mon Jul 08 2019 Nicolas Mailhot <nim@fedoraproject.org> - 137-1

+ - listfiles: make it robust against all kinds of “interesting” inputs

+ - wordwrap: make list indenting smarter, to produce something with enough

+   structure that it can be converted into AppStream metadata

+ 

  * Mon Jul 08 2019 Robert-André Mauchin <zebob.m@gmail.com> - 136-1

  - Revert "Fix expansion in listfiles_exclude/listfiles_include"

  

– re-fix listfiles (previous fix was correct but not robust WRT multiline input variables)
– tweak wordwrap (as in PR61, because when I do multiple PRs the spec version bump collides)

Yes I've just tested locally and it seems to work.

Pull-Request has been merged by ignatenkobrain

2 months ago