AOSC-Dev / aosc-os-abbs

ABBS/ACBS tree for AOSC OS package metadata, build configuration, scripts, and patches
https://packages.aosc.io
GNU General Public License v2.0
104 stars 84 forks source link

apt-fast: unable to use aria2c as the download backend for apt-fast #2004

Closed eatradish closed 5 years ago

eatradish commented 5 years ago

Bug description

Unable to use aria2c as the download backend for apt-fast

Reproducing steps

I tried to add the following line in /etc/apt-fast.conf:

_DOWNLOADER='aria2c -x10 -s10 -c 20 -j ${_MAXNUM}'

But it doesn't work.

and:

➜  ~ sudo proxychains -q apt-fast dist-upgrade

 Working... this may take a while.                                                                                                                                        
W: Sources disagree on hashes for supposely identical version '19.08.0' of 'kcalcore:amd64'.
# apt-fast mirror list: Fri Sep 13 18:31:09 CST 2019
 If you want to download the packages on your system press Y else n to abort. [Y/n]:  
Exception caught
Exception: [/var/cache/acbs/build/acbs.4l7_fosh/aria2-1.34.0/src/download_helper.cc:451] errorCode=1 Unrecognized URI or unsupported protocol: 20

Update channel(s)

All

Package and version

➜  ~ dpkg -s apt-fast
Package: apt-fast
Status: install ok installed
Section: admin
Installed-Size: 144
Maintainer: Mingcong Bai <jeffbai@aosc.io>
Architecture: all
Version: 1.9.8
Depends: aria2 (>= 1.34.0-2), bash (>= 5.0.3)
Description: A shellscript wrapper for APT to improve download times
Artoria2e5 commented 5 years ago

FYI, the default is:

_DOWNLOADER='aria2c --no-conf -c -j ${_MAXNUM} -x ${_MAXCONPERSRV} -s ${_SPLITCON} --min-split-size=${_MINSPLITSZ} --stream-piece-selector=${_PIECEALGO} -i ${DLLIST} --connect-timeout=600 --timeout=600 -m0 --header "Accept: */*"'
eatradish commented 5 years ago

FYI, the default is:

_DOWNLOADER='aria2c --no-conf -c -j ${_MAXNUM} -x ${_MAXCONPERSRV} -s ${_SPLITCON} --min-split-size=${_MINSPLITSZ} --stream-piece-selector=${_PIECEALGO} -i ${DLLIST} --connect-timeout=600 --timeout=600 -m0 --header "Accept: */*"'

I tried to change to this _DOWNLOADER='aria2c -c -j ${_MAXNUM} -i ${DLLIST} --connect-timeout=600 --timeout=600 -m0'

FYI, the default is:

_DOWNLOADER='aria2c --no-conf -c -j ${_MAXNUM} -x ${_MAXCONPERSRV} -s ${_SPLITCON} --min-split-size=${_MINSPLITSZ} --stream-piece-selector=${_PIECEALGO} -i ${DLLIST} --connect-timeout=600 --timeout=600 -m0 --header "Accept: */*"'

I tried to change to this:

_DOWNLOADER='aria2c -c -j ${_MAXNUM} -i ${DLLIST} --connect-timeout=600 --timeout=600 -m0'

but:

➜  /etc sudo apt-fast dist-upgrade

 Working... this may take a while.
# apt-fast mirror list: Thu Sep 19 22:56:31 CST 2019
 If you want to download the packages on your system press Y else n to abort. [Y/n]:  
No files to download.
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  anthy-ut brise ffms2 gflags glog gperftools kyotocabinet lash leveldb libgee libhangul libkkc libkkc-data libpinyin librime linux-kernel-5.2.14 linux-kernel-5.2.2
  marisa skk-jisyo skktools sunpinyin sunpinyin-data yaml-cpp
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  linux-kernel-5.2.16
The following packages will be upgraded:
  libevdev libvdpau linux+kernel
3 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 77.5 MB/77.6 MB of archives.
After this operation, 193 MB of additional disk space will be used.
Do you want to continue? [Y/n] ^C%                                     

and:

_DOWNLOADER='aria2c --no-conf -c -j ${_MAXNUM} -x ${_MAXCONPERSRV} -s ${_SPLITCON} --min-split-size=${_MINSPLITSZ} --stream-piece-selector=${_PIECEALGO} -i ${DLLIST} --connect-timeout=600 --timeout=600 -m0 --header "Accept: */*"'
➜  /etc sudo apt-fast dist-upgrade

 Working... this may take a while.                                                                                                                                        
# apt-fast mirror list: Thu Sep 19 22:50:15 CST 2019
 If you want to download the packages on your system press Y else n to abort. [Y/n]:  
Exception: [/var/cache/acbs/build/acbs.4l7_fosh/aria2-1.34.0/src/AbstractOptionHandler.cc:69] errorCode=28 We encountered a problem while processing the option '--split'.
  -> [/var/cache/acbs/build/acbs.4l7_fosh/aria2-1.34.0/src/OptionHandlerImpl.cc:159] errorCode=1 Bad number --min-split-size=
Usage:
 -s, --split=N                Download a file using N connections. If more
                              than N URIs are given, first N URIs are used and
                              remaining URLs are used for backup. If less than
                              N URIs are given, those URLs are used more than
                              once so that N connections total are made
                              simultaneously. The number of connections to the
                              same host is restricted by the 
                              --max-connection-per-server option. See also the
                              --min-split-size option.

                              Possible Values: 1-*
                              Default: 8
                              Tags: #basic, #http, #ftp
Artoria2e5 commented 5 years ago

https://github.com/AOSC-Dev/aosc-os-abbs/blob/a45e8d1/extra-admin/apt-fast/spec#L1-L2

I am suspecting a packaging error here. Who the heck calls 1.8.2 version 1.9.8? Why are we not using GITCO from https://github.com/ilikenwf/apt-fast/ on -b 1.9.8?

MingcongBai commented 5 years ago

Yep that's a hard-coded version...

eatradish commented 5 years ago

Yep that's a hard-coded version...

Fixed with 9c7e4045b7b950ba7d272c6ada23cb97523c9d78

Artoria2e5 commented 5 years ago

Now you are supposed to update your config to match the example...

eatradish commented 5 years ago

Now you are supposed to update your config to match the example...

After testing, the newly pushed apt-fast function is all right. The question is, @MingcongBai do you need to push it to the branch that already has version 1.9.8?

MingcongBai commented 5 years ago

@eatradish You should bump REL, and push it to the offending branch (Stable in this case).

eatradish commented 5 years ago

Fixed with a87f4a53b0ccdb3e89de4e9e30427e24f307f31c

Branch that has completed the update:

Artoria2e5 commented 5 years ago

apt-fast should be noarch... (Architecture: any or all) Does ab3 support that? https://wiki.debian.org/MultiArch/Hints

KexyBiscuit commented 5 years ago

apt-fast has already been noarch AFAIK...

eatradish commented 5 years ago

apt-fast has already been noarch AFAIK...

ok.... close this issue.