Re: [Rpm-maint] [rpm-software-management/rpm] `%triggerin -- %{name} < %{version}-%{release}` is always triggered on upgrade (#209)

2019-09-30 Thread pavlinamv
Case `%triggerin -- %{name} < 1.0-2.new`: RPM triggers `%triggerin -- %{name} < 1.0-2.new`. It is according to the description in the documentation [1] (_The %triggerin script is also run when your package_ (`baz-1.0-2.new`) _is installed or upgraded, should the target package_

[Rpm-maint] [rpm-software-management/rpm] Add the marker to the appropriate expression error messages (#869)

2019-09-26 Thread pavlinamv
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/869 -- Commit Summary -- * Add the marker to the appropriate expression error messages -- File Changes -- M rpmio/expression.c (15) M tests/rpmmacro.at (2) --

Re: [Rpm-maint] [rpm-software-management/rpm] Add an error message when rpm fails to open a pipe for shell expansion (#862)

2019-09-26 Thread pavlinamv
Commit message is corrected according to @pmatilai's comment. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add an error message when rpm fails to open a pipe for shell expansion (#862)

2019-09-26 Thread pavlinamv
@pavlinamv pushed 1 commit. 75ec68392ece1006f1543bd556f64199257b6b32 Add an error message when rpm fails to open a pipe for shell expansion -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/862/files

Re: [Rpm-maint] [rpm-software-management/rpm] Add an error message when rpm fails to open a pipe for shell expansion (#862)

2019-09-26 Thread pavlinamv
@pavlinamv pushed 1 commit. e2677384cde95e69e14979ccac8936874c376652 Add an error message when rpm fails to open a pipe for shell expansion -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/862/files

Re: [Rpm-maint] [rpm-software-management/rpm] Add an error message when rpm fails to open a pipe for shell expansion (#862)

2019-09-26 Thread pavlinamv
Removed unnecessary "mb->error = 1;" line. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/862#issuecomment-535370536___

Re: [Rpm-maint] [rpm-software-management/rpm] Add an error message when rpm fails to open a pipe for shell expansion (#862)

2019-09-25 Thread pavlinamv
Changed (added the command it's trying to execute and strerror(errno)). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add an error message when rpm fails to open a pipe for shell expansion (#862)

2019-09-25 Thread pavlinamv
@pavlinamv pushed 1 commit. 0226f7c190326c6ab1d7a82f4143fe7e7928192a Add an error message when rpm fails to open a pipe for shell expansion -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/862/files

[Rpm-maint] [rpm-software-management/rpm] Add an error message when rpm fails to open a pipe for shell expansion (#862)

2019-09-25 Thread pavlinamv
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/862 -- Commit Summary -- * Add an error message when rpm fails to open a pipe for shell expansion -- File Changes -- M rpmio/macro.c (1) -- Patch Links --

Re: [Rpm-maint] [rpm-software-management/rpm] Codify built-in macro argument acceptance (#853)

2019-09-24 Thread pavlinamv
The PR looks good to me. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/853#issuecomment-534511744___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Correct description of %verbose and %getconfdir in the macro manual (#856)

2019-09-24 Thread pavlinamv
Pushed. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/856#issuecomment-534511549___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Correct description of %verbose and %getconfdir in the macro manual (#856)

2019-09-24 Thread pavlinamv
@pavlinamv pushed 1 commit. 9ae7eb4858f381cad3925c96a0ec1b4d7d9f36cc Correct description of %verbose and %getconfdir in the macro manual -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/856/files

Re: [Rpm-maint] [rpm-software-management/rpm] Correct description of %verbose and %getconfdir in the macro manual (#856)

2019-09-24 Thread pavlinamv
Changed according to the comment. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/856#issuecomment-534508114___ Rpm-maint

[Rpm-maint] [rpm-software-management/rpm] Correct description of %verbose and %getconfdir in the macro manual (#856)

2019-09-24 Thread pavlinamv
I looked into rpm/doc/manual/macros to check 0 and 1 added into the builtinmacros[] in PR #853. Values added in PR #853 are correct, but description of macros %verbose and %getconfdir in manual is confusing. So that is why I created this PR. You can view, comment on, or merge this pull

Re: [Rpm-maint] [rpm-software-management/rpm] Add 'string' into query format extensions in man-pages (#837)

2019-09-20 Thread pavlinamv
@pavlinamv pushed 1 commit. e9d4397003b99f0636bbaabb6a9b151145680a1e Add 'string' into query format extensions in man-pages -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/837/files

Re: [Rpm-maint] [rpm-software-management/rpm] Add 'string' into query format extensions in man-pages (#837)

2019-09-20 Thread pavlinamv
Mentioning ":string" in that part of man page, will not cause any problems. But if ":string" is not there, it looks like that it is not supported. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Support new %[ ] expression expansion syntax (#846)

2019-09-19 Thread pavlinamv
pavlinamv commented on this pull request. > @@ -1349,6 +1386,13 @@ expandMacro(MacroBuf mb, const char *src, size_t slen) doShellEscape(mb, s, (se - 1 - s)); s = se; continue; + case '[': /* %[...] expression expans

Re: [Rpm-maint] [rpm-software-management/rpm] Support new %[ ] expression expansion syntax (#846)

2019-09-19 Thread pavlinamv
Cool. It would be great to add a testcase. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/846#issuecomment-533026052___

Re: [Rpm-maint] [rpm-software-management/rpm] Add ternary operator support to expression parser (#838)

2019-09-18 Thread pavlinamv
@mlschroe: Thank you. The PR looks good to me. @pmatilai After the mentioned example there is a list of operators that can be used in a condition after ``` %if ``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add ternary operator support to expression parser (#838)

2019-09-18 Thread pavlinamv
Could you change file ``` rpm/doc/manual/spec ``` in section "Conditionals" the text after example: ``` %if 0%{?fedora} > 10 || 0%{?rhel} > 7 ``` according of the PR? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Do not allow to divide by 0 in the expression evaluation (#833)

2019-09-18 Thread pavlinamv
@pavlinamv pushed 1 commit. 8e919739e766840626d17b0891bdc27ac6be776e Prevent dividing by 0 in the expression evaluation -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/833/files

Re: [Rpm-maint] [rpm-software-management/rpm] Add ternary operator support to expression parser (#838)

2019-09-18 Thread pavlinamv
Thank you. It solves the problem. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/838#issuecomment-532561398___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Add 'string' into query format extensions in man-pages (#837)

2019-09-17 Thread pavlinamv
Yes, there is no need to use ":string". But it is supported. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add ternary operator support to expression parser (#838)

2019-09-17 Thread pavlinamv
I think that adding ternary operator support to the expression parser is useful and it will not cause problems in the parsing of the existing expressions. There is one thing that can be improved -cases like: ``` --eval '%{expr: 1 ?}' --eval '%{expr: 0 ? 3 : }' ``` returns an error, but

Re: [Rpm-maint] [rpm-software-management/rpm] expression expansion (#834)

2019-09-16 Thread pavlinamv
@mlschroe: I like this idea. I checked Fedora spec files and there was no conflict with "%[... ]". -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Cannot leave comments after %endif (#829)

2019-09-16 Thread pavlinamv
3. agree with @pmatilai, changelog entries can be without comments. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] Add 'string' into query format extensions in man-pages (#837)

2019-09-14 Thread pavlinamv
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/837 -- Commit Summary -- * Add string into query format extensions in man-pages -- File Changes -- M doc/rpm.8 (3) -- Patch Links --

[Rpm-maint] [rpm-software-management/rpm] Do not allow to divide by 0 in the expression evaluation (#833)

2019-09-10 Thread pavlinamv
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/833 -- Commit Summary -- * Do not allow to divide by 0 in the expression evaluation -- File Changes -- M rpmio/expression.c (4) M tests/rpmmacro.at (2) -- Patch

Re: [Rpm-maint] [rpm-software-management/rpm] Improve description of conditionals + comments in spec documentation (#830)

2019-09-10 Thread pavlinamv
The comments are incorporated in the new version. Thank you for the review. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Improve description of conditionals + comments in spec documentation (#830)

2019-09-10 Thread pavlinamv
@pavlinamv pushed 2 commits. db00406d78149cfaa0e78fea9426d5642bc6a95e Improve description of conditionals in spec documentation c150103aae26475d92ee26d6427a13f9f21890ad Add description of comments in spec documentation -- You are receiving this because you are subscribed to this thread

Re: [Rpm-maint] [rpm-software-management/rpm] Cannot leave comments after %endif (#829)

2019-09-10 Thread pavlinamv
> The constructive solution to the problem would be supporting spec #-comments > at arbitrary positions, just like the shell does. Supporting spec #-comments at arbitrary positions can potentially cause some problems. That is why I looked into spec files and search for occurrences of #. There

Re: [Rpm-maint] [rpm-software-management/rpm] Correct and update Query formats documentation (#827)

2019-09-09 Thread pavlinamv
>>Or just leave them as historical reference for future generations to gape >> at... > I like this option. :) Changed. I leave the original names. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Correct and update Query formats documentation (#827)

2019-09-09 Thread pavlinamv
@pavlinamv pushed 1 commit. 8a1f9ec0f420ba4a5eec64db52c5d86ff6162c03 Correct and update Query formats documentation -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/827/files

Re: [Rpm-maint] [rpm-software-management/rpm] Rip the marker support for multiline %{expr:...} error messages (#828)

2019-09-09 Thread pavlinamv
Corrected according to the review. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/828#issuecomment-52945___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Rip the marker support for multiline %{expr:...} error messages (#828)

2019-09-09 Thread pavlinamv
@pavlinamv pushed 1 commit. 218633033acea714edbbdb6b21a8dba8aa3d39e8 Disable marker on multiline expression error messages -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/828/files

Re: [Rpm-maint] [rpm-software-management/rpm] Correct and update Query formats documentation (#827)

2019-09-09 Thread pavlinamv
Moreover to the described corrections (according to the review) I add an example of example of a query expression. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Correct and update Query formats documentation (#827)

2019-09-09 Thread pavlinamv
@pavlinamv pushed 1 commit. 209faf3a124341c3e26ba811759a09ec89490603 Correct and update Query formats documentation -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/827/files

[Rpm-maint] [rpm-software-management/rpm] Improve description of conditionals + comments in spec documentation (#830)

2019-09-05 Thread pavlinamv
- Improve description of conditionals in spec documentation - Add description of comments in spec documentation You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/830 -- Commit Summary -- * Improve description of conditionals

Re: [Rpm-maint] [rpm-software-management/rpm] Cannot leave comments after %endif (#829)

2019-09-04 Thread pavlinamv
>From Fedora documentation [1]: "_To include comments in the spec file, use a # >character at the start of the line._" So the text "# with foo" in line ```%else # with foo``` is not a valid comment. If you need to use a comment near %else, you can write e.g.: ``` %if %{with foo} ... %else #

Re: [Rpm-maint] [rpm-software-management/rpm] Triple operator for conditional shortcut (#115)

2019-09-04 Thread pavlinamv
I do not see any problem in the syntax that @pmatilai proposed in his previous comment: ```%{()?:}``` There are two similar options that are closer to the currently proposed triple condition operator syntax (#746): ```%{{}?:}``` ```%{{}::}``` Using these syntax the example from the previous

Re: [Rpm-maint] [rpm-software-management/rpm] Rip the marker support for multiline %{expr:...} error messages (#828)

2019-09-03 Thread pavlinamv
Corrected -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/828#issuecomment-527410044___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Rip the marker support for multiline %{expr:...} error messages (#828)

2019-09-03 Thread pavlinamv
@pavlinamv pushed 1 commit. b2260fbae4087f55615219376906d066db7341ee Disable marker on multiline expression error messages -- You are receiving this because you are subscribed to this thread. View it on GitHub: https://github.com/rpm-software-management/rpm/pull/828/files

[Rpm-maint] [rpm-software-management/rpm] Rip the marker support for multiline %{expr:...} error messages (#828)

2019-09-03 Thread pavlinamv
If the expression after %{expr: is mutiline like: %{expr: 0 || 0 || 0 || 0 |o| 0 || 0 || 0 || 0 } then it is better not to support marker pointing to the exact place of the error. You can view, comment on, or merge this pull request online at:

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: Limit build parallelism by available memory too, add tunables (#804) (#821)

2019-08-30 Thread pavlinamv
> Yeah, known. Missing/wrong arguments to built-in macros are wildly > inconsistent in how they behave, some emit errors, some just fail silently > etc. Evidently better way is to emit an error. -- You are receiving this because you are subscribed to this thread. Reply to this email directly

[Rpm-maint] [rpm-software-management/rpm] Correct and update Query formats documentation (#827)

2019-08-30 Thread pavlinamv
- in a majority of examples in manual the text after the --queryformat argument is in double quotes - thus it does not look good to wrote that A query format is passed to RPM after the --queryformat argument, and normally should be enclosed in single quotes. - in case of: rpm -qa -i

Re: [Rpm-maint] [rpm-software-management/rpm] RFC: Limit build parallelism by available memory too, add tunables (#804) (#821)

2019-08-30 Thread pavlinamv
I tested this PR on my laptop. - The expansion of macro %{getmem:virt}" finishes with an error. It is because getmem returns 0. This is caused by the fact that function getmem_virt returns SIZE_MAX. After dividing by 1024^2 it is still to high to fit into return_type of getmem (unsigned int).

Re: [Rpm-maint] [rpm-software-management/rpm] Add builtin macro %undefine_all (#820)

2019-08-22 Thread pavlinamv
> Please, how does it break the stack semantics? I am asking because I think that it is easy to implement such a builtin macro. E.g. popMacro() can be changed such that it returns 1 if an macro was deleted and 0 if no macro was deleted. After that it will be easy to call popMacro() in some

Re: [Rpm-maint] [rpm-software-management/rpm] Add builtin macro %undefine_all (#820)

2019-08-22 Thread pavlinamv
Please, how it breaks the stack semantics? -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/820#issuecomment-523881821___

[Rpm-maint] [rpm-software-management/rpm] Add builtin macro %undefine_all (#820)

2019-08-22 Thread pavlinamv
A builtin macro ```%undefine macro_name``` removes the last defined _'macro_name'_ from defined macros. But it still leaves all older definitions of the macro _'macro_name'_. So as @pmatilai wrote in #115 - "macros stack so undefining doesn't guarantee said macro actually goes away". Thus I

Re: [Rpm-maint] [rpm-software-management/rpm] Triple operator for conditional shortcut (#115)

2019-08-22 Thread pavlinamv
> While we're thinking about extending the conditional macro syntax, here's > another thing to consider: > The current ? test is only for (non-)existence of macro, which is extremely > limiting. We could easily make the spec %if expression parser available to > macro engine, which would give a

Re: [Rpm-maint] [rpm-software-management/rpm] Add %{expr:...} macro for parsing expressions (#817)

2019-08-21 Thread pavlinamv
It is definitely better. I tried a multiline expression: ``` rpm --eval '%{expr: 0 || 0 || 0 || 0 |o| 0}' ``` and **'^'** does not point to the expected position: ``` +error: syntax error while parsing ||: 0 || 0 || + 0 || 0 |o| 0 +error:

Re: [Rpm-maint] [rpm-software-management/rpm] Add %{expr:...} macro for parsing expressions (#817)

2019-08-21 Thread pavlinamv
> The error messages are simply the same as you get from spec %if conditionals, > there are no messages added / changed in this PR. That's not to say the > messages couldn't maybe be improved, but any change needs to account for the > fact that they're shared between two quite different

Re: [Rpm-maint] [rpm-software-management/rpm] Prefer '[] && []' to '[ -a ]' and '[] || []' to '[ -o ]' in tests (#810)

2019-08-20 Thread pavlinamv
The commit message is changed according to the review. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Fix segfault regression on empty script or description at end of spec (#816)

2019-08-16 Thread pavlinamv
The alignment of the commit message is broken otherwise the patch looks perfect. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add %{expr:...} macro for parsing expressions (#817)

2019-08-16 Thread pavlinamv
Functionality is OK, but error messages can be improved. I tried macros: %{expr:0 || b} %{expr:4 &|| 0} %{expr:6 + 9 - o -=iu} in a spec file and error messages were: error: types must match error: syntax error while parsing && error: types must match -- You are receiving this because

Re: [Rpm-maint] [rpm-software-management/rpm] Fix segfault regression on empty script or description at end of spec (#816)

2019-08-16 Thread pavlinamv
The patch is correct. The only thing that I propose to change is to is to refer to the particular commit behind the regression. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Triple operator for conditional shortcut (#115)

2019-08-15 Thread pavlinamv
> Another thing is that this syntax makes it impossible to have colons (':') in > the output (eg '%{!?foo::}'), which is a limitation the original syntax > doesn't have'. It obviously has it's own set of limitations and quirks... Not impossible, but not straightforward. For ':' in the output

[Rpm-maint] [rpm-software-management/rpm] Prefer '[] && []' to '[ -a ]' and '[] || []' to '[ -o ]' in tests (#810)

2019-08-09 Thread pavlinamv
It corrects warnings [SC2166] spotted by covscan: warning: Prefer [ p ] && [ q ] as [ p -a q ] is not well defined. [SC2166] warning: Prefer [ p ] || [ q ] as [ p -o q ] is not well defined. [SC2166] Motivated by last the comment in #802. This should fix all [sc2166] warnings spotted by covscan

Re: [Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)

2019-08-06 Thread pavlinamv
Support for extra spaces is ripped out. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/746#issuecomment-518617194___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)

2019-08-05 Thread pavlinamv
> And how do you're supposed to know which spaces before and after the 0/1 are > intentional or not? This must expand literally to either " 0 " or " 1". According to the specification of triple operator - all spaces - after '%{?!' or '%{?', - before and after ':' that divides the operator and -

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-07-29 Thread pavlinamv
>@pavlinamv So then, how does date in GNU Coreutils do it? rpm task: _input_: time in an arbitrary time zone, the time zone description _result_: the corresponding time in UTC. Command ```date``` _prints_ or _sets_ the system date and time. Neither _printing_, nor _setting_ is so comp

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-07-29 Thread pavlinamv
>There is no reason to break support for this, @Conan-Kudo, @ignatenkobrain: The current situation is: rpm accepts arbitrary text as a time zone description in extended date format. If the time zone description is not "correct" rpm (silently) change it to UTC instead of the given time zone

Re: [Rpm-maint] [rpm-software-management/rpm] Use [ ] and && to avoid sub processes in find-debuginfo.sh (RhBug:172… (#802)

2019-07-29 Thread pavlinamv
The commit message is changed. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/802#issuecomment-515872259___ Rpm-maint mailing

[Rpm-maint] [rpm-software-management/rpm] Use [ ] and && to avoid sub processes in find-debuginfo.sh (RhBug:172… (#802)

2019-07-29 Thread pavlinamv
…0590) Thanks to Florian Festi for spotting this and proposing the solution. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/802 -- Commit Summary -- * Use [ ] and && to avoid sub processes in find-debuginfo.sh

[Rpm-maint] [rpm-software-management/rpm] Test %dnl such that %dnl line contents influences its expansion (#792)

2019-07-15 Thread pavlinamv
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/792 -- Commit Summary -- * Test %dnl such that its contents influences its expansion -- File Changes -- M tests/data/macros.testfile (6) M tests/rpmmacro.at (15)

Re: [Rpm-maint] [rpm-software-management/rpm] Supporting %patch -T option (#788)

2019-07-12 Thread pavlinamv
_The --set-utc (-Z) option causes patch to set a patched file’s modification and access times to the timestamps given in context diff headers._ => behavior of diff file without date header _patch normally refrains from setting a file’s timestamps if the file’s original last-modified timestamp

[Rpm-maint] [rpm-software-management/rpm] Add support for 'patch -Z' (#790)

2019-07-12 Thread pavlinamv
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/790 -- Commit Summary -- * Add support for 'patch -Z' -- File Changes -- M build/parsePrep.c (15) -- Patch Links --

Re: [Rpm-maint] [rpm-software-management/rpm] Add a %cnl (continue next line) marker (#787)

2019-07-11 Thread pavlinamv
I am sorry, but I do not know any way how to do it. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add a %cnl (continue next line) marker (#787)

2019-07-11 Thread pavlinamv
You can use %{shrink:...} this way: ```%global godocs docs examples code-of-conduct.md %{shrink:\``` ``` }README.md``` "godocs" will be defined: ```xdocs examples code-of-conduct.md README.md``` -- You are receiving this because you are subscribed to this thread.

Re: [Rpm-maint] [rpm-software-management/rpm] Describe conditionally expanded macros in manual (#786)

2019-07-11 Thread pavlinamv
Thank you very much. It was mistake. Corrected in the new version. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Unreadable directory causes difficult to debug failure (#776)

2019-07-09 Thread pavlinamv
Closed #776. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/776#event-2469575345___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Unreadable directory causes difficult to debug failure (#776)

2019-07-09 Thread pavlinamv
Fixed in commit 7a227533d1342dccc5b3717554a35dbe2baa9832 -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)

2019-07-09 Thread pavlinamv
> The exact syntax is subject to endless bikeshedding of course, but one thing > that strikes me as just wrong are the surrounding spaces everywhere. There > are no "courtesy spaces" for readability anywhere in rpm macros, I dont think > this should be any different. Here are 2 relevant

Re: [Rpm-maint] [rpm-software-management/rpm] Describe conditionally expanded macros in manual (#786)

2019-07-09 Thread pavlinamv
It is good to have conditionally expanded macros documented in manual before implementing the triple operator for conditional shortcut (#115). Especially because I did not find any documentation describing %{?builtin_macro:value} or the special case %{?load:value}. (See last comment in closed

[Rpm-maint] [rpm-software-management/rpm] Describe conditionally expanded macros in manual (#786)

2019-07-08 Thread pavlinamv
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/786 -- Commit Summary -- * Describe conditionally expanded macros in manual -- File Changes -- M doc/manual/macros (43) -- Patch Links --

Re: [Rpm-maint] [rpm-software-management/rpm] Print newline after "failed to load macro file" error is emitted (#784)

2019-07-08 Thread pavlinamv
E.g. command ```[tester]$ rpm --eval "%{load:xxx}"``` before the patch returns ```error: failed to load macro file xxx[tester]$``` -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

[Rpm-maint] [rpm-software-management/rpm] Print newline after "failed to load macro file" error is emitted (#784)

2019-07-04 Thread pavlinamv
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/784 -- Commit Summary -- * Print newline after "failed to load macro file" error is emitted -- File Changes -- M rpmio/macro.c (2) -- Patch Links --

[Rpm-maint] [rpm-software-management/rpm] Raise an error if reading a file during rpmbuild fails (#776) (#783)

2019-07-04 Thread pavlinamv
In case of #776 the added rpmbuild error looks: error: Can't read content of file: /home/tester/reps/776/zdroj/776/tests/testing/build/BUILDROOT/h-1.0-1.x86_64/etc/foo/bar You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/783

[Rpm-maint] [rpm-software-management/rpm] Parse multiline conditional and %include parameters correctly (#775) (#778)

2019-07-01 Thread pavlinamv
Trailing '\' after multiline conditionals or %include will be trimmed. After the patch lines like: %if 1 && ( 2 || \ 3 ) %endif will be parsed correctly. The other lines stay unchanged. A test is added. You can view, comment on, or merge this pull request online at:

Re: [Rpm-maint] [rpm-software-management/rpm] rpm cannot parse conditional: error: unmatched ( (#775)

2019-06-28 Thread pavlinamv
Thank you -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/issues/775#issuecomment-506709813___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] rpm cannot parse conditional: error: unmatched ( (#775)

2019-06-28 Thread pavlinamv
Please, should the second %if look like this (I added \ at the end of the first line)? %if 1 && ( 2 || \\ 3 ) %endif -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-23 Thread pavlinamv
pavlinamv commented on this pull request. > @@ -178,13 +179,17 @@ static int dateToTimet(const char * datestr, time_t * > secs, int * date_words) if (*secs == -1) goto exit; +if (tzname[1][0] == 0) + rpmlog(RPMLOG_WARNING, _("time zone in %%changelog not in tz da

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-23 Thread pavlinamv
pavlinamv commented on this pull request. > @@ -44,7 +44,8 @@ static int dateToTimet(const char * datestr, time_t * secs, > int * date_words) struct tm time, ntime; const char * const * idx; char *p, *pe, *q, *date, *tz; -char tz_name[10]; /* name of ti

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-14 Thread pavlinamv
pavlinamv commented on this pull request. > @@ -178,13 +179,17 @@ static int dateToTimet(const char * datestr, time_t * > secs, int * date_words) if (*secs == -1) goto exit; +if (tzname[1][0] == 0) + rpmlog(RPMLOG_WARNING, _("bogus TZ database name in %%chang

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-13 Thread pavlinamv
Warning instead of info is emitted (in the latest version). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-13 Thread pavlinamv
Corrected in the latest version. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/739#issuecomment-501619925___ Rpm-maint mailing

[Rpm-maint] [rpm-software-management/rpm] Support triple operator for conditional shortcut (#115) (#746)

2019-06-12 Thread pavlinamv
%{? { macro_name } : true : false } %{? { macro_name } : true } %{?! { macro_name } : false : true } %{?! { macro_name } : false } More detailed description of the notation: * Between the first chars "%{?" resp. "%{!?" or "%{?! there can not be a

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-08 Thread pavlinamv
Panu's comments incorporated. Moreover I think about the problem again. The current implementation does not need further changes, but it needs to correct comments and add an info if the description of time zone is not correct. o the first commit in the PR is omitted and commit "Emit info if

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-06 Thread pavlinamv
pavlinamv commented on this pull request. > @@ -30,10 +30,12 @@ static int sameDate(const struct tm *ot, const struct tm > *nt) ot->tm_wday == nt->tm_wday); } +#define TZ_MAX_LENGTH 80 Thank you. In the new version dynamic allocation is used. -- You are receiving

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-05 Thread pavlinamv
Tests were added. Moreover they already help to show, that exit status 0 is returned when changelog order fails. Thus I add an additional commit that corrects this behaviour (regression). -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view

Re: [Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-05 Thread pavlinamv
@pavlinamv pushed 2 commits. 1b44c113b06574e24ae5cd1e92aa2ae132975081 Return non-zero exit status if changelog order fails e4dc76e450dd0277fe5f15d4b74df3935dc2ae58 Test effects of time zone in chanelog timestamp -- You are receiving this because you are subscribed to this thread. View

[Rpm-maint] [rpm-software-management/rpm] Take changelog timezone in account (RhBug 1715412) (#739)

2019-06-05 Thread pavlinamv
When building RPMs that have %changelog sections with changelog entries with full timestamps, RPM did not take the time zone into account. Now the timezone description is taken into account using function tzset(). It handles correctly timezone descriptions like: "Europe/London", "GMT-5", or

[Rpm-maint] [rpm-software-management/rpm] Fix bogus if-condition in find-debuginfo.sh (#735) (#737)

2019-06-04 Thread pavlinamv
Introduced in commit 1da9e83, spotted by covscan. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/737 -- Commit Summary -- * Fix bogus if-condition in find-debuginfo.sh (#735) -- File Changes -- M

Re: [Rpm-maint] [rpm-software-management/rpm] Implement %elif (#710)

2019-05-23 Thread pavlinamv
Corrected the commit message of the first commit. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/710#issuecomment-495102226___

Re: [Rpm-maint] [rpm-software-management/rpm] Implement %elif (#710)

2019-05-22 Thread pavlinamv
pavlinamv commented on this pull request. > rl->lastConditional = lineType; spec->readStack = rl; spec->line[0] = '\0'; +} else if (lineType->id & (LINE_ELIF | LINE_ELIFARCH | LINE_ELIFOS)) { It is changed in the new version. -- You are receivi

Re: [Rpm-maint] [rpm-software-management/rpm] Implement %elif (#710)

2019-05-22 Thread pavlinamv
Panu's comments are incorporated. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/710#issuecomment-494773665___ Rpm-maint

[Rpm-maint] [rpm-software-management/rpm] Implement %elif (#710)

2019-05-21 Thread pavlinamv
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/710 -- Commit Summary -- * Use already detected line type to identify %if lines * Consolidate %if condition parsing to one place * Make "Bad %if condition" error message

Re: [Rpm-maint] [rpm-software-management/rpm] Warn if %else is after %else (#649)

2019-05-19 Thread pavlinamv
Rebase + fixes are done. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/649#issuecomment-493749504___ Rpm-maint mailing list

[Rpm-maint] [rpm-software-management/rpm] Add documentation for %getncpus macro (#707)

2019-05-16 Thread pavlinamv
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/707 -- Commit Summary -- * Add documentation for %getncpus macro -- File Changes -- M doc/manual/macros (1) -- Patch Links --

Re: [Rpm-maint] [rpm-software-management/rpm] Warn if %else is after %else (#649)

2019-05-16 Thread pavlinamv
Commit message is corrected. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/rpm-software-management/rpm/pull/649#issuecomment-492949023___ Rpm-maint mailing

  1   2   >