1 |
On Tue, 18 Nov 2014 01:19:01 -0800 |
2 |
Zac Medico <zmedico@g.o> wrote: |
3 |
|
4 |
> If there are packages to be merged or unmerge, then bail out early if |
5 |
> /var/db/pkg is not writable. |
6 |
> |
7 |
... |
8 |
|
9 |
> diff --git a/pym/portage/dbapi/vartree.py |
10 |
> b/pym/portage/dbapi/vartree.py index 0fd1bd9..64b0ff6 100644 |
11 |
> --- a/pym/portage/dbapi/vartree.py |
12 |
> +++ b/pym/portage/dbapi/vartree.py |
13 |
> @@ -33,6 +33,7 @@ portage.proxy.lazyimport.lazyimport(globals(), |
14 |
> 'portage.util.env_update:env_update', |
15 |
> 'portage.util.listdir:dircache,listdir', |
16 |
> 'portage.util.movefile:movefile', |
17 |
> + 'portage.util.path:first_existing', |
18 |
> 'portage.util.writeable_check:get_ro_checker', |
19 |
|
20 |
^^^^^^^^^^^^^^^^^^^^^^^^ |
21 |
That's what this was suppose to fix I thought |
22 |
|
23 |
> 'portage.util._dyn_libs.PreservedLibsRegistry:PreservedLibsRegistry', |
24 |
> 'portage.util._dyn_libs.LinkageMapELF:LinkageMapELF@LinkageMap', |
25 |
> @@ -189,6 +190,14 @@ class vardbapi(dbapi): |
26 |
> self._cached_counter = None |
27 |
> |
28 |
> @property |
29 |
> + def writable(self): |
30 |
> + """ |
31 |
> + @rtype: bool |
32 |
> + @return: True if var/db/pkg is writable, False |
33 |
> otherwise |
34 |
> + """ |
35 |
> + return os.access(first_existing(self._dbroot), |
36 |
> os.W_OK) + |
37 |
> + @property |
38 |
> def root(self): |
39 |
> warnings.warn("The root attribute of " |
40 |
> "portage.dbapi.vartree.vardbapi" |
41 |
|
42 |
|
43 |
|
44 |
-- |
45 |
Brian Dolbec <dolsen> |