zoukankan      html  css  js  c++  java
  • Use aria2c in portage

    aria2c is a ultra fast, multi-thread download tool which supoorts multi-protocols.


    Portage (emerge) use wget as defualt download tool. Wget is greate, but aria2c is faster in my experience.


    We can set aria2c as download tool in portage by modifying FETCHCOMMAND and RESUMECOMMAND variables.


    Here is some introduction about these two variables:

    (Manual of make)This variable contains the command used for fetching package sources from the internet. It must contain the full path to the executable as well as the place-holders \${DISTDIR}, \${FILE} and \${URI}. The command should be written to place the fetched file at \${DISTDIR}/\${FILE}. Also see RESUMECOMMAND.

    (gentoo handbook) Fetch Commands When Portage needs to fetch source code, it uses wget by default. You can change this through the FETCHCOMMAND variable. Portage is able to resume partially downloaded source code. It uses wget by default, but this can be altered through the RESUMECOMMAND variable. Make sure that your FETCHCOMMAND and RESUMECOMMAND stores the source code in the correct location. Inside the variables you should use \${URI} and \${DISTDIR} to point to the source code location and distfiles location respectively. You can also define protocol-specific handlers with FETCHCOMMAND_HTTP, FETCHCOMMAND_FTP, RESUMECOMMAND_HTTP, RESUMECOMMAND_FTP, and so on.



    According to above references, we can set FETCHCOMMAND and RESUMECOMMAND as follows:

    FETCHCOMMAND="/usr/bin/aria2c -j 10 -d \${DISTDIR} -o \${FILE} \${URI}"

    RESUMECOMMAND="/usr/bin/aria2c -j 10 -d \${DISTDIR} -o \${FILE} \${URI}"

  • 相关阅读:
    使用QTM 博客客户端
    sdut 2080 最长公共子序列问题
    sdut 1730 数字三角形问题
    HDOJ 1905 Pseudoprime numbers(模运算)
    HDU 1285确定比赛名次(拓补排序)
    HDU 2094产生冠军(map)
    HDOJ 1228 A+B(map水题)
    HDOJ 1713 相遇周期 (最大公约数与最小公倍数)
    HDOJ 2098 分拆素数和(筛选法求素数)
    (转)最大子序列和问题
  • 原文地址:https://www.cnblogs.com/yangyingchao/p/2241105.html
Copyright © 2011-2022 走看看