mirror of
https://abf.rosa.ru/djam/python-urllib3.git
synced 2025-02-23 17:22:46 +00:00
Move pretrans scripts because RPM cannot handle their end properly otherwise
This commit is contained in:
parent
bd4eea1ac8
commit
17ffbd1e0f
1 changed files with 31 additions and 30 deletions
|
@ -34,21 +34,6 @@ similar vein.
|
|||
%doc CHANGES.rst README.rst CONTRIBUTORS.txt
|
||||
%{py_puresitedir}/*
|
||||
|
||||
%pretrans -p <lua>
|
||||
path = "%{py_puresitedir}/urllib3/packages/ssl_match_hostname"
|
||||
st = posix.stat(path)
|
||||
if st and st.type == "directory" then
|
||||
status = os.rename(path, path .. ".rpmmoved")
|
||||
if not status then
|
||||
suffix = 0
|
||||
while not status do
|
||||
suffix = suffix + 1
|
||||
status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
|
||||
end
|
||||
os.rename(path, path .. ".rpmmoved")
|
||||
end
|
||||
end
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
%package -n python3-%{module}
|
||||
|
@ -80,21 +65,6 @@ similar vein.
|
|||
%doc CHANGES.rst README.rst CONTRIBUTORS.txt
|
||||
%{py3_puresitedir}/*
|
||||
|
||||
%pretrans -p <lua> -n python3-%{module}
|
||||
path = "%{py3_puresitedir}/urllib3/packages/ssl_match_hostname"
|
||||
st = posix.stat(path)
|
||||
if st and st.type == "directory" then
|
||||
status = os.rename(path, path .. ".rpmmoved")
|
||||
if not status then
|
||||
suffix = 0
|
||||
while not status do
|
||||
suffix = suffix + 1
|
||||
status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
|
||||
end
|
||||
os.rename(path, path .. ".rpmmoved")
|
||||
end
|
||||
end
|
||||
|
||||
#----------------------------------------------------------------------------
|
||||
|
||||
%prep
|
||||
|
@ -143,3 +113,34 @@ cp %{SOURCE1} %{buildroot}/%{py3_puresitedir}/urllib3/packages/ssl_match_hostnam
|
|||
|
||||
popd
|
||||
|
||||
|
||||
%pretrans -p <lua>
|
||||
path = "%{py_puresitedir}/urllib3/packages/ssl_match_hostname"
|
||||
st = posix.stat(path)
|
||||
if st and st.type == "directory" then
|
||||
status = os.rename(path, path .. ".rpmmoved")
|
||||
if not status then
|
||||
suffix = 0
|
||||
while not status do
|
||||
suffix = suffix + 1
|
||||
status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
|
||||
end
|
||||
os.rename(path, path .. ".rpmmoved")
|
||||
end
|
||||
end
|
||||
|
||||
%pretrans -p <lua> -n python3-%{module}
|
||||
path = "%{py3_puresitedir}/urllib3/packages/ssl_match_hostname"
|
||||
st = posix.stat(path)
|
||||
if st and st.type == "directory" then
|
||||
status = os.rename(path, path .. ".rpmmoved")
|
||||
if not status then
|
||||
suffix = 0
|
||||
while not status do
|
||||
suffix = suffix + 1
|
||||
status = os.rename(path .. ".rpmmoved", path .. ".rpmmoved." .. suffix)
|
||||
end
|
||||
os.rename(path, path .. ".rpmmoved")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue