[wpkg-users] [Bug 121] additional EXCLUDES node for profiles

bugzilla-daemon at bugzilla.wpkg.org bugzilla-daemon at bugzilla.wpkg.org
Thu May 29 11:06:09 CEST 2008


http://bugzilla.wpkg.org/show_bug.cgi?id=121





--- Comment #4 from Evan Sebenius <sebene at u.washington.edu>  2008-05-29 11:05:52 ---
Hmm... A comment on your example:

Just to reiterate your example:

--

Profile x: Includes package a
Profile y: Depends on profile x but excludes acrobat-reader

Package a depends on acrobat-reader package
acrobat-reader package depends on package b

Then somebody assigns profile y to a host.

--

The modifications to getProfilePackageNodes() that I propose would follow the
following psuedocode:

Gather the package IDs listed in the profile tree.
    -list:  package a
Exclude the package IDs that are noted by the "exclude" nodes.
    -excludes:  acrobat-reader
    -list:      package a
Iterate through the list of all packages, adding all packages dependent
    -list:      package a, acrobat-reader, package b


As you can see, the ultimate list of packages is undamaged by the exclusion. 
Allow me to construct a more complex, more potentially dangerous example and
show that it also is not harmed by the exclusion:

Profile x:  package a, package b, package c, package d
profile y:  profile x, package e, package f
profile z:  profile y, excludes package e, excludes package b

package b:  depends package f, depends package e, depends package a
package f:  depends package b

This is clearly a very odd example, and horribly complex compared to the way
that exclusion should be used.  However, lets examine how the exclusion would
affect the integrity:

Gather the package IDs listed in the profile tree.
    -list:  a, b, c, d, e, f
Exclude the package IDs that are noted by the "exclude" nodes.
    -excludes:  e, b
    -list:      a, c, d, f
Iterate through the list of all packages, adding all packages dependent
    -list:      a, c, d, f, b, e

Note that in the last step, packages b and e are added.  This is because
package f, when analyzed, depends on package b.  b, in turn, depends on f
(which is already on the list), e, and a (which is also on the list).

I'm afraid I'm unable to come up with an example in which excluding in this
fashion destroys package dependency integrity.

A brief proof:

If exclusion were to damage package package dependency integrity, then there
must either be a package being installed without the packages that it depends
on, or packages that are brought in by dependencies are being installed
unnecessarily.

In the first case, there are packages being installed without the packages they
depend on.  However, this is impossible, because the packages that they depend
on are added to the list after the exclusion takes place.  thus, if a package
is being included, then all of the packages it depends on will also be
included.

In the second case, packages have been brought in by dependencies, but the
program that depends on them has been excluded.  However, this is also
impossible because the dependency packages were added after the exclusion
occurred, so the package that depends on them must still be included.

Because of this, I would say that it is safe to use an excludes option in the
way that I describe.  It will not affect package dependencies at all, and will
not cause packages to be installed that shouldn't.


-- 
Configure bugmail: http://bugzilla.wpkg.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.



More information about the wpkg-users mailing list