t_pkg_image_update.py revision 1895
10846N/A# The contents of this file are subject to the terms of the 10846N/A# Common Development and Distribution License (the "License"). 10846N/A# You may not use this file except in compliance with the License. 10846N/A# See the License for the specific language governing permissions 10846N/A# and limitations under the License. 10846N/A# When distributing Covered Code, include this CDDL HEADER in each 10846N/A# If applicable, add the following below this CDDL HEADER, with the 10846N/A# fields enclosed by brackets "[]" replaced with your own identifying 10846N/A# information: Portions Copyright [yyyy] [name of copyright owner] 10846N/A# Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved. 17461N/A add dir mode=0755 owner=root group=bin path=/lib 6407N/A add dir mode=0755 owner=root group=bin path=/lib add dir mode=0755 owner=root group=bin path=/bin add dir mode=0755 owner=root group=bin path=/bin add dir mode=0755 owner=root group=bin path=/lib add dir mode=0755 owner=root group=bin path=/lib add depend type=require fmri=pkg:/quux@1.0 add dir mode=0755 owner=root group=bin path=/lib add depend type=require fmri=pkg:/quux@1.1 add dir mode=0755 owner=root group=bin path=/lib add depend type=require fmri=pkg:/corge@1.0 add dir mode=0755 owner=root group=bin path=/usr add depend type=require fmri=pkg:/corge@1.1 add dir mode=0755 owner=root group=bin path=/usr add dir mode=0755 owner=root group=bin path=/bin add dir mode=0755 owner=root group=bin path=/bin # Two repositories are created for test2. "test2",
"test4",
"test5"])
# Copy contents of repository 2 to repos 4 and 5. """Test image-update with bad options.""" """Install packages from multiple publishers, then verify that removal of the second publisher will not prevent an # Install a package from the preferred publisher. # Install a package from a second publisher. # Remove the publisher of an installed package, then add the # publisher back, but with an empty repository. An image-update # should still be possible. # Add two publishers with the same packages as a removed one; # an image-update should be possible despite the conflict (as # the newer versions will simply be ignored). # Remove one of the conflicting publishers. An image-update # should still be possible even though the conflicts no longer # exist and the original publisher is unknown (see bug 6856). # Remove the remaining test publisher. """Verify that image-updates work as expected when different publishers offer the same package.""" # First, verify that the preferred status of a publisher will # not affect which source is used for image-update when two # publishers offer the same package and the package publisher # was preferred at the time of install. self.
pkg(
"info foo@1.0 | grep test2")
# Next, verify that the preferred status of a publisher will # not cause an upgrade of a package if the newer version is # offered by the preferred publisher and the package publisher # was not preferred at the time of isntall and was not used # to install the package. self.
pkg(
"info baz@1.0 | grep test2")
self.
pkg(
"info baz@1.0 | grep test2")
# Finally, cleanup and verify no packages are installed.