Lines Matching defs:catalog

46 import pkg.catalog as catalog
492 c = self.catalog
501 c = self.catalog
532 """Destroy the catalog."""
639 cat = self.catalog
642 lcat_update = catalog.datetime_to_basic_ts(
661 "last-catalog-update": lcat_update,
762 # Temporarily mark catalog as not read-only so
764 self.catalog.read_only = False
766 # Set batch_mode for catalog to speed up rebuild.
767 self.catalog.batch_mode = True
770 # catalog is being built. This also helps speed up
772 self.catalog.log_updates = incremental
800 # catalog.
813 # Private add_package doesn't automatically save catalog
815 # significant overhead in writing the catalog).
816 self.catalog.batch_mode = False
817 self.catalog.log_updates = True
818 self.catalog.read_only = self.read_only
819 self.catalog.finalize()
841 cat = self.catalog
866 # Discard current catalog information (it will be re-loaded
870 # Determine location and version of catalog data.
880 # If no catalog exists on-disk yet, ensure an empty one does
882 # catalog, as opposed to missing one entirely (which could
886 not self.catalog.exists:
893 catalog data. This will also perform any necessary
894 transformations of existing catalog data if the repository
897 'allow_invalid', if True, will assume the catalog is version 1
898 and use an empty, in-memory catalog if the existing, on-disk
899 catalog is invalid (i.e. corrupted). This assumes that the
918 # The only place a v1 catalog should exist, at all,
924 self.writable_root, "catalog")
925 v1_cat = catalog.Catalog(
930 # not in read-only mode, then the catalog must not be
933 # such, destroy any v1 catalog data that might exist
939 if self.catalog.exists:
949 self.__catalog = catalog.Catalog(
957 # publisher in this repository store's catalog.
960 pubs = list(p for p in self.catalog.publishers())
965 """Private helper function that attempts to save the catalog in
968 # Ensure new catalog is created in a temporary location so that
977 # copy the contents of the existing catalog
979 # is necessary since the catalog only saves the
986 # Ensure the permissions on the new temporary catalog
1013 # Save the new catalog data in the temporary location.
1016 self.catalog.last_modified = lm
1017 self.catalog.save()
1021 # Preserve the old catalog data before continuing.
1027 # Finally, rename the new catalog data into place, reset the
1028 # catalog's location, and remove the old catalog data.
1034 # Set catalog version.
1035 self.catalog_version = self.catalog.version
1040 # If the catalog is loaded already, then reset
1042 self.catalog.meta_root = root
1049 self.__set_catalog_root(os.path.join(root, "catalog"))
1148 the catalog and adds them.
1219 """Adds the specified FMRI to the repository's catalog."""
1237 repository's catalog."""
1254 def catalog(self):
1255 """Returns the Catalog object for the repository's catalog."""
1267 self.__catalog = catalog.Catalog(meta_root=self.catalog_root,
1272 """Returns the absolute pathname of the named catalog file."""
1295 package state in the catalog."""
1519 c = self.catalog
1522 # as soon as the catalog is updated.
1530 # from the catalog (if they are present). That way
1542 # Assume already removed from catalog or
1551 # Only need to re-write catalog if at least one
1704 """Rebuilds the repository catalog and search indexes using the
1743 c = self.catalog
1787 return query.search(self.catalog.fmris)
2520 to add to the repository catalog. This checks to make sure
2521 that any past catalog operations (such as a rename or freeze)
2533 c = self.catalog
2549 c = self.catalog
2660 cat_root = os.path.join(self.root, "catalog")
2665 # format exists (and the old catalog root
2672 # Old catalog implies v2.
3069 """Adds the specified FMRI to the repository's catalog."""
3099 """Returns the absolute pathname of the named catalog file.
3101 'pub' is the prefix of the publisher to return catalog data for.
3115 package state in the catalog.
3126 'pub' is the prefix of the publisher to return catalog data for.
3151 """Return the catalog object for the given publisher.
3154 catalog for. If not provided, the default publisher's
3155 catalog will be returned.
3160 return rstore.catalog
3164 # catalog was requested.
3166 # No catalog to return.
3248 "catalog": self.catalog_requests,
3418 # No catalog to aggregate matches from.
3424 # Get matching items from target catalog and then
3427 rstore.catalog.get_matching_fmris(patterns)
3536 the catalog, adds them, and then updates search data by default.
3562 """Rebuilds the repository catalog and search indexes using the
3590 repository's catalog."""
3620 if op == "catalog" and ver == 1:
3621 # For catalog v1 to be "supported", all storage objects
3858 stored in catalog.dependency.C for verification for a list of
3862 for r, e, acts in pub.catalog.entry_actions(
3863 (pub.catalog.DEPENDENCY,)):
4015 rs.catalog.get_matching_fmris("*")
4117 to add to the repository catalog. This checks to make sure
4118 that any past catalog operations (such as a rename or freeze)
4303 for d in ("catalog", "file", "index", "pkg", "trans", "tmp"):