simoniz0r / deb2appimage

Build AppImages from deb packages on any distro with simple json configuration
MIT License
117 stars 14 forks source link

Downloading dependencies randomly fails #14

Open junetried opened 4 years ago

junetried commented 4 years ago

While building an appimage with the config file found here, it will fail to download a seemingly random dependency. After some time retrying, it will work.

E5ten commented 4 years ago

I also experience this.

simoniz0r commented 4 years ago

Try running it with --debug. Maybe that will show where exactly it's failing.

junetried commented 4 years ago

I found this. It misses setting the LATEST_DEB_URL variable?

Downloading dependencies...
+ getappdeps
++ jq -r '.buildinfo[0].deps' /home/ethan/.cache/deb2appimage/build.json
+ [[ ! libasn1-8-heimdal,libcurl4,libgssapi3-heimdal,libhcrypto4-heimdal,libheimbase1-heimdal,libheimntlm0-heimdal,libhx509-5-heimdal,libkrb5-26-heimdal,libkrb5-3,libldap-2.4-2,libnss3,libprotobuf10,libroken18-heimdal,libsasl2-2,libzip4,libwind0-heimdal = \n\u\l\l ]]
+ COUNT_NUM=1
++ jq -r '.buildinfo[0].deps' /home/ethan/.cache/deb2appimage/build.json
++ tr , '\n'
+ for appdep in $(jq -r '.buildinfo[0].deps' "$HOME"/.cache/deb2appimage/build.json | tr ',' '\n')
++ jq -r '.buildinfo[0].distrorepo' /home/ethan/.cache/deb2appimage/build.json
++ cut -f1 -d,
+ DEB_REPO_DISTRO=Ubuntu
++ jq -r '.buildinfo[0].repoversion' /home/ethan/.cache/deb2appimage/build.json
++ cut -f1 -d,
+ DEB_REPO_VERSION=bionic
++ jq -r '.buildinfo[0].repoarch' /home/ethan/.cache/deb2appimage/build.json
++ cut -f1 -d,
+ DEB_REPO_ARCH=amd64
+ [[ -z Ubuntu ]]
+ [[ -z amd64 ]]
+ [[ -z bionic ]]
+ getlatestdeb libasn1-8-heimdal Ubuntu bionic amd64
+ DEB_NAME=libasn1-8-heimdal
+ DEB_DISTRO=Ubuntu
+ DEB_RELEASE=bionic
+ DEB_ARCH=amd64
+ case $DEB_DISTRO in
+ DEB_DISTRO_URL=ubuntu.com
++ cut -f2 '-d"'
++ curl -sL https://packages.ubuntu.com/bionic/amd64/libasn1-8-heimdal/download
++ head -n 1
++ grep '<li>*..*amd64.deb'
+ LATEST_DEB_URL=
+ curl -sL '' -o /home/ethan/.cache/deb2appimage/debs/libasn1-8-heimdal.deb
+ d2aexit 3 libasn1-8-heimdal.deb 'URL: '
+ case $1 in
+ [[ ! '' = \T\R\U\E ]]
+ echo 'Download Error!'
Download Error!
+ echo 'Error while downloading libasn1-8-heimdal.deb'
Error while downloading libasn1-8-heimdal.deb
+ [[ -n URL:  ]]
+ echo 'URL: '
URL: 
+ echo 'Exit code 3'
Exit code 3
+ rm -rf /home/ethan/.cache/deb2appimage/AppDir /home/ethan/.cache/deb2appimage/build.json /home/ethan/.cache/deb2appimage/debs /home/ethan/.cache/deb2appimage/debs-amd64 /home/ethan/.cache/deb2appimage/debs-i386 /home/ethan/.cache/deb2appimage/other /home/ethan/.cache/deb2appimage/Packages-amd64 /home/ethan/.cache/deb2appimage/Packages-i386
+ exit 3
simoniz0r commented 4 years ago

If it's happening randomly, it could be packages.ubuntu.com randomly not working. I have noticed it go down and then start working again like 5 seconds later quite a few times when working with other things.

I'll try running your setup a few times myself to see if I can figure out what exactly is happening.

If you have this happen again before I get to that, try seeing if packges.ubuntu.com is working right after it fails.

junetried commented 4 years ago

I'm not noticing an issue with packages.ubuntu.com, I can consistently load it even when the dependency fetch fails.