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 15:37:54 -0800

On Fri, Dec 13, 2013 at 02:39:03PM -0800, Xiaobo Shen wrote:
> In this webrev, a new option --exact is added into pkg install
> command. This option is used if user want to install exactly the
> packages specified in this install operation and their dependent
> packages if any. All other packages installed will be removed. It
> generally should support basic operations as pkg install. I did
> basic implementation and basic tests for this option. Let me know
> what did I miss. Thanks.
>
> link:
> https://ips.java.net/webrev/xiaoshen/pkginstall_17699233_1/
>

i think your implementation will have some unexpected side effects.  for
example, if i installed a system with solaris-large-server, and then i
decided that i wanted to change that to be solaris-small-server, if i
did:

        pkg install --exact solaris-small-server

then that would not only install solaris-small-server, but it would also
always upgrade my system to the latest version of solaris-small-server
at the same time.  furthermore, if was running s11.2, but i had only
configured a repo with s11.1, the command would happily downgrade my
system, which probably wouldn't end well.

the problem stems from the fact that you always fall back to matching
user specified fmris with self.MATCH_ALL.  this, combined with the fact
that you pass an empty set of initial packages to the solver means that
whatever the user specified will most likely be installable, irrelevant
of what's installed in the current image.

i would recommend a slightly different approach.  when exact is
specified i would recommend first running the solver once just like we
do today.  this will verify that the requested packages are installable
and will pick version of them compatible with the currently installed
image.  after you've done this you know that you can find exact version
of all the requested packages with self.MATCH_INST_VERSIONS.  (the only
once you have exact versions of the user specified packages then you can
run the solver again with an empty starting image.  this will ensure
that the resultant image is minimized but still in sync with the
starting image.

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
 
 
Close
loading
Please Confirm
Close