With sys-apps/portage-2.2_rc13, getdelta.sh waits forever, because it calls GENTOO_MIRRORS="" emerge -fOp =category/package-version to get the non-mirrored address which then (because it is called from emerge via FETCHOMMAND) sees a lockfile and waits for the mother process to finish... This did not happen with =sys-apps/portage-2.2_rc12 or earlier versions, and indeed it seems that there should not be a reason to wait for a lockfile. If this is technically too hard, perhaps another command could be provided which app-portage/getdelta could use, or - even better - the non-mirrored address could be passed in an environment variable to FETCHOMMAND (which would speed up gedelta quite a bit and perhaps also has other uses).
(In reply to comment #0) > This did not happen with =sys-apps/portage-2.2_rc12 or earlier versions, > and indeed it seems that there should not be a reason to wait for a lockfile. It's only needed for cases when the pkg_nofetch() phase has to be executed (bug #241118). In this case, the locked directory is used to collect elog messages and to provide a safe working directory for bug #239560. In order to avoid the need to lock the directory, we can use mkdtemp() to allocate a temporary directory. > If this is technically too hard, perhaps another command could be provided > which app-portage/getdelta could use, or - even better - the non-mirrored > address could be passed in an environment variable to FETCHOMMAND > (which would speed up gedelta quite a bit and perhaps also has other uses). I'm not sure exactly what's required here. In some cases there are multiple non-mirrored URIs available, and in other cases only mirrored URIs are available.
(In reply to comment #1) > I'm not sure exactly what's required here. In some cases there are multiple > non-mirrored URIs available, and in other cases only mirrored URIs are > available. I am not an author of getdelta and can only guess what happens on the server side. However, the script simply considers the words (space or newline separated) output by GENTOO_MIRRORS="" emerge -fOp =category/package-version and uses the last of those word which is an address and contains the filename to be fetched. So I guess just putting the output which you would get with GENTOO_MIRRORS="" into some variable (optionally eliminating those entries which do not end with the name for the current file to be fetched) would be sufficient for getdelta.
Created attachment 170521 [details, diff] use a private temp directory instead of the main one If this patch is saved as /tmp/fetch_tmp.patch, then it can be applied as follows: patch /usr/lib/portage/pym/_emerge/__init__.py /tmp/fetch_tmp.patch
Thanks. The patch works smoothly.
This is fixed in 2.2_rc14.