1 |
Hi! |
2 |
|
3 |
I'm having an issue with the openafs-ebuild, and I don't see a |
4 |
solution for the moment. I wondered if someone on the list would: |
5 |
|
6 |
Prerequisite: |
7 |
The ebuild needs to create the /afs directory, and remove that same |
8 |
directory when it is uninstalled. |
9 |
|
10 |
The obvious solution seems to do "keepdir", so portage would attempt |
11 |
to make the directory and put a .keep file in there. I say attempt, |
12 |
because the following problem will occur during an re-merge or |
13 |
upgrade, while the mountpoint is in use: |
14 |
!!! Cannot write to '/afs'. |
15 |
!!! Please check permissions and directories for broken symlinks. |
16 |
etc. |
17 |
(This is related to bug #9849, if I'm not mistaken) |
18 |
|
19 |
The currently implemented solution is to do |
20 |
pkg_prerm() |
21 |
{ |
22 |
rmdir /afs 2> /dev/null |
23 |
} |
24 |
pkg_postinst() |
25 |
{ |
26 |
mkdir /afs 2> /dev/null |
27 |
} |
28 |
which works fine when remerging an already emerged ebuild. That's |
29 |
because pkg_prerm is ran first, and pkg_postinst afterwards. |
30 |
However, during an upgrade, pkg_prerm of the old version is ran |
31 |
_after_ pkg_postinst of the new version. This results in the |
32 |
directory disappearing, and therefore afs failing to start. |
33 |
|
34 |
Any input is greatly appreciated, |
35 |
Thanks, |
36 |
Stefaan |
37 |
|
38 |
-- |
39 |
gentoo-dev@g.o mailing list |