Re: [Rpm-maint] [rpm-software-management/rpm] Allow parametric macros to opt out of option processing (#547) (#1392)

2020-10-13 Thread Panu Matilainen
Yeah, thanks for spotting. Will fix. -- 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/1392#issuecomment-708172511___ Rpm-maint

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a table-like shortcut to rpm macros in Lua (#1398)

2020-10-13 Thread Panu Matilainen
Yup. The reason it's not there now is that from wherever I had this idea it might prevent macro expansion in said arguments, and somehow never got around to check what it actually did :roll_eyes: (I'm getting old, it's just three years since I added that thing...) Now actually checking, yeah

Re: [Rpm-maint] [rpm-software-management/rpm] pythondistdeps: Switch to importlib.metadata (#1317)

2020-10-13 Thread lgtm-com[bot]
This pull request **fixes 1 alert** when merging 62f43dbb7bffc9f978d1c3427a94b8cf7e2bfd52 into b766e63de30d2e2ee103d132e35a13e82a62cd27 - [view on LGTM.com](https://lgtm.com/projects/g/rpm-software-management/rpm/rev/pr-12f4bd115540f9a4fa1bf4c75bd4314b1d88a7bd) **fixed alerts:** * 1 for

Re: [Rpm-maint] [rpm-software-management/rpm] Allow parametric macros to opt out of option processing (#547) (#1392)

2020-10-13 Thread Michael Schroeder
I think you mean optopt instead of opterr, because opterr is for configuring getopt()'s error handling. -- 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] Implement a table-like shortcut to rpm macros in Lua (#1398)

2020-10-13 Thread Michael Schroeder
You can easily implement quoting by always surrounding the arguments with 0x1f characters, see splitQuoted() and the %quote macro. -- 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] Translations update from Weblate (#1356)

2020-10-13 Thread Florian Festi
Merged #1356 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/1356#event-3871084254___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Tag documentation updates (#1387)

2020-10-13 Thread Florian Festi
Merged #1387 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/1387#event-3871056091___ Rpm-maint mailing list

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a table-like shortcut to rpm macros in Lua (#1398)

2020-10-13 Thread Panu Matilainen
Other random remarks of the day: - We could of course put it into rpm namespace, and macro-heavy users can declare their own shortcut, eg `m = rpm.macro; m._libdir = "foo"`, but then if every Lua macro starts with that, we've failed somewhere - This doesn't enable *anything* new, it's all just

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a table-like shortcut to rpm macros in Lua (#1398)

2020-10-13 Thread Panu Matilainen
Could of course call the table `macro`to make it blindingly obvious what that is, although I do think the context makes it quite clear anyhow. It's not like rpm macros ever were nice or readable to begin with :stuck_out_tongue_winking_eye: Macros are by far the most accessed thing from rpm

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a table-like shortcut to rpm macros in Lua (#1398)

2020-10-13 Thread Vít Ondruch
> > There's ample potential for bikeshedding here (eg what to call the global > > table) > > Indeed :) `m` is nice and short, but possibly a bit too much? What about > including it in the `rpm` namespace as `rpm.m`? I agree with @hroncok. I think the code should be readable on the first place.

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a table-like shortcut to rpm macros in Lua (#1398)

2020-10-13 Thread Panu Matilainen
It stops being nice and short if we put it into the rpm namespace :-/ Unlike a generic Lua library extension, rpm owns the environment in which these things run so I don't see a reason we couldn't maximise the convenience. Too bad `%` is not a legitimate character in Lua names... OTOH, `_` is

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a table-like shortcut to rpm macros in Lua (#1398)

2020-10-13 Thread Miro Hrončok
> There's ample potential for bikeshedding here (eg what to call the global > table) Indeed :) `m` is nice and short, but possibly a bit too much? What about including it in the `rpm` namespace as `rpm.m`? -- You are receiving this because you are subscribed to this thread. Reply to this

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a table-like shortcut to rpm macros in Lua (#1398)

2020-10-13 Thread Panu Matilainen
https://copr.fedorainfracloud.org/coprs/pmatilai/rpm-snapshot/ has pre-built binaries for Fedora, updated manually once/twice a week. Usually those are strictly from rpm git master but it's not like I can't make exceptions...

Re: [Rpm-maint] [rpm-software-management/rpm] Implement a table-like shortcut to rpm macros in Lua (#1398)

2020-10-13 Thread nim-nim
If that works that will be terrific! However as usual the devil is in the detail, is it available as a pre-built rpm somewhere or do one need to build his own binary? -- 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] Implement a table-like shortcut to rpm macros in Lua (#1398)

2020-10-13 Thread Panu Matilainen
See the docs + test cases in the commit for details, if something isn't covered then do ask. There's ample potential for bikeshedding here (eg what to call the global table), should it do some sort of auto-quoting for empty strings as arguments etc. Tagging @hroncok @nim-nim @mlschroe

[Rpm-maint] [rpm-software-management/rpm] Implement a table-like shortcut to rpm macros in Lua (#1398)

2020-10-13 Thread Panu Matilainen
Add rpm macro context as a global table-like entity named m for typing convenience into the Lua environment. Support basic access with table indexing syntaxes (m[k] and m.k), undefined macros return nil here. As a specialty, parametric macros are returned as native callable variadic Lua

Re: [Rpm-maint] [rpm-software-management/rpm] pythondistdeps: Switch to importlib.metadata (#1317)

2020-10-13 Thread torsava
@torsava commented on this pull request. > @@ -142,9 +210,23 @@ def convert(name, operator, version_id): def normalize_name(name): @s-t-e-v-e-n-k Thinking more on this, since we have to keep this function, and since the class/static methods you currently use are used inside 2 different

Re: [Rpm-maint] [rpm-software-management/rpm] pythondistdeps: Switch to importlib.metadata (#1317)

2020-10-13 Thread lgtm-com[bot]
This pull request **fixes 1 alert** when merging 62088ae736b4eac30758209d9537fa1089f6e02c into 6163c6cfd99f1dbafd89962598729e7a81932311 - [view on LGTM.com](https://lgtm.com/projects/g/rpm-software-management/rpm/rev/pr-44669caf5b3c6cb2c541d0f66685a0972b6ae983) **fixed alerts:** * 1 for

Re: [Rpm-maint] [rpm-software-management/rpm] pythondistdeps: Switch to importlib.metadata (#1317)

2020-10-13 Thread Miro Hrončok
@hroncok commented on this pull request. > @@ -142,9 +210,23 @@ def convert(name, operator, version_id): def normalize_name(name): Happy to adapt that script when we integrate this. -- You are receiving this because you are subscribed to this thread. Reply to this email directly or

Re: [Rpm-maint] [rpm-software-management/rpm] pythondistdeps: Switch to importlib.metadata (#1317)

2020-10-13 Thread torsava
@torsava commented on this pull request. > @@ -142,9 +210,23 @@ def convert(name, operator, version_id): def normalize_name(name): Ah, right. In that case, yeah, a comment would be great. -- You are receiving this because you are subscribed to this thread. Reply to this email directly