Summary: | net-news/liferea-1.2.16 - os object is nil with lua-5.1 | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Jonathan Cristoforetti <jhonnyc> |
Component: | Current packages | Assignee: | Daniel Gryniewicz (RETIRED) <dang> |
Status: | RESOLVED WONTFIX | ||
Severity: | normal | CC: | mabi |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
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. 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? 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. (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. 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. mabi@ Do you have an opinion? Should lua 5.1 work with 5.0 scripts in general? Or is it a liferea problem somehow? 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). 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? 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. 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. |
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".