Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 180992 - net-news/liferea-1.2.16 - os object is nil with lua-5.1
Summary: net-news/liferea-1.2.16 - os object is nil with lua-5.1
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Daniel Gryniewicz (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-06-05 19:18 UTC by Jonathan Cristoforetti
Modified: 2007-09-18 14:58 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Cristoforetti 2007-06-05 19:18:08 UTC
When compiled against lua-5.1, lua scripts in Liferea have no access to the os object, which is nil.

From the scripting environment the object can be accessed easily:

Lua 5.1.2  Copyright (C) 1994-2007 Lua.org, PUC-Rio
> print(os)
table: 0x804f4b8

but the same command in a script run within Liferea gives:

nil

With lua-5.0 series it worked fine, but Liferea-1.2.16 bumped the dependency to the 5.1 series.




Reproducible: Always

Steps to Reproduce:
1. Compile Liferea against lua-5.1
2. run liferea from the command line
3. Program->Script Manager, Add, select create new script and give it a name
4. Insert the following code: print(os)
5. Click on "Save Script" and "Run Now" buttons.

Actual Results:  
In the terminal you will get a "nil" 

Expected Results:  
It should have printed something of the form "table: 0xXXXXXX".
Comment 1 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-06-05 21:07:16 UTC
I'm sorry, I don't know lua, and I've never used it with liferea.  I had lua disabled on liferea, but I was asked to add a use flag.  Unless you can provide me with some information on how to fix this, I'm just going to have to disable lua again.
Comment 2 Jonathan Cristoforetti 2007-06-05 21:34:40 UTC
Unfortunately I am no lua expert either. 

I only use a small script to have the number of unread items in the Avant-Window-Navigator bar. 

See the following post:
http://liferea.blogspot.com/2007/04/liferea-awn.html

where the author says the os module of LUA is loaded by default, but with 5.1 it is not.

Is the 5.1 dependency necessary?
Comment 3 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-06-05 22:30:57 UTC
Not required, no, but suggested, certainly.  However, lua is not slotted, and 5.1.1-r2 is stable, so you'd have to jump through hoops to get liferea built against 5.0.  If they're really that different, I don't want to double my lua-related bugs by supporting them both, if I can possibly help it.

Could you test by just changing the dep in the liferea ebuild, downgrading lua, and re-emerging liferea?  That would help a lot to see if it's gentoo or lua.
Comment 4 Jonathan Cristoforetti 2007-06-05 23:39:47 UTC
(In reply to comment #3)
> Could you test by just changing the dep in the liferea ebuild, downgrading lua,
> and re-emerging liferea?  That would help a lot to see if it's gentoo or lua.

With LUA 5.0.3 it works fine.
Comment 5 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-06-06 00:17:27 UTC
Yay.  So LUA is not compatible between 5.0 and 5.1.  I think I'm going to have to leave the 5.1 dep, or disable lua entirely, since I can't force 5.0 due to lack of slotting.
Comment 6 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-06-06 00:18:52 UTC
mabi@

Do you have an opinion?  Should lua 5.1 work with 5.0 scripts in general?  Or is it a liferea problem somehow?
Comment 7 Matti Bickel (RETIRED) gentoo-dev 2007-06-13 10:44:33 UTC
Lua-5.0 and -5.1 are not meant to be compatible. My best guess is that upstream went nuts with the API (it's easy and it changed quite a bit). I don't promise anything but i try to have a look at the code this week (prolly this evening).
Comment 8 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-06-13 15:35:57 UTC
Okay, so should I limit the lua I use to one or the other?  Or should the user just know which one it's built against and only use scripts for that version?
Comment 9 Matti Bickel (RETIRED) gentoo-dev 2007-09-18 08:49:53 UTC
Sorry for the delay here.

I think it's best to limit Lua use to 5.1, as 5.0 will be going away sooner or later. I don't know liferea, so i can't say if telling the users to be careful with their scripts is an option. Does upstream supply lua scripts? Are they compatible with 5.1 and/or 5.0? If both are accepted, i'd say, tell the user to restrict themself to one version.
Comment 10 Daniel Gryniewicz (RETIRED) gentoo-dev 2007-09-18 14:58:37 UTC
Thanks, I'll stick with 5.1, then.  As far as I can tell, upstream doesn't ship any lua scripts.  Configure allows either 5.0 or 5.1, but that's all I have to go on.