Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

find alternative download feature #44

Open
ArTourter opened this issue May 22, 2018 · 6 comments
Open

find alternative download feature #44

ArTourter opened this issue May 22, 2018 · 6 comments

Comments

@ArTourter
Copy link
Contributor

The find alternative download option is only offered after a checksum mismatch. If the source file isn't found (error 404) the option is not offered.

This is currently the case with makemkv where upstream removes old packages:

===
Processing makemkv

makemkv:
makemkv not found in /var/cache/sbopkg.
--2018-05-22 10:00:21-- http://www.makemkv.com/download/makemkv-oss-1.12.0.tar.gz
Resolving www.makemkv.com (www.makemkv.com)... 104.18.62.176, 104.18.63.176, 2400:cb00:2048:1::6812:3eb0, ...
Connecting to www.makemkv.com (www.makemkv.com)|104.18.62.176|:80... connected.
HTTP request sent, awaiting response... 404 Not Found
2018-05-22 10:00:21 ERROR 404: Not Found.

makemkv:
Would you like to continue processing the rest of the
queue or would you like to abort? If this failed
package is a dependency of another package in the queue
then it may not make sense to continue.

(Y)es to continue, (N)o to abort, (R)etry the build?:

===
whereas if I modify the slackbuild with 1.12.2 but not change the checksum, I get:

Processing makemkv

makemkv:
makemkv not found in /var/cache/sbopkg.
--2018-05-22 10:02:12-- http://www.makemkv.com/download/makemkv-oss-1.12.2.tar.gz
Resolving www.makemkv.com (www.makemkv.com)... 104.18.62.176, 104.18.63.176, 2400:cb00:2048:1::6812:3fb0, ...
Connecting to www.makemkv.com (www.makemkv.com)|104.18.62.176|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4379033 (4.2M) [application/x-gzip]
Saving to: ‘makemkv-oss-1.12.2.tar.gz’

makemkv-oss-1.12.2. 100%[===================>] 4.18M 12.1MB/s in 0.3s

2018-05-22 10:02:12 (12.1 MB/s) - ‘makemkv-oss-1.12.2.tar.gz’ saved [4379033/4379033]

Found makemkv-oss-1.12.2.tar.gz in /var/cache/sbopkg.
Checking MD5SUM:
MD5SUM check for makemkv-oss-1.12.2.tar.gz ... FAILED!
Expected: ffa31b99b6654db142bcc42a77cef489
Found: 2f9b765106aea740ddd51a69939d98a6

Do you want to use the downloaded makemkv source:
makemkv-oss-1.12.2.tar.gz in /var/cache/sbopkg?

You can choose among the following options:

  • (Y)es, keep the source and continue the build process;
  • (N)o, delete the source and abort the build process;
  • (R)etry download and continue the build process; or
  • (A)ttempt to download from third party source repository.
    (Y)es, (N)o, (R)etry, (A)lternative ?:
@willysr
Copy link
Member

willysr commented May 22, 2018

@swmarc can you take a look on this one?

@swmarc
Copy link
Collaborator

swmarc commented May 28, 2018

@willysr Well, I did not study the sbopkg source yet, but just made changes to sqg in the past.
Maybe someone that is more familiar with code base could step in for now?

@willysr
Copy link
Member

willysr commented May 28, 2018

Oh yeah, it was orbea.
Sorry for that.

@orbea, can you look at this issue?

Thanks

@orbea
Copy link
Contributor

orbea commented May 28, 2018

@willysr I'm not sure why you are asking me? I'm fairly certain my one commit to sbopkg which I forgot to apply locally would not cause this.

But I did take a look at this, it appears when there is no downloaded source sbopkg's only choices are Y, N and R.

https://github.com/sbopkg/sbopkg/blob/master/src/usr/sbin/sbopkg#L2939

Removing this line exposes the option, but the A option did not successfully download an alternative source tarball?

@orbea
Copy link
Contributor

orbea commented May 28, 2018

I suppose its not supposed to download anything? The make_archive_url function doesn't seem to do anything besides echo an url.

https://github.com/sbopkg/sbopkg/blob/master/src/usr/sbin/sbopkg#L3022

Edit: Nvm, I see why it doesn't download, it grabs an index.html.

ORIG DOWNLOAD = http://www.makemkv.com/download/makemkv-oss-1.12.0.tar.gz
DOWNLOAD = http://slackware.uk/sbosrcarch/by-md5/f/f/ffa31b99b6654db142bcc42a77cef489/.

@willysr
Copy link
Member

willysr commented May 29, 2018

@orbea no, it wasn't caused by your commit (yours are great), but i think that since you had the original idea, you have the answer why the alternatives are only working when there's a mismatch in the checksum and not in the missing source in the first time, hence the op was asking.
Sorry if it confused you.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants