[pacman-dev] "explicit dependencies", a compromise between explicit and deps

Dieter Plaetinck dieter at plaetinck.be
Sun Oct 12 07:25:38 EDT 2008


Hi,
pacman has an option --asdeps so the user can install packages as if it 
were deps.  In fact, such packages will be treated exactly the same as 
normal dependencies:
 - if no explicit package depends on them, they will be considered 
orphans and are subject to be cleaned up, along with 'real' orphans.
       This can be a good thing when the user installs the packages 
--asdeps assuming a package will state them as dep later on.  if doesn't 
happen it can really be considered an orphan and can be deleted.
       This can be a bad thing when the user installs the packages 
--asdeps because no package states the dependencies on them, but they 
are needed/wanted for some reason.  (Often this means the "dependent" 
package misses a dependency and this package should be fixed, but not 
always)
- in a backup/restore or clone system scenario the usual approach is to 
do 'pacman -Qe' to get a package list.  When restoring/installing the 
list on another box this means we install only the explicit packages and 
their dependencies.  Some packages we installed ourself --asdeps will 
get lost.  This is not always good.  A current workaround would be to 
install these packages explicitly, but doesn't always feel right either 
because we don't want the package explictly, although we do want them 
because they provide features to a package even though it's not really 
needed.  In fact, this is very similar to the 'recommends' directive in 
debian package.  Many arch packages literally say 'install x to have 
feature foo, install y to have feature bar' (these are the 'recommended' 
packages).  If the user then installs x or y they are not really 
explicit packages (because we only want them because we use another 
package that recommends them), but they are not dependencies either 
(otherwise they will get lost)


What I propose is an intermediate state between 'explicit' and 
'dependency', called 'explicit dependency'.  This would be the new 
default way when the user wants to install something as a dep (usually 
because a package recommended it), whereas the 'old' '--asdeps' installs 
a package as a 'real' dependency (eg: do this only when you're sure 
you'll install a package that depends on them, otherwise the package 
will be an orphan and get cleaned up someday or not be restored when 
restoring/cloning a system)


What are your ideas?
Thanks,
Dieter




More information about the pacman-dev mailing list