[pacman-dev] Doing more stuff with optdepends
Hi, I have been thinking about optdepends and if we can improve the handling of them. So, given I am better at making wiki pages than patches... http://wiki.archlinux.org/index.php/User:Allan/Pacman_OptDepends What do people think about this idea? Are there other sensible additions to that proposal? I know that optdepends were originally for getting rid of informational messages but I have some packages on my system that are installed "explicitly" when they are really (opt)deps for other packages. Allan
One thing I've thought about is sometimes we have an executable that only works with an opt depends installed. Running that executable will give a nasty error message about unable to find library. It'd be nice to have some kind of "This program requires the gtk+ package, please install with pacman -S gtk+". Similar to what ubuntu does with a bunch of common linux programs. I don't have any great ideas on implementation though. I think it'd have to be some kind of system where packages register their optdepends and have an install and uninstall action, then when pacman installs a package it checks to see if any already installed packages have registered that one as an optdepends and execute the install action for that package. On Thu, Mar 5, 2009 at 7:15 PM, Allan McRae <allan@archlinux.org> wrote:
Hi,
I have been thinking about optdepends and if we can improve the handling of them. So, given I am better at making wiki pages than patches...
http://wiki.archlinux.org/index.php/User:Allan/Pacman_OptDepends
What do people think about this idea? Are there other sensible additions to that proposal?
I know that optdepends were originally for getting rid of informational messages but I have some packages on my system that are installed "explicitly" when they are really (opt)deps for other packages.
Allan
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
On Thu, Mar 5, 2009 at 8:08 PM, Kevin Barry <barryk@gmail.com> wrote:
One thing I've thought about is sometimes we have an executable that only works with an opt depends installed. Running that executable will give a nasty error message about unable to find library.
That is a bug on an Arch system, plain and simple. Unless you mean on some extra obscure tool included in the package (for example, doxywizard in doxygen, a package I maintain). -Dan
Kevin Barry wrote:
One thing I've thought about is sometimes we have an executable that only works with an opt depends installed. That sounds more like an application that should have the dependency in "depends" instead of "optdepends".
__________ Brendan Hide
On Fri, 06 Mar 2009 10:15:10 +1000 Allan McRae <allan@archlinux.org> wrote:
Hi,
I have been thinking about optdepends and if we can improve the handling of them. So, given I am better at making wiki pages than patches...
http://wiki.archlinux.org/index.php/User:Allan/Pacman_OptDepends
What do people think about this idea? Are there other sensible additions to that proposal?
I know that optdepends were originally for getting rid of informational messages but I have some packages on my system that are installed "explicitly" when they are really (opt)deps for other packages.
Allan
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
Some good suggestions. 1) Re: "optdepends are not orphans unless a flag is specified". Maybe you could also just show the listing of all "orphans" (including optdeps) and next to it add something like "(optdep for package foo, bar)" where appropriate. 2) I would really like a way to just "list all installed optdeps". that way. if you want to "clone" all installed packages to another system, you just need the list of installed packages and a list of the optdeps. (if you like the idea from the previous point, I can use that and just grep on optdep and I'm happy). Or maybe even one list of all explicit packages, with next to them their installed optdeps. 3)Re: "optdepends can be removed with -Rs" isn't this just the consequence of optdeps being installed with --asdep? Dieter
Dieter Plaetinck wrote:
On Fri, 06 Mar 2009 10:15:10 +1000 Allan McRae <allan@archlinux.org> wrote:
Hi,
I have been thinking about optdepends and if we can improve the handling of them. So, given I am better at making wiki pages than patches...
http://wiki.archlinux.org/index.php/User:Allan/Pacman_OptDepends
What do people think about this idea? Are there other sensible additions to that proposal?
I know that optdepends were originally for getting rid of informational messages but I have some packages on my system that are installed "explicitly" when they are really (opt)deps for other packages.
Allan
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
Some good suggestions.
1) Re: "optdepends are not orphans unless a flag is specified".
Maybe you could also just show the listing of all "orphans" (including optdeps) and next to it add something like "(optdep for package foo, bar)" where appropriate.
I would like a way of separating them because I think it is quite common to do a "pacman -Rs $(pacman -Qqtd)". Well, at least it is for as I install anything I test with "--asdep". I have changed that a bit as the stuff in brackets should not be printed with the -Qq flag.
2) I would really like a way to just "list all installed optdeps". that way. if you want to "clone" all installed packages to another system, you just need the list of installed packages and a list of the optdeps. (if you like the idea from the previous point, I can use that and just grep on optdep and I'm happy). Or maybe even one list of all explicit packages, with next to them their installed optdeps.
Well, I think in my proposal "pacman -Qtd --optdep | grep optdepend | cut -f1 -d' '", or something like that would work for this.
3)Re: "optdepends can be removed with -Rs" isn't this just the consequence of optdeps being installed with --asdep?
Sort of. It is mainly a consequence of pacman recognizing them as a dependency of the parent package, but --asdep of course plays a part. Feel free to add comments to the wiki page. I made it primarily for brainstorming. Allan
Let me add more fire here: what I feel is really missing is an option (maybe a pmtransflag for implementation details) for installing optdepends. Otherwise, even with those suggestions, they really remain nothing but some lines of text. It could be implemented as a flag (better imho) or as a pacman.conf option On Friday 06 March 2009 01:15:10 Allan McRae wrote:
Hi,
I have been thinking about optdepends and if we can improve the handling of them. So, given I am better at making wiki pages than patches...
http://wiki.archlinux.org/index.php/User:Allan/Pacman_OptDepends
What do people think about this idea? Are there other sensible additions to that proposal?
I know that optdepends were originally for getting rid of informational messages but I have some packages on my system that are installed "explicitly" when they are really (opt)deps for other packages.
Allan
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
-- ------------------- Dario Freddi KDE Developer GPG Key Signature: 511A9A3B
On Tue, 24 Mar 2009 18:59:35 +0100 Dario Freddi <drf54321@gmail.com> wrote:
Let me add more fire here: what I feel is really missing is an option (maybe a pmtransflag for implementation details) for installing optdepends. Otherwise, even with those suggestions, they really remain nothing but some lines of text. It could be implemented as a flag (better imho) or as a pacman.conf option
Well, you can install optdeps as regular deps, if you combine that with the new tricks that are proposed on Allan's wiki page then most (all?) use cases should be taken care of (cleaning up orphans, etc) without the need for anything too drastic. Dieter
On Friday 06 March 2009 01:15:10 Allan McRae wrote:
Hi,
I have been thinking about optdepends and if we can improve the handling of them. So, given I am better at making wiki pages than patches...
http://wiki.archlinux.org/index.php/User:Allan/Pacman_OptDepends
What do people think about this idea? Are there other sensible additions to that proposal?
I know that optdepends were originally for getting rid of informational messages but I have some packages on my system that are installed "explicitly" when they are really (opt)deps for other packages.
Allan
_______________________________________________ pacman-dev mailing list pacman-dev@archlinux.org http://www.archlinux.org/mailman/listinfo/pacman-dev
Dieter Plaetinck wrote:
On Tue, 24 Mar 2009 18:59:35 +0100 Dario Freddi <drf54321@gmail.com> wrote:
Let me add more fire here: what I feel is really missing is an option (maybe a pmtransflag for implementation details) for installing optdepends. Otherwise, even with those suggestions, they really remain nothing but some lines of text. It could be implemented as a flag (better imho) or as a pacman.conf option
Well, you can install optdeps as regular deps, if you combine that with the new tricks that are proposed on Allan's wiki page then most (all?) use cases should be taken care of (cleaning up orphans, etc) without the need for anything too drastic.
I think Dario means a flag/config option for installing a package and ALL deps including optdepends. I have added that to the wiki page. Allan Allan
participants (6)
-
Allan McRae
-
Brendan Hide
-
Dan McGee
-
Dario Freddi
-
Dieter Plaetinck
-
Kevin Barry