Try to use io.open() in pre scriptlet instead of rpm.open()

This commit is contained in:
František Zatloukal 2021-12-28 19:32:31 +01:00
parent 00f6a084f9
commit e597fee629

View File

@ -3,7 +3,7 @@
Name: authselect
Version: 1.3.0
Release: 4%{?dist}
Release: 5%{?dist}
Summary: Configures authentication and identity sources from supported profiles
URL: https://github.com/authselect/authselect
@ -284,7 +284,7 @@ os.remove(force_file)
-- Check if this is a new installation.
if tonumber(arg[2]) == 1
then
f = rpm.open(force_file, "w")
f = io.open(force_file, "w")
f:write("")
f:close()
end
@ -299,7 +299,7 @@ then
comm = os.execute(authselect .. " version &> /dev/null")
if comm ~= true
then
f = rpm.open(force_file, "w")
f = io.open(force_file, "w")
f:write("")
f:close()
end
@ -347,6 +347,9 @@ fi
exit 0
%changelog
* Tue Dec 28 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 1.3.0-5
- Try to use io.open() in pre scriptlet instead of rpm.open() (rpm >= 4.17.0)
* Tue Dec 21 2021 Frantisek Zatloukal <fzatlouk@redhat.com> - 1.3.0-4
- Use lua for pre scriptlets to reduce dependencies