Difference between revisions of "User:Allan/Pacman OptDepends"

From ArchWiki
Jump to: navigation, search
(Example)
Line 3: Line 3:
 
Currently '''optdepends''' in pacman serve no purpose other than informational.  It would be good to improve this somewhat.
 
Currently '''optdepends''' in pacman serve no purpose other than informational.  It would be good to improve this somewhat.
  
=Example=
+
'''example package with optdepends'''
 
  > pacman -S python
 
  > pacman -S python
 
  Optional dependencies for python
 
  Optional dependencies for python
 
     tk: for IDLE, pynche and modulator
 
     tk: for IDLE, pynche and modulator
 
 
  > pacman -Qi python
 
  > pacman -Qi python
 
  Optional Deps : tk: for IDLE, pynche and modulator
 
  Optional Deps : tk: for IDLE, pynche and modulator
  
 +
'''pacman recognises installed optdepends'''
 
  > pacman -S --asdep tk
 
  > pacman -S --asdep tk
 
  > pacman -Qi python
 
  > pacman -Qi python
 
  Optional Deps : tk: for IDLE, pynche and modulator (installed)
 
  Optional Deps : tk: for IDLE, pynche and modulator (installed)
  
 +
'''optdepends are not orphans unless a flag is specified'''
 
  > pacman -Qqtd
 
  > pacman -Qqtd
 
  > pacman -Qqtd --optdep
 
  > pacman -Qqtd --optdep
 
  tk (optdepend for python)
 
  tk (optdepend for python)
  
 +
'''optdepends can be removed with -Rs'''
 
  > pacman -Rs python
 
  > pacman -Rs python
 
  Remove (2): python-2.6.1-1  tk-8.5.6-1
 
  Remove (2): python-2.6.1-1  tk-8.5.6-1
  
 +
'''information about optdepends is not output if an optdepends package is installed
 
  > pacman -S tk
 
  > pacman -S tk
 
  > pacman -S python
 
  > pacman -S python
 
  (no optional dependencies notification output)
 
  (no optional dependencies notification output)
 
=Actual changes to make=
 
* pacman recognises installed optdepends when using -Qi
 
* pacman includes optdepends as dependencies when looking for orphans (unless flag is specified)
 
* pacman only output information about uninstalled optdepends on package install
 

Revision as of 00:01, 6 March 2009

The Idea

Currently optdepends in pacman serve no purpose other than informational. It would be good to improve this somewhat.

example package with optdepends

> pacman -S python
Optional dependencies for python
    tk: for IDLE, pynche and modulator
> pacman -Qi python
Optional Deps : tk: for IDLE, pynche and modulator

pacman recognises installed optdepends

> pacman -S --asdep tk
> pacman -Qi python
Optional Deps : tk: for IDLE, pynche and modulator (installed)

optdepends are not orphans unless a flag is specified

> pacman -Qqtd
> pacman -Qqtd --optdep
tk (optdepend for python)

optdepends can be removed with -Rs

> pacman -Rs python
Remove (2): python-2.6.1-1  tk-8.5.6-1

information about optdepends is not output if an optdepends package is installed

> pacman -S tk
> pacman -S python
(no optional dependencies notification output)