Bug 830853
Summary: | Embedded lua has strange command line parameters (arg array) indexing | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Jan Pazdziora <jpazdziora> |
Component: | rpm | Assignee: | Fedora Packaging Toolset Team <packaging-team> |
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 17 | CC: | ffesti, jnovy, jpazdziora, maxamillion, packaging-team, pknirsch, pmatilai, rrakus |
Target Milestone: | --- | Keywords: | Reopened |
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-05-21 08:13:19 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Jan Pazdziora
2012-06-11 14:15:51 UTC
print(arg[0]) print(arg[1]) print(arg[2]) -> nil <lua> 1 Don't ask me why... Reopening and moving to rpm component. On normal command line, lua behaves as expected and documented -- arg[0] is the command name and parameters start from arg[1]: $ cat /tmp/klwer.lua #!/usr/bin/lua print(arg[0]) print(arg[1]) print(arg[2]) $ lua /tmp/klwer.lua 1 3 /tmp/klwer.lua 1 3 $ /tmp/klwer.lua 1 3 /tmp/klwer.lua 1 3 The embedded interpret should do the same, while Roman's example in comment 1 suggests that it inserts an extra value to the array. Yes, unfortunately the <lua> arguments are inconsistent with traditional scriptlet arguments. The problem is that "fixing" it would do little else than break all the packages written to work with the current argument style which has been the way it is for a long time for only a "cosmetic" gain. (In reply to comment #3) > Yes, unfortunately the <lua> arguments are inconsistent with traditional > scriptlet arguments. The problem is that "fixing" it would do little else > than break all the packages written to work with the current argument style > which has been the way it is for a long time for only a "cosmetic" gain. It is not only cosmetic. Now it is inconsistent - embedded lua and standalone lua. You can fix it in rawhide, make an announce on devel list, ... And of course it is possible to make a list of packages which use lua scripting. (In reply to comment #4) > You can fix it in rawhide, make an announce on devel list, > ... And of course it is possible to make a list of packages which use lua > scripting. If it were that trivial it would've been fixed already. Rpm needs to remain backwards-compatible with packages built 10+ years ago, including those outside the fedora ecosystem, and the scriptlet calling convention one (very) important part of that. On top of that, there are considerable forward-compatibility demands on rpm as well: anything in rawhide must be installable by whatever the builders are running, for the time being that would be rhel-6. The only way to compatibly change the arguments would be something like introducing a new variant of <lua> (or additional compatibility tracking bit) where the arguments are "sane", add rpmlib() feature tracking for it, backport to rhel-6 etc etc. It's simply far more trouble than its worth, annoying as the inconsistency might be. (In reply to comment #5) > > The only way to compatibly change the arguments would be something like > introducing a new variant of <lua> (or additional compatibility tracking > bit) where the arguments are "sane", add rpmlib() feature tracking for it, > backport to rhel-6 etc etc. It's simply far more trouble than its worth, > annoying as the inconsistency might be. OKay. Can we at least have the inconsistency documented anywhere <lua> is mentioned? This message is a reminder that Fedora 16 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 16. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '16'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Fedora version prior to Fedora 16's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Fedora 16 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Fedora, you are encouraged to click on "Clone This Bug" and open it against that version of Fedora. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping (In reply to comment #6) > (In reply to comment #5) > > > > The only way to compatibly change the arguments would be something like > > introducing a new variant of <lua> (or additional compatibility tracking > > bit) where the arguments are "sane", add rpmlib() feature tracking for it, > > backport to rhel-6 etc etc. It's simply far more trouble than its worth, > > annoying as the inconsistency might be. > > OKay. Can we at least have the inconsistency documented anywhere <lua> is > mentioned? I mean, for example at http://www.rpm.org/wiki/PackagerDocs/RpmLua ? I know it's a wiki but it wants some login to edit and hopefully rpm maintainers should have one ... The arg table and the off-by-one quirk is now documented in http://www.rpm.org/wiki/PackagerDocs/RpmLua. Other than that I'm afraid this is a WONTFIX due to the compatibility requirements. I think the documentation amendment is just fine. Thank you! |