Skip to main content

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

  • From: Edward Pilatowicz < >
  • To:
  • Subject: [pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages
  • Date: Fri, 13 Dec 2013 18:01:48 -0800

On Fri, Dec 13, 2013 at 05:43:14PM -0800, Bart Smaalders wrote:
> On 12/13/13 17:15, Edward Pilatowicz wrote:
>
> >the only way i can think of to avoid this is to run the solver first.
> >that's the only way you can compute a solution that accounts for the
> >existing image constraints.  only after you've done that can you start
> >to trim unnecessary packages from the solution space.
>
> It seems to me that the following needs to be true:
>
> pkg install --exact A B C
>
> builds a plan of the latest version of A, B and C and all their
> dependencies consistent with the following:
>
> 1) packages with os.install-hold not referenced on the command line
>    are explicitly kept at their current value as per behavior today
> 2) no packages are allowed to go backwards unless explicitly listed
>    on command line, again as per today.
> 3) packages currently present on the system but not part of the above
>    solution are marked for rejection.
>
> With care we can also evaluate origin dependencies in this pass.
>

yep.  everything that the solver install path does today.

> The above set of possible upgrades and rejections are passed to another
> invocation of the solver to determine any need for recursion into zones;
> this is needed if parent dependencies are present in any of the packages
> being removed.
>

well, i think we'll want to do a second invocation of the solver (rather
than trimming packages from the image manually), but that choice is
orthogonal to dealing with zones.

we only recurse into zones after we're completely done with planning in
the global zone (since we have to inform zones of the gz plan.) when we
recurse into zones they are able to figure out for themselves if they
need any changes based on the changes occurring in the gz.

> We may need to delete packages recursively in the zones if other
> packages have dependencies on packages with parent dependencies or
> alternatively we could fail the install.
>

this gets into recursive linked image behavior and we haven't talked
a lot about what kind of new options we want to support there.

currently, we never uninstall packages from zones based on operations
initiated from the gz.

other possible options are:

- implement support for recursive operations so the same install --exact
  operation is applied to all zones images.

- introduce an option that allows for automated deleting of packages
  that have unsatisfied parent dependencies within zone images (this
  could get interesting due to other package dependencies).

- something else...

note that this problem isn't unique to "install --exact", it also
applies to the general uninstall case, the downgrade case, etc.

> This is a bit subtle to implement, but will have a substantial benefit
> to those maintaining large numbers of images, since it allows
> republication of admin-defined group packages to completely control the
> content of installed systems so long as the new version is installed w/
> --exact.
>

agreed.

ed


[pkg-discuss] Review request -> 17699233 pkg install could have an option to ignore any installed packages

Xiaobo Shen 12/13/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Edward Pilatowicz 12/13/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Xiaobo Shen 12/14/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Edward Pilatowicz 12/14/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Edward Pilatowicz 12/14/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Xiaobo Shen 12/14/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Shawn Walker 12/14/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Edward Pilatowicz 12/14/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Bart Smaalders 12/14/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Edward Pilatowicz 12/14/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Bart Smaalders 12/16/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Edward Pilatowicz 12/16/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Xiaobo Shen 12/18/2013

[pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages

Edward Pilatowicz 12/18/2013
 
 
Close
loading
Please Confirm
Close