icculus / mojosetup

A standalone installer for Linux software.
https://icculus.org/mojosetup/
Other
68 stars 7 forks source link

MojoSetup throws "BUG: no options" when Setup.Option and Setup.OptionGroup #42

Closed SDLBugzilla closed 2 years ago

SDLBugzilla commented 2 years ago

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: unspecified Reported for operating system, platform: Linux, PC

Comments on the original bug report:

On 2009-01-06 06:14:25 -0500, Reto Schneider wrote:

MojoSetup throws "BUG: no options" when Setup.Option and Setup.OptionGroup used in Setup.Package.

Line 1132 in mojosetup_mainline.lua seems to cause it. Replace ~= with == helps.

Thanks, Reto

On 2009-01-12 12:46:15 -0500, wrote:

I think Reto is right, see the attached config.lua. I get the same error as long as I don't comment out either the Setup.Option or the Setup.OptionGroup block.

From mojosetup_mainline.lua:1132

if install.options ~= nil and install.optiongroups ~= nil then
    MojoSetup.fatal(_("BUG: no options"))
end

This does not look right. For the attached test case this would mean install.options is not nil and install.optionsgroups is not nil too. As Reto stated it should look like:

if install.options == nil and install.optiongroups == nil then
    MojoSetup.fatal(_("BUG: no options"))
end

So the installer bails out only if both install.options and install.optiongroups are nil but not if both are unlike nil.

On 2009-01-12 12:47:27 -0500, wrote:

Created attachment 1954 config.lua

On 2009-01-12 21:59:28 -0500, Ryan C. Gordon wrote:

Ah, yeah, good catch. Basic logic mistake on my part.

Fixed in hg changeset 614:d3280f946e01, thanks!

--ryan.