[Bug 1219721] New: rpm lua checker trows error on "!"
https://bugzilla.suse.com/show_bug.cgi?id=1219721 Bug ID: 1219721 Summary: rpm lua checker trows error on "!" Classification: openSUSE Product: openSUSE Tumbleweed Version: Current Hardware: All OS: openSUSE Tumbleweed Status: NEW Severity: Major Priority: P5 - None Component: Basesystem Assignee: screening-team-bugs@suse.de Reporter: werner@suse.com QA Contact: qa-bugs@suse.de Target Milestone: --- Found By: --- Blocker: --- This simple lua scriplet %transfiletriggerin -p <lua> -- %{_mandir} if posix.getcwd() != '/' then print("Hello") endif cause: [ 4s] + exec rpmbuild -ba --define '_srcdefattr (-,root,root)' --noclean --nosignature --define '_build_create_debug 1' /home/abuild/rpmbuild/SOURCES/man.spec [ 4s] error: invalid syntax in lua scriptlet: [string "%transfiletriggerin"]:1: 'then' expected near '!' ... accordingly to /usr/share/doc/packages/rpm/manual/lua.md the syntax is correct ... I'd like to use the return value of stat = posix.stat("/var/cache/man") to test is /var/cache/man exists and is also a directory but the string compare stat.type != "directory" crashes with a similar error -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1219721 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - None |P3 - Medium Assignee|screening-team-bugs@suse.de |mls@suse.com -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1219721 https://bugzilla.suse.com/show_bug.cgi?id=1219721#c1 --- Comment #1 from Dr. Werner Fink <werner@suse.com> --- I use the workaround stat = posix.stat("/var/cache/man") if not stat then domkdir = true elseif not (stat.type == "directory") then domkdir = true os.remove("/var/cache/man") end seems to work -- You are receiving this mail because: You are on the CC list for the bug.
https://bugzilla.suse.com/show_bug.cgi?id=1219721 Dr. Werner Fink <werner@suse.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|rpm lua checker trows error |rpm lua checker throws |on "!" |error on "!" -- You are receiving this mail because: You are on the CC list for the bug.
participants (1)
-
bugzilla_noreply@suse.com