openwrtv4/package/utils
David Thornley da0226fa7e lua: Fixed broken __lt/__le operators caused by lnum patch.
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): -

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

Without the patch the following error will be presented: -

“attempt to compare two table values”

Signed-off-by: David Thornley <david.thornley@touchstargroup.com>
2016-05-13 17:03:53 +02:00
..
admswconfig package: flag further target specific packages as nonshared 2016-04-26 23:26:43 +02:00
bsdiff bsdiff: add missing host build dependency on bzip2 (fixes #21990) 2016-03-07 14:34:14 +00:00
busybox busybox: fix issues with the ip command on mips64 2016-05-12 16:05:23 +02:00
bzip2 bzip2: install to STAGING_DIR/host instead of STAGING_DIR/host/usr 2016-01-20 22:59:29 +00:00
e2fsprogs e2fsprogs: add packages for "chattr" and "lsattr" 2015-11-08 20:39:54 +00:00
fbtest fbtest: remove bogus #include 2015-03-29 04:28:29 +00:00
fuse cosmetic: remove trailing whitespaces 2015-10-15 22:12:13 +00:00
hostap-utils license info - revert r43155 2014-11-03 09:56:44 +00:00
jsonfilter packages: use OPENWRT_GIT to point at the main openwrt git repo 2016-01-04 15:11:49 +00:00
lua lua: Fixed broken __lt/__le operators caused by lnum patch. 2016-05-13 17:03:53 +02:00
mdadm license info - revert r43155 2014-11-03 09:56:44 +00:00
mkelfimage cosmetic: remove trailing whitespaces 2015-10-15 22:12:13 +00:00
nvram package: remove duplicate lines from otrx and nvram makefiles 2016-04-26 23:28:17 +02:00
oseama package: flag further target specific packages as nonshared 2016-04-26 23:26:43 +02:00
otrx package: remove duplicate lines from otrx and nvram makefiles 2016-04-26 23:28:17 +02:00
px5g px5g: Use SHA-256 when generating self-signed certificates 2015-11-06 10:52:52 +00:00
px5g-standalone px5g-standalone: activate format-security checks 2015-11-22 14:16:09 +00:00
spidev_test license info - revert r43155 2014-11-03 09:56:44 +00:00
ubi-utils global: change my email address 2016-05-12 03:29:36 +02:00
ugps global: change my email address 2016-05-12 03:29:36 +02:00
usbmode packages: use OPENWRT_GIT to point at the main openwrt git repo 2016-01-04 15:11:49 +00:00
usbreset license info - revert r43155 2014-11-03 09:56:44 +00:00
usbutils usbutils: Update USB IDs list and drop gzip compression 2016-04-26 11:43:49 +00:00
util-linux util-linux: update to version 2.28 2016-04-17 15:16:12 +00:00
xfsprogs xfsprogs: activate format-security checks 2015-11-22 14:13:47 +00:00