9489672d54
We previously had this functionality available for cached packages in the providercache package. This moves the main implementation of this over to the getproviders package and then implements it also for PackageMeta, allowing us to compute hashes in a consistent way across both of our representations of a provider package. The new methods on PackageMeta will only be effective for packages in the local filesystem because we need direct access to the contents in order to produce the hash. Hopefully in future the registry protocol will be able to also provide hashes using this content-based (rather than archive-based) algorithm and then we'll be able to make this work for PackageMeta referring to a package obtained from a registry too, but hashes for local packages only are still useful for some cases right now, such as generating mirror directories in the "terraform providers mirror" command. |
||
---|---|---|
.. | ||
testdata | ||
cached_provider.go | ||
cached_provider_test.go | ||
dir.go | ||
dir_modify.go | ||
dir_modify_test.go | ||
dir_test.go | ||
doc.go | ||
installer.go | ||
installer_events.go | ||
installer_test.go | ||
lock_file.go | ||
package_install.go |