support _path for symlinkoption and root OD
This commit is contained in:
@ -298,7 +298,8 @@ class Base:
|
||||
_setattr(self, '_extra', tuple([tuple(extra.keys()), tuple(extra.values())]))
|
||||
|
||||
def impl_is_readonly(self) -> str:
|
||||
return not isinstance(getattr(self, '_informations', dict()), dict)
|
||||
# _path is None when initialise SymlinkOption
|
||||
return hasattr(self, '_path') and self._path is not None
|
||||
|
||||
def impl_getproperties(self) -> FrozenSet[str]:
|
||||
return getattr(self, '_properties', frozenset())
|
||||
|
@ -150,9 +150,8 @@ class CacheOptionDescription(BaseOption):
|
||||
raise ValueError(_('malformed requirements option "{0}" '
|
||||
'must not be a multi for "{1}"').format(
|
||||
require_opt.impl_getname(), option.impl_getname()))
|
||||
if not hasattr(option, '_path'):
|
||||
option._path = subpath
|
||||
option._set_readonly()
|
||||
option._path = subpath
|
||||
option._set_readonly()
|
||||
if init:
|
||||
if __debug__ and len(cache_option) != len(set(cache_option)):
|
||||
for idx in range(1, len(cache_option) + 1):
|
||||
@ -169,6 +168,7 @@ class CacheOptionDescription(BaseOption):
|
||||
opt.impl_getname()))
|
||||
self._cache_consistencies[opt] = tuple(cons)
|
||||
self._cache_force_store_values = force_store_values
|
||||
self._path = subpath
|
||||
self._set_readonly()
|
||||
|
||||
def impl_build_force_store_values(self,
|
||||
|
@ -38,6 +38,7 @@ class SymLinkOption(BaseOption):
|
||||
_setattr(self, '_name', name)
|
||||
_setattr(self, '_opt', opt)
|
||||
opt._add_dependency(self)
|
||||
self._path = None
|
||||
|
||||
def __getattr__(self,
|
||||
name: str) -> Any:
|
||||
|
Reference in New Issue
Block a user