On 11/7/19 1:01 PM, Zac Medico wrote: > After rename of a nonexistent symlink target fails, detect a > broken symlink and simply delete it. > > Fixes: 0d34d89d5028 ("emirrordist: Implement mirror layout.conf support") > Bug: https://bugs.gentoo.org/699400 > Signed-off-by: Zac Medico <zmed...@gentoo.org> > --- > lib/portage/_emirrordist/DeletionTask.py | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/lib/portage/_emirrordist/DeletionTask.py > b/lib/portage/_emirrordist/DeletionTask.py > index 5eb01d840..49f13ddf7 100644 > --- a/lib/portage/_emirrordist/DeletionTask.py > +++ b/lib/portage/_emirrordist/DeletionTask.py > @@ -28,6 +28,11 @@ class DeletionTask(CompositeTask): > recycle_path) > except OSError as e: > if e.errno != errno.EXDEV: > + if > os.path.islink(self.distfile_path) and not os.path.exists(self.distfile_path): > + self._delete_links() > + self._async_wait() > + return > + > logging.error(("rename %s from > distfiles to " > "recycle failed: %s") % > (self.distfile, e)) > else: >
Actually, I withdraw this patch since we shouldn't have a symlink here since self.distfile_path was added: https://gitweb.gentoo.org/proj/portage.git/commit/?id=af9c77bd037694164755d06034a74456ec45e3ab -- Thanks, Zac
signature.asc
Description: OpenPGP digital signature