@pmatilai commented on this pull request.


> +    if rpm.expand('%[0%{?_use_weak_usergroup_deps}]') ~= '0' then
+       return
+    end
+    for line in io.lines(macros["1"]) do
+        if line:sub(1, 1) == '#' then
+            goto continue
+        end
+        fields = {}
+        for w in line:gmatch("%S+") do
+            table.insert(fields, w)
+        end
+        if #fields >= 3 and fields[1] == 'm' then
+           print(string.format('user(%s)\\ngroup(%s)', fields[2], fields[3]))
+        end
+        ::continue::
+    end

Put these into some %__sysusers_helper() macro (in the same file) that both 
requires and recommends call, no reason to duplicate identical code.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/2990#pullrequestreview-1957460293
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/2990/review/1957460...@github.com>
_______________________________________________
Rpm-maint mailing list
Rpm-maint@lists.rpm.org
http://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to