Re: [Rpm-maint] [rpm-software-management/rpm] rpmbuild generates srpm with invalid spec file name (#1386)

2020-10-08 Thread Panu Matilainen
Thanks for reporting, we'll look into it. -- 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/1386#issuecomment-705979947___

Re: [Rpm-maint] [rpm-software-management/rpm] Improve version support in expressions (#1388)

2020-10-08 Thread Panu Matilainen
Merged #1388 into master. -- 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/1388#event-3858526116___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Improve version support in expressions (#1388)

2020-10-08 Thread Panu Matilainen
@pmatilai approved this pull request. Nice, thanks! -- 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 Fseek for offset > 2GiB (#1381)

2020-10-08 Thread Panu Matilainen
@pmatilai approved this pull request. Third time the charm... Thanks for the patch and perseverance! :sweat_smile: -- 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 Fseek for offset > 2GiB (#1381)

2020-10-08 Thread malmond77
@malmond77 pushed 1 commit. 7ae16d6bd37abdcc0430fbb1b25a0f821a60c234 Make fdSeek return 0 on success, -1 on error -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)

2020-10-08 Thread malmond77
@malmond77 commented on this pull request. > @@ -382,7 +382,7 @@ static ssize_t fdWrite(FDSTACK_t fps, const void * buf, > size_t count) static int fdSeek(FDSTACK_t fps, off_t pos, int whence) { -return lseek(fps->fdno, pos, whence); +return (lseek(fps->fdno, pos, whence)) == -1 ?

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: pass parametric macro options and arguments to Lua natively (#1092)

2020-10-08 Thread Panu Matilainen
Oh, looking closer: > @nim-nim wrote > [...] > exist because nil is not the same as false or empty Yes, nil is not same as empty. It however very explicitly is same as false, quoting https://www.lua.org/manual/5.4/manual.html#2.1: > Both nil and false make a condition false; they are

Re: [Rpm-maint] [rpm-software-management/rpm] Merge from rpm-software-management/rpm (#1389)

2020-10-08 Thread Mario Blättermann
Closed #1389. -- 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/1389#event-3855269660___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Merge from rpm-software-management/rpm (#1389)

2020-10-08 Thread Mario Blättermann
Sorry for the blurb, this was unintended -- 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/1389#issuecomment-705546522___

[Rpm-maint] [rpm-software-management/rpm] Merge from rpm-software-management/rpm (#1389)

2020-10-08 Thread Mario Blättermann
You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/1389 -- Commit Summary -- * Remove headers from man pages to get po4a working * Add po4a subdirectory for man page translations * Fix headers of man page po files *

[Rpm-maint] [rpm-software-management/rpm] Improve version support in expressions (#1388)

2020-10-08 Thread Michael Schroeder
Add stringification for versions and error out for arithmetic operations. You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/1388 -- Commit Summary -- * Support stringification of versions in the expression parser * Add

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: pass parametric macro options and arguments to Lua natively (#1092)

2020-10-08 Thread Panu Matilainen
And none of us here would have the slightest clue as to what those fragments are supposed to be doing and in what context. As I'm sure you know perfectly well, the devil is in the details. If you're not interested in testing and reviewing *this* implementation that's fine, just don't come

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: pass parametric macro options and arguments to Lua natively (#1092)

2020-10-08 Thread Miro Hrončok
I assume option without argument would be true while option with argument would be string with its value? -- 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] Tag documentation updates (#1387)

2020-10-08 Thread Panu Matilainen
Organize the stuff a little and fill in blanks You can view, comment on, or merge this pull request online at: https://github.com/rpm-software-management/rpm/pull/1387 -- Commit Summary -- * Fix RPMTAG_SUGGESTVERSION and -FLAGS info, theyre not extensions * Organize tag documentation to

[Rpm-maint] [rpm-software-management/rpm] rpmbuild generates srpm with invalid spec file name (#1386)

2020-10-08 Thread Cole Robinson
@ignatenkobrain I bisected an rpmbuild regression to commit acf5e00281d73a2f8034091241c7b0e2ba00e383 Before: ```console $ ./rpmbuild -ts ~/src/python-bugzilla/dist/python-bugzilla-3.0.1.tar.gz && rpm -qlp /home/crobinso/rpmbuild/SRPMS/python-bugzilla-3.0.1-1.fc33.src.rpm Wrote:

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: pass parametric macro options and arguments to Lua natively (#1092)

2020-10-08 Thread nim-nim
https://src.fedoraproject.org/rpms/redhat-rpm-config/blob/master/f/common.lua#_30 exists because nil is not the same as false lua-side. And no I don’t remember out of hand all the problems it fixed. I definitely *do* *not* want to remember them. Debugging the corner cases induced by the

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: pass parametric macro options and arguments to Lua natively (#1092)

2020-10-08 Thread Panu Matilainen
@nim-nim, if there's a concrete problem with how testing for option presence is handled here, lets hear it out. To me it seems to work exactly like one would expect it to, but sorry ponies not included. -- You are receiving this because you are subscribed to this thread. Reply to this email

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: pass parametric macro options and arguments to Lua natively (#1092)

2020-10-08 Thread nim-nim
@pmatilai given lua was added as a macro language because the built-in constructs were driving everyone crazy as soon as you needed some non-trivial processing I don’t find this argument too convincing :) Anyway lua has built-in conventions for booleans and nil values, you can’t dump blindly

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: pass parametric macro options and arguments to Lua natively (#1092)

2020-10-08 Thread Panu Matilainen
The Lua native arguments have to match those of non-Lua macros, otherwise everybody goes crazy. For more advanced use there will be that option to let the macro do its own processing. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: pass parametric macro options and arguments to Lua natively (#1092)

2020-10-08 Thread nim-nim
@hroncok from the lua language POW you need a tristate for flags: nil (not passed), true (passed as true), false (passed as false). Otherwise it’s real easy to be confused when handling things that have a default state absent any flag, or an antonym (with/without, quiet/verbose, etc), or One

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: add some syntax to specify a macro should not fail when used with a flag not declared to rpm argument parsing (#547)

2020-10-08 Thread Panu Matilainen
Pulled that part out of #1383 for now to avoid piling on. In the meanwhile I've been pondering about that '..' syntax which is as arbitrary as anything. Maybe a better syntax would be a wildcard '*' instead, ie ``` %foo(*) { } ``` Thoughts? -- You are receiving this because you commented.

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for passing real local arguments to Lua scriptlets (#1383)

2020-10-08 Thread Michael Schroeder
@mlschroe commented on this pull request. > +lua_newtable(L); +if (opts) { + int c, argc = argvCount(args); + +/* glibc uses optind 0 for (re)initializing internal structures, sigh */ +#ifdef __GLIBC__ + optind = 0; +#else + optind = 1; +#endif + while ((c =

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for passing real local arguments to Lua scriptlets (#1383)

2020-10-08 Thread Michael Schroeder
@mlschroe commented on this pull request. > +lua_newtable(L); +if (opts) { + int c, argc = argvCount(args); + +/* glibc uses optind 0 for (re)initializing internal structures, sigh */ +#ifdef __GLIBC__ + optind = 0; +#else + optind = 1; +#endif + while ((c =

Re: [Rpm-maint] [rpm-software-management/rpm] Fix Fseek for offset > 2GiB (#1381)

2020-10-08 Thread Panu Matilainen
@pmatilai commented on this pull request. > @@ -382,7 +382,7 @@ static ssize_t fdWrite(FDSTACK_t fps, const void * buf, > size_t count) static int fdSeek(FDSTACK_t fps, off_t pos, int whence) { -return lseek(fps->fdno, pos, whence); +return (lseek(fps->fdno, pos, whence)) == -1 ?

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for passing real local arguments to Lua scriptlets (#1383)

2020-10-08 Thread Panu Matilainen
@pmatilai pushed 1 commit. 414a92cafebd992a418e1a4d928903b27a4894cb Pass parametric macro options and arguments to Lua natively (#1092) -- You are receiving this because you are subscribed to this thread. View it on GitHub:

Re: [Rpm-maint] [rpm-software-management/rpm] Add support for passing real local arguments to Lua scriptlets (#1383)

2020-10-08 Thread Panu Matilainen
In the last push, Lua can now natively access both parsed options and arguments (see added documentation) I left the %foo(..) part out for now, I'll deal with that separately once this lands to limit the number of moving parts, this was a bit more involved than the initial version... -- You

Re: [Rpm-maint] [rpm-software-management/rpm] RFE: pass parametric macro options and arguments to Lua natively (#1092)

2020-10-08 Thread Panu Matilainen
...and done, now including actual documentation: https://github.com/rpm-software-management/rpm/pull/1383/commits/a3c336434f0abcfb5c17ef4718429f86873f7f4d @hroncok - basically yes, options without value are saved as empty strings in the Lua table so both boolean and value access work as you'd