您尚未登录。

#1 2013-12-11 18:36:08

yhylord
会员
注册时间: 2013-11-16
帖子: 84

【已解决】在pacman中使用aria2c的问题

1.无论镜像有没有更新,aria2c都会重新下载镜像,有没有什么办法让它聪明一点?

2.许多镜像都没有.db.sig,所以我在/etc/pacman.conf里面设置了

 SigLevel    = PackageRequired 

但是aria2c还是尝试下载.db.sig文件

这是完整的/etc/pacman.conf:

#
# /etc/pacman.conf
#
# See the pacman.conf(5) manpage for option and repository directives

#
# GENERAL OPTIONS #
[options]
# The following paths are commented out with their default values listed.
# If you wish to use different paths, uncomment and update the paths.
#RootDir     = /
#DBPath      = /var/lib/pacman/
#CacheDir    = /var/cache/pacman/pkg/
#LogFile     = /var/log/pacman.log
#GPGDir      = /etc/pacman.d/gnupg/
HoldPkg     = pacman glibc
#XferCommand = /usr/bin/curl -C - -f %u > %o
#XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
XferCommand = /bin/aria2c -c --max-tries=2 --max-connection-per-server=2 --max-file-not-found=3 --remote-time=true --timeout=3 -d / -o %o %u
#CleanMethod = KeepInstalled
#UseDelta    = 0.7
Architecture = auto

# Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
#IgnorePkg   =
#IgnoreGroup =

#NoUpgrade   =
#NoExtract   =

# Misc options
#UseSyslog
Color
#TotalDownload
CheckSpace
#VerbosePkgLists

# By default, pacman accepts packages signed by keys that its local keyring
# trusts (see pacman-key and its man page), as well as unsigned packages.
SigLevel    = PackageRequired
LocalFileSigLevel = Optional
#RemoteFileSigLevel = Required

# NOTE: You must run `pacman-key --init` before first using pacman; the local
# keyring can then be populated with the keys of all official Arch Linux
# packagers with `pacman-key --populate archlinux`.

#
# REPOSITORIES
#   - can be defined here or included from another file
#   - pacman will search repositories in the order defined here
#   - local/custom mirrors can be added here or in separate files
#   - repositories listed first will take precedence when packages
#     have identical names, regardless of version number
#   - URLs will have $repo replaced by the name of the current repo
#   - URLs will have $arch replaced by the name of the architecture
#
# Repository entries are of the format:
#       [repo-name]
#       Server = ServerName
#       Include = IncludePath
#
# The header [repo-name] is crucial - it must be present and
# uncommented to enable the repo.
#

# The testing repositories are disabled by default. To enable, uncomment the
# repo name header and Include lines. You can add preferred servers immediately
# after the header, and they will be used before the default mirrors.

#[testing]
#Include = /etc/pacman.d/mirrorlist

[core]
Include = /etc/pacman.d/mirrorlist

[extra]
Include = /etc/pacman.d/mirrorlist

#[community-testing]
#Include = /etc/pacman.d/mirrorlist

[community]
Include = /etc/pacman.d/mirrorlist

# If you want to run 32 bit applications on your x86_64 system,
# enable the multilib repositories as required here.

#[multilib-testing]
#Include = /etc/pacman.d/mirrorlist

[multilib]
Include = /etc/pacman.d/mirrorlist

[archlinuxcn]
#The Chinese Arch Linux communities packages.
SigLevel = Optional TrustAll
Server   = http://repo.archlinuxcn.org/$arch
# An example of a custom package repository.  See the pacman manpage for
# tips on creating your own repositories.
#[custom]
#SigLevel = Optional TrustAll
#Server = file:///home/custompkgs

#fontconfig-infinality-ultimate https://github.com/bohoomil/fontconfig-ultimate

[infinality-bundle]
Server = http://ibn.net63.net/infinality-bundle/$arch

[infinality-bundle-multilib]
Server = http://ibn.net63.net/infinality-bundle-multilib/$arch

[infinality-bundle-fonts]
Server = http://ibn.net63.net/infinality-bundle-fonts

这是aria2c报错:

12/11 17:51:15 [ERROR] CUID#6 - Download aborted. URI=http://mirror.de.leaseweb.net/archlinux/core/os/x86_64/core.db.sig
Exception: [AbstractCommand.cc:312] errorCode=3 URI=http://mirror.de.leaseweb.net/archlinux/core/os/x86_64/core.db.sig
  -> [HttpSkipResponseCommand.cc:215] errorCode=3 Resource not found

-----------------------------------------------------

一句话:要用aria2c下载软件包,就用powerpill

yaourt -S powerpill

最近编辑记录 yhylord (2013-12-12 18:46:55)

离线

#2 2013-12-11 18:54:12

依云
a.k.a. 百合仙子
所在地: 一个等待妹纸出现的地方
注册时间: 2011-08-21
帖子: 4,388
个人网站

Re: 【已解决】在pacman中使用aria2c的问题

你写个 aria2c 的 wrapper 吧。这样子似乎不会同时使用多个镜像来加速的。另外,那个 .db.sig 的访问是正常的。

离线

#3 2013-12-11 19:43:01

yhylord
会员
注册时间: 2013-11-16
帖子: 84

Re: 【已解决】在pacman中使用aria2c的问题

百合仙子 说:

你写个 aria2c 的 wrapper 吧。这样子似乎不会同时使用多个镜像来加速的。另外,那个 .db.sig 的访问是正常的。

就是说镜像里面没有.db.sig是正常咯?但是看到这些报错都好纠结啊……

然后第一个问题就是说用wget的时候,每次更新镜像并不会把整个镜像下载,而是把新的部分下下来。如果没有新的部分,它就提示is up to date.但是aria2c每次都会把整个镜像下载下来。有没有什么参数能让aria2c像wget一样处理更新镜像?

离线

#4 2013-12-11 21:15:11

依云
a.k.a. 百合仙子
所在地: 一个等待妹纸出现的地方
注册时间: 2011-08-21
帖子: 4,388
个人网站

Re: 【已解决】在pacman中使用aria2c的问题

是的。所以我让你写个 wrapper 嘛。aria2c 支持 RPC 的,你可以把 aria2c 放后台,写个程序轮询当前下载状态。

aria2c 是多线程下载,所以不一样。如果控制文件(.aria2c 文件)没有丢失的话,它应该会自动重新下载的。如果没有,那就是 pacman 调用 aria2c 的方式不对。

离线

#5 2013-12-12 18:42:20

yhylord
会员
注册时间: 2013-11-16
帖子: 84

Re: 【已解决】在pacman中使用aria2c的问题

百合仙子 说:

是的。所以我让你写个 wrapper 嘛。aria2c 支持 RPC 的,你可以把 aria2c 放后台,写个程序轮询当前下载状态。

aria2c 是多线程下载,所以不一样。如果控制文件(.aria2c 文件)没有丢失的话,它应该会自动重新下载的。如果没有,那就是 pacman 调用 aria2c 的方式不对。

尝试了一下powerpill,发现如果没有官方源的.db.sig文件就不会报错,但是archlinuxcn,lilydjwg源就报错了,很奇怪呢……
不过powerpill还算是能满足我的需求了,感谢你的帮助!

离线

页脚