Summary: | sys-apps/portage-3.0.26: EbuildPhase.py mkdir FileExistsError: [Errno 17] File exists: b'/var/tmp/portage/sys-devel/gcc-11.2.0/files' | ||
---|---|---|---|
Product: | Portage Development | Reporter: | fkhp <fkhp101> |
Component: | Core | Assignee: | Portage team <dev-portage> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | artyom.shinkaroff, ionen, mgorny, sam |
Priority: | Normal | Keywords: | InVCS, REGRESSION |
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://github.com/gentoo/portage/pull/761 https://bugs.gentoo.org/show_bug.cgi?id=816291 https://bugs.gentoo.org/show_bug.cgi?id=820374 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 814857 | ||
Attachments: |
build.log
environment emerge --info |
Description
fkhp
2021-10-03 01:38:51 UTC
Could you please upload the full build.log, environment file, and emerge --info? To clarify, it's a regression with FEATURES="keepwork" The files/ dir may already exist then, but the new copy mechanism fails when it does. To simplify the example without package.env, can run this twice (2nd will fail): FEATURES=keepwork emerge gzip It's kinda nasty, but that did work with 3.0.24 Created attachment 742566 [details]
build.log
the log is not complete, it does not included the error message in the console.
Created attachment 742569 [details]
environment
Created attachment 742572 [details]
emerge --info
(In reply to fkhp from comment #3) > Created attachment 742566 [details] > build.log > > the log is not complete, it does not included the error message in the > console. the error mesage in the console was not put into the build.log, it seems emerge exit bluntly when the exception happened without gracefully put all the following message into the build.log, and left a broken build.log. I knew something like this is going to happen sooner or later. How would you feel if I just reverted my original patch and restored the old Portage behavior for the time being? (In reply to Michał Górny from comment #7) > I knew something like this is going to happen sooner or later. How would > you feel if I just reverted my original patch and restored the old Portage > behavior for the time being? What about just ignoring if it already exists? I don’t think it’s possible/sane to make keepwork function correctly here anyway. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/portage.git/commit/?id=f371f1804c5d2d263ca78aa79c3feed1bc5831ae commit f371f1804c5d2d263ca78aa79c3feed1bc5831ae Author: Zac Medico <zmedico@gentoo.org> AuthorDate: 2021-10-03 17:48:48 +0000 Commit: Zac Medico <zmedico@gentoo.org> CommitDate: 2021-10-03 19:30:33 +0000 prepare_build_dirs: handle copytree FileExistsError Bug: https://bugs.gentoo.org/815871 Reviewed-by: Michał Górny <mgorny@gentoo.org> Signed-off-by: Zac Medico <zmedico@gentoo.org> lib/portage/package/ebuild/prepare_build_dirs.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) *** Bug 820374 has been marked as a duplicate of this bug. *** I hit this recently, when trying to update help2man emerge kept hitting an exception symlinking and exited. I deleted the /var/tmp/portage/sys-apps/help2man-1.48.5 directory and the update succeeded.
>>> Emerging (4 of 19) sys-apps/help2man-1.48.5::gentoo
>>> Jobs: 1 of 19 complete, 2 running Load avg: 3.75, 3.92, 3.96Exception in callback AsynchronousTask._exit_listener_cb(<bound method...7fb81cc50670>>)
handle: <Handle AsynchronousTask._exit_listener_cb(<bound method...7fb81cc50670>>)>
Traceback (most recent call last):
File "/usr/lib/python3.9/site-packages/portage/package/ebuild/prepare_build_dirs.py", line 484, in _prepare_fake_filesdir
link_target = os.readlink(symlink_path)
File "/usr/lib/python3.9/site-packages/portage/__init__.py", line 282, in __call__
rval = self._func(*wrapped_args, **wrapped_kwargs)
OSError: [Errno 22] Invalid argument: b'/var/tmp/portage/sys-apps/help2man-1.48.5/files'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/lib/python3.9/asyncio/events.py", line 80, in _run
self._context.run(self._callback, *self._args)
File "/usr/lib/python3.9/site-packages/_emerge/AsynchronousTask.py", line 210, in _exit_listener_cb
listener(self)
File "/usr/lib/python3.9/site-packages/_emerge/EbuildPhase.py", line 187, in _async_start_exit
self._start_lock()
File "/usr/lib/python3.9/site-packages/_emerge/EbuildPhase.py", line 210, in _start_lock
self._start_ebuild()
File "/usr/lib/python3.9/site-packages/_emerge/EbuildPhase.py", line 248, in _start_ebuild
_prepare_fake_filesdir(self.settings)
File "/usr/lib/python3.9/site-packages/portage/package/ebuild/prepare_build_dirs.py", line 486, in _prepare_fake_filesdir
os.symlink(real_filesdir, symlink_path)
File "/usr/lib/python3.9/site-packages/portage/__init__.py", line 282, in __call__
rval = self._func(*wrapped_args, **wrapped_kwargs)
FileExistsError: [Errno 17] File exists: b'/usr/portage/sys-apps/help2man/files' -> b'/var/tmp/portage/sys-apps/help2man-1.48.5/files'
[1] 18104 terminated sudo emerge -auvND --keep-going @world
Released in portage-3.0.27. |