示例#1
0
文件: repo.py 项目: pghysels/spack
    def update_package(self, pkg_name):
        """Updates a package in the tag index.

        Args:
            pkg_name (str): name of the package to be removed from the index

        """
        package = path.get(pkg_name)

        # Remove the package from the list of packages, if present
        for pkg_list in self._tag_dict.values():
            if pkg_name in pkg_list:
                pkg_list.remove(pkg_name)

        # Add it again under the appropriate tags
        for tag in getattr(package, 'tags', []):
            tag = tag.lower()
            self._tag_dict[tag].append(package.name)
示例#2
0
文件: repo.py 项目: pghysels/spack
def get(spec):
    """Convenience wrapper around ``spack.repo.get()``."""
    return path.get(spec)