aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2021-01-21 17:00:16 -0800
committerZac Medico <zmedico@gentoo.org>2021-01-21 17:11:35 -0800
commit8b5f9678200964c3cbb2eb06b58ebfa138fbac45 (patch)
treee91f630cde7bf52cdbf4597ea4966d076d7f25f0
parentUpdates for portage-3.0.14 release (diff)
downloadportage-8b5f9678200964c3cbb2eb06b58ebfa138fbac45.tar.gz
portage-8b5f9678200964c3cbb2eb06b58ebfa138fbac45.tar.bz2
portage-8b5f9678200964c3cbb2eb06b58ebfa138fbac45.zip
emirrordist: prevent distfiles_db _pkg_str pickle problems
When storing a cpv as a shelve value, convert _pkg_str to str in order to prevent pickle problems. Bug: https://bugs.gentoo.org/766459 Signed-off-by: Zac Medico <zmedico@gentoo.org>
-rw-r--r--lib/portage/_emirrordist/FetchTask.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/portage/_emirrordist/FetchTask.py b/lib/portage/_emirrordist/FetchTask.py
index 41f96b962..997762082 100644
--- a/lib/portage/_emirrordist/FetchTask.py
+++ b/lib/portage/_emirrordist/FetchTask.py
@@ -44,7 +44,8 @@ class FetchTask(CompositeTask):
if self.config.distfiles_db is not None and \
self.distfile not in self.config.distfiles_db:
self._previously_added = False
- self.config.distfiles_db[self.distfile] = self.cpv
+ # Convert _pkg_str to str in order to prevent pickle problems.
+ self.config.distfiles_db[self.distfile] = str(self.cpv)
if not self._have_needed_digests():
msg = "incomplete digests: %s" % " ".join(self.digests)