On 9/8/07, Karen Tung <Karen.Tung at sun.com> wrote:

> > How does subtraction work? In particular, does the distribution description
> > know which packages were specified, and which were added to satisfy
> > dependencies? And if a package were subtracted, what happens to those
> > other packages that were only added in order to satisfy the dependencies
> > of the now removed package?
> >
>
> Given an existing distribution, the Distro Construction will be able to
> figure out which packages
> are included in that distribution.  If you add package(s), all other
> packages that these new packages
> depend on will be included as well.  If you subtract package(s), we will
> examine the dependent
> packages of the package to be deleted.  If those are not used by other
> packages that will still
> remain in the distribution, they will be deleted as well.

That's what I thought. Unfortunately this approach doesn't work. There
are a couple of problems:

1. It's important to differentiate between those packages/clusters
that are explicitly included in a distribution, and those that only get
included in order to satisfy dependencies. When I remove a package,
it should only cause adjustments to the additional dependencies - it
should not remove other packages that are explicitly present.

As an example, suppose I define a distribution that is an application
server. As a convenience, I also add a graphical configuration
tool,which depends on the application server - in fact, it's the only thing
that depends on the application server. Someone else could come
along and decide they want to build a non-graphical version of this
distribution. So they remove the cofiguration tool. If you follow the
dependency tree then you could end up deleting the application
server, which would not be the desired outcome. Instead, the DC
should know that the application server was explictly included as
part of this ditribution and not remove it as a result of dependency
checking.

2. As another case of the above, I would expect that (in the main)
if I was using the DC, that changes would be reversible. In other
words, if I add a leaf package and remove it, then it should make
no  other changes to the list (even if removing it led to packages
which had no dependents).

-- 
-Peter Tribble
http://www.petertribble.co.uk/ - http://ptribble.blogspot.com/

Reply via email to