Skip to main content

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

  • From: Xiaobo Shen < >
  • To:
  • Cc: Edward Pilatowicz < >
  • Subject: [pkg-discuss] Re: Review request -> 17699233 pkg install could have an option to ignore any installed packages
  • Date: Fri, 13 Dec 2013 16:10:05 -0800

On 12/13/13 03:37 PM, Edward Pilatowicz wrote:
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.
Thanks for your comments. Actually I have already take this into consideration. The first try
of default match_type is MATCH_INST_VERSIONS. Only if user specifies @latest the match is
switched into MATCH_ALL. Also If we specify two packages where one is installed and the other
is not. The installed one is keep the same and the uninstalled one is being installed with a MATCH_ALL
look up. This is why the for loop shows up here. The reason of using MATCH_INST_VERSIONS in the first try is to solve the unexpected upgrading problem.

I do not think downgrade is a problem here and I have a test case to test this. I did not find problems
so far.
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.
Your recommendation is acceptable. I think it basically
did equivalent to my current implementation.
ed

xiaobo


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