[pacman-dev] Option Depency Ideas
Jeff 'codemac' Mickey
jeff at archlinux.org
Fri Nov 2 18:02:39 EDT 2007
Hello all.
I figure I should start flexing my "zomg coding" muscles a little more for
the benefit of arch. What interests me the most right now is optional
dependencies. In my local git tree I have added pactest support for
testing option dependencies, but I only have one joke of a pactest that
checks.
Thanks to Dan, a lot of the work that I really would have a harder time
getting right has all ready been done, in adding the right lines to
makepkg, libalpm, and pacman so that the optional dependencies are recorded
in the db. Right now they are only recognized as simple strings, not as
packages with dependency resolution or any of that fun stuff (correct me if
I'm wrong here Dan).
The next steps appear to be the following:
* makepkg should recognize the 'pkg:reason for package being option' format
I've seen thrown around.
* When a package is installed with optional dependencies, we can do a
couple different things.
o Ask the user right there with the "Install package foo for xyz
support?"
o Ask the user to explicitly install the optional deps themselves (I
don't think this is good at all. This wouldn't keep them listed as
"installed as a dependency" and we could just have echo statements in
the .install then.)
o Check for some kind of /etc/pacman.conf var that lists what packages
users don't mind having as optional dependencies, otherwise ask them
to install them.
o Something else I haven't thought of.
* When an optional dependency is installed through one of the 3 ways listed
above, we need to install it as a dependency, and add it to %DEPENDS%,
leave it in %OPTDEPENDS%, and not put it in %REQUIREDBY%
* When an optional dependency is uninstalled that was only ever installed
as a dependency, we can do several things.
o We warn the user that they are losing functionality, and remove it
from the %DEPENDS% array in the parent.
o We let pacman handle it like it does dependcies, this is what we get
when we add the optional dependency to just %DEPENDS% and not
%REQUIREDBY%
o Something else I haven't thought of.
* When a package with optional dependencies is removed, it should also
remove all other packages that have been moved into %DEPENDS% haven't
been explicitly installed. I believe this is funcitonality that we get
by adding it to the %DEPENDS% array anyways.
I just wanted to get these thoughts out there. I thought I was just going
to implement basic -Qi functionality and then address these.. but Dan is a
beast and jumped the gun on me.
I would like to hear all of your thoughts on the above ideas, and let's
flesh out what action we'd like to see pacman take based on these
difference scenarios.
// jeff
--
.: [ + carpe diem totus tuus + ] :.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://archlinux.org/pipermail/pacman-dev/attachments/20071102/7bc8f366/attachment.pgp>
More information about the pacman-dev
mailing list