[sbopkg-users] sbosrcarch proof of concept patch

B Watson yalhcru at gmail.com
Thu Oct 29 02:31:43 UTC 2015


Probably everyone here saw the announcement on the slackbuilds-users
mailing list about the SBo source archive. If not:

http://lists.slackbuilds.org/pipermail/slackbuilds-users/2015-October/015081.html

I wrote a couple of client scripts for the archive, that can parse a
.info file and download the archived sources...

...but to make the archive *really* handy to use, it should be supported
by sbopkg. My original plan was to just look at the sbopkg code to try
to gauge how difficult this would be to implement... but the code is so
readable and well-documented that it wasn't hard to just go ahead and
add simple archive support to it.

Attached is a proof of concept diff (against the sbopkg-0.37.1 released
source). As-is, it works fine, but no doubt the sbopkg maintainers will
see ways it could be improved [*].

Usage: any time a file fails to download, or its md5sum fails, the prompt
that asks whether to use it anyway, retry, or cancel now has an A (attempt
to download from archive) option. For testing, desktop/musca currently
has a broken download link, and its source file is in the archive already.

The way it works: constructs a URL such as:

http://slackware.org.uk/sbosrcarch/by-md5/e/0/e067a8e39b1a97d62fc8e43800edee70/musca-0.9.24.tgz

(that's a live link, BTW, but stoopid gmail might "helpfully" break
the line into two)

...and replaces the current DOWNLOAD value with that, then falls through
to the rest of the download loop.

[*] Actually I can think of a way to improve it: the patch only supports one
sbosrcarch site. I added a SBOSRCARCH variable to sbopkg.conf, which takes
just a single URL for a value. Right now there's only one complete SBo
archive site, so that's OK... but probably it will get mirrored in the
future, so it might be nice to have it try a list of them, in order. I
didn't do this in this PoC because it would complicate the code and be
a likely source of bugs.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sbopkg-0.37.1-sbosrcarch-poc.diff.gz
Type: application/x-gzip
Size: 1248 bytes
Desc: not available
URL: <http://sbopkg.org/pipermail/sbopkg-users/attachments/20151028/9a8b3f72/attachment.bin>


More information about the sbopkg-users mailing list