Gentoo Archives: gentoo-dev

From: "Marijn Schouten (hkBst)" <hkBst@g.o>
To: gentoo-dev@l.g.o
Subject: Re: [gentoo-dev] Dependencies that're available at pkg_*inst
Date: Sat, 19 Apr 2008 16:41:37
Message-Id: 480A1FEE.4020604@gentoo.org
In Reply to: [gentoo-dev] Dependencies that're available at pkg_*inst by Ciaran McCreesh
1 -----BEGIN PGP SIGNED MESSAGE-----
2 Hash: SHA1
3
4 Ciaran McCreesh wrote:
5 | I'm rewording the PMS sections on dependencies to avoid permitting
6 | overly lax circular dependency resolution. Which of these wordings is
7 | accurate, given that usable means "has its RDEPENDs installed and
8 | usable"?
9 |
10 | 1. During pkg_preinst and pkg_postinst, any package dependency that is
11 | in both DEPEND and RDEPEND must be installed and usable.
12 |
13 | 2. During pkg_preinst and pkg_postinst, at least one of the following
14 | conditions must be met:
15 | a. every package dependency in DEPEND must be installed and usable
16 | b. every package dependency in RDEPEND must be installed and usable
17 |
18 | Do not attempt to write on both sides of the paper at once.
19
20 Every package dependency in DEPEND is installed and usable before src_unpack starts,
21 right? So is the question here whether or not they can be uninstalled right before
22 pkg_{pre,post}inst starts?
23
24 I don't know what the general use of pkg_preinst is, but in pkg_postinst the package
25 itself should be runnable, so its RDEPENDS should be installed and usable at this point.
26 So perhaps we should define that "usable" means "each of its RDEPENDs is installed and has
27 had its pkg_postinst function run". The recursion of that definition then comes from the
28 requirement that RDEPENDs should be usable before pkg_postinst starts running.
29
30 | For why this matters:
31 |
32 | cat/a-1: RDEPEND cat/b
33 | cat/b-1: RDEPEND cat/a
34 |
35 | This is solvable. If package managers can't solve this, they can't
36 | install Gnome off a stage 3...
37
38 If only one of those packages has a pkg_postinst then it is still solvable.
39 If they both have a pkg_postinst then one of those is probably not essential for the
40 actual usability of the package and should be removed. A final possibility is that the
41 pkg_postinsts are both necessary for a fully functional package but not for the
42 functionality used in the other pkg_postinst. If this is the case, then perhaps we should
43 specify deps according to which ebuild phase they are necessary for?
44
45 cat/a:
46
47 SRC_UNPACK_DEP="app-arch/unzip"
48 SRC_COMPILE_DEP="dev-scheme/bigloo"
49 SRC_INSTALL_DEP=""
50
51 PKG_PREINST_DEP=""
52 PKG_POSTINST_DEP="cat/b"
53 RDEPEND="cat/b"
54
55 and then cat/b would say:
56
57 PKG_PREINST_DEP=""
58 PKG_POSTINST_DEP=""
59 RDEPEND="cat/a"
60
61
62 Marijn
63
64 - --
65 Marijn Schouten (hkBst), Gentoo Lisp project, Gentoo ML
66 <http://www.gentoo.org/proj/en/lisp/>, #gentoo-{lisp,ml} on FreeNode
67 -----BEGIN PGP SIGNATURE-----
68 Version: GnuPG v2.0.9 (GNU/Linux)
69 Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
70
71 iEYEARECAAYFAkgKH+4ACgkQp/VmCx0OL2xJOwCfdEO5IhWbjPvFRidzgdyFanEd
72 0v4An26a2XJ9Y4hwDz/bpqeUWeDMXAuk
73 =v/UL
74 -----END PGP SIGNATURE-----
75 --
76 gentoo-dev@l.g.o mailing list

Replies

Subject Author
Re: [gentoo-dev] Dependencies that're available at pkg_*inst Ciaran McCreesh <ciaran.mccreesh@××××××××××.com>