Would you like to be notified for every new articles? Please click HERE to subscribe for newsletter.

Modify The Sbotools To Download The Needed Tree Only

  • Posted on: 4 June 2016
  • By: admin

Sbotools is a very handy tool to manage Slackbuilds.org packages in your Slackware system. It can download, install, upgrade, check for available updates, and also resolve the dependencies. As I wrote in my previous post about Automate Your Slackbuild Using Sbotools, Sbotools need you to pull the whole Slackbuilds tree from Slackbuild.org first or everytime you want to upgrade the packages from Slackbuilds.org. Yes, the whole tree will be pulled into your local file system although you just want to install some packages only. That made me think why not just pull the files that we need to install only? I don't need to install the others if I don't need them so why should I download them all. Besides that, it will save the time, space in the harddisk, and also the internet bandwidth.

Based on that idea, I start to modify the Sbotools 1.9 code. With this modification, we need to download only one file, the SLACKBUILDS.TXT.gz, which is only around 500 KB, not the whole tree. That SLACKBUILDS.TXT file contains enough information about all the packages available in Slackbuilds.org, so I will use it as the database for searching, installing, upgrading, checking available updates, and also resolving the dependencies.

The modified Sbotools source is available in the attachment below. The attachment contains all the Sbotools files, but in fact I only made the modification in the following files.

  • SBO-Lib/lib/SBO/Lib.pm
  • sbocheck
  • sbofind
  • sboinstall
  • sboupgrade

If you has Sbotools installed already, you might need to replace the following files with the files I mention above.

  • /usr/share/Perl5/SBO/Lib.pm
  • /usr/sbin/sbocheck
  • /usr/sbin/sbofind
  • /usr/sbin/sboinstall
  • /usr/sbin/sboupgrade

To see the clearer difference between the original Sbotools 1.9 code and my modification, I also provide the patch file, which is generated using git, in the attachment below.

Please note that I only test this modification for Sbotools 1.9. I can't guarantee that this modification can work with the other version of Sbotools.

Add new comment

Limited HTML

  • Allowed HTML tags: <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
By submitting this form, you accept the Mollom privacy policy.