]> git.pld-linux.org Git - packages/rpm.git/commitdiff
- verbose shells adding
authorElan Ruusamäe <glen@pld-linux.org>
Sun, 10 Feb 2008 12:59:47 +0000 (12:59 +0000)
committercvs2git <feedback@pld-linux.org>
Sun, 24 Jun 2012 12:13:13 +0000 (12:13 +0000)
- arg[2] is integer not string (!?) in lua

Changed files:
    rpm.macros -> 1.429

rpm.macros

index 5a97446b7e9b499da1cc50d9e8e01cd5ecbadd90..7d72f179a3747da0acebbff22d53d054f722c3d4 100644 (file)
@@ -1414,13 +1414,14 @@ if f then\
 end\
 for _, s in ipairs({%{expand:%%__lua_split %*}}) do\
        if not t[s] then\
+               print("Adding "..s.." to /etc/shells")\
                f = io.open("/etc/shells", "a"); f:write(s.."\\n"); f:close()\
        end\
 end\
 %{nil}
 
 %remove_etc_shells(p) %{-p:<lua>}\
-%{-p:if arg[2] == "0" then}\
+%{-p:if arg[2] == 0 then}\
        t = {}\
        f = io.open("/etc/shells", "r")\
        if f then\
@@ -1428,6 +1429,7 @@ end\
                f:close()\
        end\
        for _, l in pairs({%{expand:%%__lua_split %*}}) do\
+               print("Removing "..l.." from /etc/shells")\
                t[l] = nil\
        end\
        s=""\
This page took 0.035754 seconds and 4 git commands to generate.