summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-26 18:04:14 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-26 18:04:14 -0700
commit2cdbbf07b13e5ec0d7f033ed6bbdae57235f9158 (patch)
treebf4931e8d51334a91deb0d5bec1f0abfa50b4498
parenteb4c1668945d9ecb8d317ea2ea6f9794b8cd46af (diff)
downloadportage-2cdbbf07b13e5ec0d7f033ed6bbdae57235f9158.tar.gz
portage-2cdbbf07b13e5ec0d7f033ed6bbdae57235f9158.tar.bz2
portage-2cdbbf07b13e5ec0d7f033ed6bbdae57235f9158.zip
Make LicenseManager.__deepcopy__() do a shallow copy of _license_groups
since internal policy ensures lack of mutation, and fix memo usage for the other immutable attributes.
-rw-r--r--pym/portage/package/ebuild/_config/LicenseManager.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/pym/portage/package/ebuild/_config/LicenseManager.py b/pym/portage/package/ebuild/_config/LicenseManager.py
index c70344538..4ce1123b0 100644
--- a/pym/portage/package/ebuild/_config/LicenseManager.py
+++ b/pym/portage/package/ebuild/_config/LicenseManager.py
@@ -37,11 +37,16 @@ class LicenseManager(object):
# immutable attributes
result._accept_license_str = self._accept_license_str
+ memo[id(self._accept_license_str)] = self._accept_license_str
result._accept_license = self._accept_license
+ memo[id(self._accept_license)] = self._accept_license
+
+ # immutable attributes (internal policy ensures lack of mutation)
+ result._license_groups = self._license_groups
+ memo[id(self._license_groups)] = self._license_groups
# mutable attributes
result._plicensedict = deepcopy(self._plicensedict, memo)
- result._license_groups = deepcopy(self._license_groups, memo)
result._undef_lic_groups = deepcopy(self._undef_lic_groups, memo)
return result