1

I would like to download an extensive list of macports packages through an accelerator and install them offline.

Using the following command, the list of packages required was obtained,

 port echo rpedof:<pkg_name> and not installed

But I'm not sure how to proceed beyond that. I could painstakingly find the port for each one, but there far too many.

All I require is to have an output in the form of lists of urls for each dependant package. I'll be able to do the rest with download scripts.

Is there any way to do this?

  • What would the accelerator speed up? – Mark Jan 28 '16 at 15:57
  • @Mark, terminal accelerators generally downloads packages faster than the average download speed of MacPorts. I use <code>axel</code> for general use and <code>aria2c</code> when there are too many redirects and when ftp passwords are to be supplied. – Ébe Isaac Jan 28 '16 at 16:13
  • What would it accelerate in a macports download? – Mark Jan 28 '16 at 17:26
  • @Mark: Well, MacPorts downloads src. files for each port (usually in tar.gz or tar.bz2) from several available repos. The most used would be distfiles.macports.org. You would only know the exact possible url locations once it tries to fetch the package (this can also be done offline). But this only lists the available urls for the package in the argument -- not its dependencies. You can try fetching the full path for each dependency package 1 by 1, but this isn't efficient when you have too many dependencies. You'd rather allow MacPorts to do its usual thing rather than to do that. – Ébe Isaac Jan 29 '16 at 3:53
1

You can use port fetch rdepof:$pkgname and not installed to trigger only downloading source code. Given that you want to use download accelerators, that probably doesn't do what you want.

If you just want to get the URLs for downloading, see port distfiles rdepof:$pkgname and not installed and parse its output. Note that you may have to deal with ports fetching source code from Git/Subversion/etc.

You can use a script I wrote a while ago as a starting point; it already parses the output correctly and initiates the download (using curl), however it downloads every URL in the mirror list, not only one of them. The script is at https://trac.macports.org/browser/contrib/port-checkmirrors/port-checkmirrors.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .