General Package Manager getting the Repo URL and license

In an earlier version of the package manager, I had written a tool, which could take all of the Packages I had installed, and generate an excel spreadsheet which included the package, the version, the repo url and the license.

It did this by finding the Package’s instlaled location and grabbing the url and license out of that directory. Now the General registry is zipped up into a compressed folder.

Is there a recommendation on how to find the packages URL and license in this new format?

You can unzip it and then parse it. You can also use GitHub - JuliaEcosystem/PackageAnalyzer.jl, which gets those things plus a few more.

1 Like

If you set the JULIA_PKG_UNPACK_REGISTRY environment variable to true, then Pkg will automatically unpack the registry tarball

But I agree with Eric that PackageAnalyzer.jl is a good place to start here.

I also just sometimes clone GitHub - JuliaRegistries/General: The official registry of general Julia packages

1 Like

The PackageAnalyzer.jl appears to work. It is challenging to get it to use what is already installed via the manifest. I need to build a report of what I am running. Because it goes out and gets new stuff. I’m hoping I’ve fixed that by passing a version number in, but it still seems to be recreating everything. I can tell because larger packages like Pluto and Makie get a reachability error. This is probably the firewall messing with a timeout. I try to set the timeout by manipulating the Downloads, which works for Pkg, but it might be different for PackageAnalyzer somehow.

Just use analyze_manifest. It should not install anything new. You can verify by setting ENV["JULIA_DEBUG"] = "PackageAnalyzer" which will log what it is downloading etc. Beware it can be very verbose, especially if JuliaSyntax runs into trouble.

You should also be able to get the information you need out of GitHub - GunnarFarneback/RegistryInstances.jl: Access the information in installed Julia registries.

2 Likes