<feed xmlns='http://www.w3.org/2005/Atom'>
<title>mtk-20170518/package/utils/lua/patches-host, branch v17.01.2</title>
<subtitle>MTK 20170518 : Mediatek SDK based on OpenWRT Barrier Breaker</subtitle>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/'/>
<entry>
<title>lua: Fixed broken __lt/__le operators caused by lnum patch.</title>
<updated>2016-05-13T15:03:53+00:00</updated>
<author>
<name>David Thornley</name>
<email>david.thornley@touchstargroup.com</email>
</author>
<published>2016-05-11T03:28:53+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=da0226fa7eece0b87bcc04d79bd1a9b198d09fd0'/>
<id>da0226fa7eece0b87bcc04d79bd1a9b198d09fd0</id>
<content type='text'>
This was found while investigating why luarocks does not work. It was
traced to a quite old lnum patch for 5.1.3. I compared against the
latest 5.1.4 patch - https://github.com/LuaDist/lualnum and discovered
the lessthan/lessequal evaluation was not falling through to the
call_orderTM (tag methods).

I have tested LuCI (simple tests) and used the following lua code to
validate the patch (both host and target patches supplied): -

&gt; local my_mt = {
&gt; __eq = function(v1, v2)
&gt; print("__eq")
&gt; return false
&gt; end,
&gt; __lt = function(v1, v2)
&gt; print("__lt")
&gt; return false
&gt; end,
&gt; __le = function(v1, v2)
&gt; print("__le")
&gt; return false
&gt; end
&gt; }
&gt;
&gt; function get_my(vstring)
&gt; local my = {}
&gt; my.string = vstring;
&gt; setmetatable(my, my_mt);
&gt; return my;
&gt; end
&gt;
&gt; local a = get_my("1.0")
&gt; local b = get_my("1.0")
&gt;
&gt; local eq_works = a == b;
&gt; local lt_works = a &lt; b;
&gt; local gt_works = a &gt; b;
&gt;
&gt; local lte_works = a &lt;= b;
&gt; local gte_works = a &gt;= b;

Without the patch the following error will be presented: -

“attempt to compare two table values”

Signed-off-by: David Thornley &lt;david.thornley@touchstargroup.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This was found while investigating why luarocks does not work. It was
traced to a quite old lnum patch for 5.1.3. I compared against the
latest 5.1.4 patch - https://github.com/LuaDist/lualnum and discovered
the lessthan/lessequal evaluation was not falling through to the
call_orderTM (tag methods).

I have tested LuCI (simple tests) and used the following lua code to
validate the patch (both host and target patches supplied): -

&gt; local my_mt = {
&gt; __eq = function(v1, v2)
&gt; print("__eq")
&gt; return false
&gt; end,
&gt; __lt = function(v1, v2)
&gt; print("__lt")
&gt; return false
&gt; end,
&gt; __le = function(v1, v2)
&gt; print("__le")
&gt; return false
&gt; end
&gt; }
&gt;
&gt; function get_my(vstring)
&gt; local my = {}
&gt; my.string = vstring;
&gt; setmetatable(my, my_mt);
&gt; return my;
&gt; end
&gt;
&gt; local a = get_my("1.0")
&gt; local b = get_my("1.0")
&gt;
&gt; local eq_works = a == b;
&gt; local lt_works = a &lt; b;
&gt; local gt_works = a &gt; b;
&gt;
&gt; local lte_works = a &lt;= b;
&gt; local gte_works = a &gt;= b;

Without the patch the following error will be presented: -

“attempt to compare two table values”

Signed-off-by: David Thornley &lt;david.thornley@touchstargroup.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>lua: host: install lnum_config.h</title>
<updated>2016-03-04T08:33:14+00:00</updated>
<author>
<name>John Crispin</name>
<email>john@openwrt.org</email>
</author>
<published>2016-03-04T08:33:14+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=3b39bf7262473069491df321561fc743b8e88e39'/>
<id>3b39bf7262473069491df321561fc743b8e88e39</id>
<content type='text'>
One of the host patches introduces the new header file lnum_config.h
included by luaconf.h, but doesn't install it.

Install it to allow building C modules for the host Lua.

Signed-off-by: Matthias Schiffer &lt;mschiffer@universe-factory.net&gt;

SVN-Revision: 48907
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
One of the host patches introduces the new header file lnum_config.h
included by luaconf.h, but doesn't install it.

Install it to allow building C modules for the host Lua.

Signed-off-by: Matthias Schiffer &lt;mschiffer@universe-factory.net&gt;

SVN-Revision: 48907
</pre>
</div>
</content>
</entry>
<entry>
<title>packages: clean up the package folder</title>
<updated>2013-06-21T16:54:37+00:00</updated>
<author>
<name>John Crispin</name>
<email>john@openwrt.org</email>
</author>
<published>2013-06-21T16:54:37+00:00</published>
<link rel='alternate' type='text/html' href='http://www.chd.sx/cgit/mtk-20170518/commit/?id=4ebf19b48fafc8d94e14e4ba779969613b241a6a'/>
<id>4ebf19b48fafc8d94e14e4ba779969613b241a6a</id>
<content type='text'>
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 37007
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Signed-off-by: John Crispin &lt;blogic@openwrt.org&gt;

SVN-Revision: 37007
</pre>
</div>
</content>
</entry>
</feed>
