[pacman-dev] Option Depency Ideas

Dan McGee dpmcgee at gmail.com
Sun Nov 4 13:41:30 EST 2007


On Nov 2, 2007 4:02 PM, Jeff 'codemac' Mickey <jeff at archlinux.org> wrote:
> The next steps appear to be the following:
>
> * makepkg should recognize the 'pkg:reason for package being option' format
>   I've seen thrown around.

What do you mean by "recognize" here? I'm thinking that on install we
should ensure that in addition to the depends and makedepends being
installed, we also have all of the optdepends installed. This would
ensure anyone using the package can use all the features the
optdepends packages would provide. Of course, this should be skippable
the same way other depends checks can be skipped (with the -d flag).
The only caveat is that you have to parse the package name out of the
array first (quite easy with bash once you figure out the syntax
however).

> * 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?"
Tricky with our current events system. Talk to (pester?) Aaron about
fixing this. :)

>     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.)
At least as a first step, just printing them in some format might not
be a bad idea. You could probably even omit the printing of those
entries that are already installed anyway.

>     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.
-1, not kiss.

>     o Something else I haven't thought of.
You didn't take into account the case where an optdepend was already
installed and we want to use it, or even the more obscure case where
it is installed but we DON'T want to use it.

>
> * 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%
I don't think having depends/requiredby entries out of sync is a good
idea, given the primitive nature of our DB. See last comment above as
well.

> * 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.
Hmm. This will need more thought. I guess I want to keep OPTDEPENDS as
unobtrusive as possible, and this starts to break that.

>
> * 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.

I don't know if I gave you enough to work with there, so let me know.

-Dan




More information about the pacman-dev mailing list