[pacman-dev] pacman PKGBUILD needs depends=(python)

Roman Kyrylych roman.kyrylych at gmail.com
Sat Mar 31 11:02:23 EDT 2007


2007/3/31, Nagy Gabor <ngaba at petra.hos.u-szeged.hu>:
> > On a side note, what do you guys think about "optdepends"?
> I like the idea, the name is not so important. However, it doesn't help
> too much without a description (because optdepend=python isn't very
> informative: I'd like to know what are the extra features).
> And optdepends should be store in db or not? Because if not,
> optdepend can be easily removed after -Qe; or the optdepend can be
> broken after -S. And probably there are more complicated cases, where
> user's interaction needed to decide whether keep optdepend or not.
> Again, I like the idea, but it's not so easy to implement.

Database should track "optional dependencies" too. (yep, I don't like
"dependency" word for optional things, I prefer "uses=(...)" notation)

AFAIR an implementation with descripion was proposed on this ML, like:
uses=(python-libnotify:"support for system tray popups" ...)

I'd like to point a more serious issue:
how to select those additional packages ("optional dependencies") for
download during, i.e. pacman -S gnome?
Two choices:
1) ask user for every such package _before_download_ - then
description of each optional package should be displayed at this time
(which requires storing them in PKGBUILDs and repo DB)
2) ask user for every such package right after installation of package
that makes use of them - then description of each optional package
should be stored and displayed in post_install of package that uses
it.

I strongly prefer the second choice. It's much simpler and doesn't
differ much from the current way of installing optional packages.
Then we'll have this:
1) pacman -S gnome (or any other group or big package with many depends)
(optional) pacman asks for each package in group
2) pacman lists all packages that are going to be installed
3) pacman installs those packages, displaying post_install messages if
they exist, i.e.:
  installing foobar...
  :: foobar can make use of following packages if present:
  :: python-libnotify - systray popups support
  :: libfoo - blah-blah-blah
4) pacman notices uses=(python-libnotify libfoo) in package info and prints:
Install python-libnotify [y/N]? y
Install libfoo [y/N]?
5) now installation of package is fully finished, pacman writes to
local db entry:
  %USES%
  python-libnotify
  !libfoo
so it knows that python-libnotify was selected by user and libfoo wasn't.

There's one more important point: when python-libnotify was already
installed before foobar, then pacman should print:
  python-libnotify: already installed
and think about it like it was user's choice

And about uninstalling:
pacman should warn user when he/she wants to uninstall python-libnotify:
  The following packages make use of python notify: foobar
  Uninstalling it may disable some functionality in those packages.
  Proceed with uninstall [y/N]?

I think all issues will be thought out thhoroughly during early stages
of implementation.

-- 
Roman Kyrylych (Роман Кирилич)


More information about the pacman-dev mailing list