Lines Matching refs:image

78         """ImagePlan object contains the plan for changing the image...
80 image modifying operations; evaluation (comparing manifests
89 def __init__(self, image, op, progtrack, check_cancel, noexecute=False,
92 self.image = image
119 self.__old_excludes = image.list_excludes()
174 self.pd._new_avoid_obs = (self.image.avoid_set_get(),
175 self.image.avoid_set_get(implicit=True),
176 self.image.obsolete_set_get())
179 self.image.linked.init_plan(plan)
183 self.__new_excludes = self.image.list_excludes(
186 # tell the linked image subsystem about this plan
187 self.image.linked.setup_plan(plan)
190 pp.image = self.image
208 if self.image.version != self.image.CURRENT_VERSION:
209 # Prevent plan execution if image format isn't current.
211 self.image.root)
213 if self.image.transport:
214 self.image.transport.shutdown()
271 made to the image. This takes into account different
273 where the only packages being updated are linked image
307 self.pd._image_lm = self.image.get_last_modified(string=True)
322 # get the existing image facets.
323 old_facets = self.image.cfg.facets
335 new_facets.update(self.image.linked.inherited_facets())
356 variant state for image."""
367 # instead of bytes in the child image due to the
376 self.pd._old_facets = self.image.cfg.facets
381 self.__new_excludes = self.image.list_excludes(new_variants,
385 old_dehydrated = set(self.image.cfg.get_property("property",
388 # We only want to exclude all actions in the old image that
392 self.image.get_dehydrated_exclude_func(
406 # Only allows actions in new image that cannot be dehydrated
411 self.image.get_dehydrated_exclude_func(dehydrate))
429 if self.image.linked.insync(latest_md=False):
432 # environment we require an in-sync image.
438 # we're an out-of-sync child image so retry
445 # user won't be able to take the image further
463 pub_ranks = self.image.get_publisher_ranks()
466 self.image, values, self.MATCH_INST_STEMS, pub_ranks=pub_ranks,
478 # the image because we don't want them in the proposed list for
539 self.image.gen_installed_pkgs())
540 pub_ranks = self.image.get_publisher_ranks()
545 self.image, fmris, self.MATCH_INST_VERSIONS,
556 for a in self.image.get_catalog(
557 self.image.IMG_CATALOG_INSTALLED).get_entry_actions(
582 install the specified pkgs, sync the specified image, and/or
583 change facets/variants within the current image."""
601 pub_ranks = self.image.get_publisher_ranks()
605 self.image.gen_installed_pkgs())
608 reject_set = self.match_user_stems(self.image,
615 self.image, pkgs_inst, self.MATCH_ALL,
625 variants = self.image.get_variants()
634 avoid_set = self.image.avoid_set_get()
635 frozen_list = self.image.get_frozen_list()
644 self.image.get_catalog(
645 self.image.IMG_CATALOG_KNOWN),
650 self.image.linked.parent_fmris(),
671 insync=self.image.linked.insync)
676 # dependencies if we're doing a linked image sync.
704 pkgs, sync the image, and/or change facets/variants within the
705 current image."""
721 specified pkgs, sync the image, and/or change facets/variants
722 within the current image."""
773 cat = self.image.get_catalog(
774 self.image.IMG_CATALOG_INSTALLED)
779 rem_pkgs = self.image.count_installed_pkgs()
782 for f in self.image.gen_installed_pkgs():
783 m = self.image.get_manifest(f,
895 all_pubs = [ p.prefix for p in self.image.gen_publishers() ]
904 for pub in self.image.gen_publishers()
930 for f in self.image.gen_installed_pkgs(pubs=pubs)
990 # keep linked images in sync. Linked image audits are fast,
993 if not self.image.linked.insync():
1064 cfg_mediators = self.image.cfg.mediators
1142 for f in self.image.gen_installed_pkgs():
1144 m = self.image.get_manifest(f,
1157 pp = pkgplan.PkgPlan(self.image)
1180 bool(self.match_user_stems(self.image, reject_list,
1184 """Determine the fmri changes needed to sync the image."""
1195 insync = self.image.linked.insync()
1212 self.image, pkgs_to_uninstall, self.MATCH_INST_VERSIONS,
1227 self.image.gen_installed_pkgs())
1232 self.image.get_catalog(
1233 self.image.IMG_CATALOG_KNOWN),
1235 self.image.get_publisher_ranks(),
1236 self.image.get_variants(),
1237 self.image.avoid_set_get(),
1238 self.image.linked.parent_fmris(),
1248 self.image.get_frozen_list(),
1283 pub_ranks = self.image.get_publisher_ranks()
1287 self.image.gen_installed_pkgs())
1292 reject_set = self.match_user_stems(self.image,
1299 self.image, pkgs_update, self.MATCH_INST_STEMS,
1308 self.image.get_catalog(
1309 self.image.IMG_CATALOG_KNOWN),
1312 self.image.get_variants(),
1313 self.image.avoid_set_get(),
1314 self.image.linked.parent_fmris(),
1325 self.image.get_frozen_list(),
1332 insync=self.image.linked.insync)
1338 self.image.get_frozen_list(),
1400 goal=self.image.count_installed_pkgs())
1412 for f in self.image.gen_installed_pkgs():
1414 m = self.image.get_manifest(f,
1443 for f in self.image.gen_installed_pkgs():
1445 m = self.image.get_manifest(f,
1482 act.verify(self.image, forever=True)
1510 pp = pkgplan.PkgPlan(self.image)
1529 dir_loc = os.path.join(self.image.root, path)
1578 # deletion from image. Don't bother getting owner
1581 rootdir = self.image.root
1599 overlaying action installed in the image, return the overlaying
1631 """Check if an image is in an active live be."""
1651 isalbe, src_be_name = self.__is_active_liveroot_be(self.image)
1668 "image.")
1694 img_root = self.image.get_root()
1697 m = self.image.get_manifest(fmri)
1787 for act, errors, warnings, pinfo in self.image.verify(
1810 args, self.image,
1868 """Determine the changes needed to fix the image."""
1878 self.image, args, self.MATCH_INST_VERSIONS)
1888 proposed_fixes = list(self.image.gen_installed_pkgs(
1929 _("{path} is not found in the image").format(
1940 for f in self.image.gen_installed_pkgs(
1960 m = self.image.get_manifest(fmri, ignore_excludes=True)
1961 pp = pkgplan.PkgPlan(self.image)
1972 the current image."""
2022 """Generates all the fmris which will be in the new image."""
2024 fmri_set = set(self.image.gen_installed_pkgs())
2055 future image."""
2082 in the image will be emitted as well."""
2095 m = self.image.get_manifest(pfmri, ignore_excludes=True)
2114 'dir', directories only implicitly delivered in the image will
2143 """ return set of all directories in target image """
2144 # always consider var and the image directory fixed in image...
2154 self.image.imgdir.rstrip("/"),
2163 """ return a set of all symlinks in target image"""
2172 """ return a set of all hardlinks in target image"""
2181 """ return a set of all licenses in target image"""
2190 """ return a set of all legacy actions in target image"""
2387 # in the image.
2431 pp = pkgplan.PkgPlan(self.image)
2983 str(s) for s in self.image.gen_installed_pkgs()
3015 offset_dict = self.image._load_actdict(self.__progtrack)
3016 sf = self.image._get_stripped_actions_file()
3019 self.image._load_conflicting_keys() == set()
3102 describing the target image. If 'key' is given and not None,
3123 return self.image.get_manifest(pfmri,
3335 opath = orig.get_installed_path(self.image.get_root())
3346 self.image.get_root())
3471 mpath = self.image.get_manifest_path(
3488 # amount is used because image state update involves using
3490 pd._cbytes_added += misc.get_dir_size(self.image._statedir) * 2
3498 # an image, a 12% difference between actual size and installed
3518 self.image.get_last_modified(string=True):
3545 self.image.write_cache_path)
3547 self.pd._bytes_avail = misc.spaceavail(self.image.root)
3548 # if we don't have a full image yet
3584 pub = self.image.get_publisher(pfmri.publisher)
3587 return self.image.transport.get_content(pub, hash_val,
3590 self.image.cleanup_downloads()
3600 self.image.gen_installed_pkgs())
3617 dpath = os.path.join(self.image.imgdir, "notes")
3641 for a in self.image.gen_publishers()
3655 if not self.image.has_manifest(oldfmri):
3659 if not self.image.has_manifest(newfmri):
3672 self.image.transport.prefetch_manifests(prefetch_mfsts,
3683 pp = pkgplan.PkgPlan(self.image)
3991 being set but don't affect the plan and update proposed image
4013 # mediations provided by the image administrator.
4083 files = ["pkg5.image", "lock"]
4084 path = action.get_installed_path(self.image.root)
4088 dir_p = os.path.join(self.image.imgdir, d) + "/"
4093 dir_p = os.path.join(self.image.root, d) + "/"
4099 fname = os.path.join(self.image.imgdir, f)
4113 if self.image.has_boot_archive():
4115 self.image.get_ramdisk_filelist())
4141 # cache the current image mediators within the plan
4143 self.image.cfg.mediators
4286 # remains in the target image.
4632 """Test whether this image plan contains any work to do """
4650 """Invoke the evaluated image plan
4658 self.image.get_last_modified(string=True):
4668 if self.image.version != self.image.CURRENT_VERSION:
4669 # Prevent plan execution if image format isn't current.
4671 self.image.root)
4690 self.image.update_index_dir()
4691 ind = indexer.Indexer(self.image,
4692 self.image.get_manifest,
4693 self.image.get_manifest_path,
4699 self.image.gen_installed_pkg_names())
4708 self.image.\
4715 # new image, that error needs to be
4742 self.image.transport.stats.reset()
4802 self.image.transport.shutdown()
4819 """Invoke the evaluated image plan
4826 self.image.get_last_modified(string=True):
4904 # image before the current operation is performed is desired.
4911 self.image._remove_fast_lookups()
4913 if not self.image.is_liveroot():
4920 root = os.path.normpath(self.image.root)
4929 self.pd._actuators.exec_prep(self.image)
4931 self.pd._actuators.exec_pre_actuators(self.image)
4953 # aliases drivers have lost in the new image.
4959 aliases, self.image)
5014 self.image.update_pkg_installed_state(
5017 # write out variant changes to the image config
5020 self.image.image_config_update(
5025 self.image._avoid_set_save(
5031 self.image.cfg.set_property("property",
5033 self.image.save_config()
5035 # Mark image as modified if not calling
5037 self.image.update_last_modified()
5062 self.image)
5081 self.image)
5092 self.pd._actuators.exec_post_actuators(self.image)
5094 self.image._create_fast_lookups(progtrack=self.__progtrack)
5107 self.image._users = set()
5108 self.image._groups = set()
5109 self.image._usersbyname = {}
5110 self.image._groupsbyname = {}
5115 self.image.update_index_dir()
5116 ind = indexer.Indexer(self.image,
5117 self.image.get_manifest,
5118 self.image.get_manifest_path,
5126 executed_pp), self.image)
5150 ind = indexer.Indexer(self.image,
5151 self.image.get_manifest,
5152 self.image.get_manifest_path,
5156 self.image.gen_installed_pkgs())
5170 next(self.image.gen_installed_pkg_names())
5176 def match_user_stems(image, patterns, match_type, raise_unmatched=True,
5292 cat = image.get_catalog(image.IMG_CATALOG_KNOWN)
5294 cat = image.get_catalog(
5295 image.IMG_CATALOG_INSTALLED)
5332 for name in image.get_catalog(
5333 image.IMG_CATALOG_INSTALLED).names()
5352 def __match_user_fmris(image, patterns, match_type,
5520 cat = image.get_catalog(image.IMG_CATALOG_KNOWN)
5523 cat = image.get_catalog(image.IMG_CATALOG_INSTALLED)
5526 variants = image.get_variants()
5557 # image's variants.
5587 # in the image, elide
5866 def freeze_pkgs_match(image, pats):
5872 pub_ranks = image.get_publisher_ranks()
5878 inst_dict, references = ImagePlan.__match_user_fmris(image,
5884 installed_stems_dict = ImagePlan.match_user_stems(image, pats,