Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 210904 - >=dev-lang/lua-5.1.3-r1 : sieve.lua test fails, patch provided
Summary: >=dev-lang/lua-5.1.3-r1 : sieve.lua test fails, patch provided
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: AMD64 Linux
: High enhancement
Assignee: Matti Bickel (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-02-20 17:19 UTC by Olivier Huber
Modified: 2008-05-16 16:14 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
replace math.mod with math.fmod in test/sieve.lua (lua-5.1.3-test.patch,340 bytes, patch)
2008-02-20 17:21 UTC, Olivier Huber
Details | Diff
ebuild's diff (lua.ebuild.patch,399 bytes, patch)
2008-02-20 17:21 UTC, Olivier Huber
Details | Diff
lua.ebuild.patch (lua.ebuild.patch,315 bytes, patch)
2008-02-21 19:41 UTC, Olivier Huber
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Huber 2008-02-20 17:19:14 UTC
the sieve test fail because math.mod seems to be depreciate : in src/luaconf.h : 
 /*
@@ LUA_COMPAT_MOD controls compatibility with old math.mod function.
** CHANGE it to undefined as soon as your programs use 'math.fmod' or
** the new '%' operator instead of 'math.mod'.
*/
#undef LUA_COMPAT_MOD

So I replace math.mod with math.fmod in the test.
Comment 1 Olivier Huber 2008-02-20 17:21:00 UTC
Created attachment 144135 [details, diff]
replace math.mod with math.fmod in test/sieve.lua
Comment 2 Olivier Huber 2008-02-20 17:21:53 UTC
Created attachment 144136 [details, diff]
ebuild's diff
Comment 3 Olivier Huber 2008-02-21 19:41:27 UTC
Created attachment 144257 [details, diff]
lua.ebuild.patch

In fact we need to patch only if use=deprecated is not enable.
Comment 4 Jeroen Roovers (RETIRED) gentoo-dev 2008-05-15 18:29:42 UTC
It would also be nice if we got rid of the ridiculous &> /dev/null in src_test(). If anything you'd want to _keep_ the output of a test, especially if it fails. Frankly, why anyone would ever put &> /dev/null in an ebuild is beyond me.

Changing the summary as this hasn't been fixed in -r2.
Comment 5 Matti Bickel (RETIRED) gentoo-dev 2008-05-16 16:14:30 UTC
Probably the &> /dev/null was introduced so the output looked nicer or whatever. I agree with you that it's silly, i removed it and included the patch for the test. Thanks Oliver!