Slackware::Slackget::PkgTools - A wrapper for the pkgtools action(installpkg, upgradepkg and removepkg)
Version 1.0.21
This class is anoter wrapper for slack-get. It encapsulates the pkgtools system call.
use Slackware::Slackget::PkgTools; my $pkgtool = Slackware::Slackget::PkgTools->new($config); $pkgtool->install($package1); $pkgtool->remove($package_list); foreach (@{$packagelist->get_all}) { print "Status for ",$_->name," : ",$_->status()->to_string,"\n"; } $pkgtool->upgrade($package_list);
Take a Slackware::Slackget::Config object as argument :
my $pkgtool = new Slackware::Slackget::PkgTool ($config);
** IMPORTANT NOTE ** : in the old time, when this module was poorly coded (by me) it was taking care of sending network messages. This is obviously not its role, so it do not do that anymore.
Slackware::Slackget::PkgTools methods used the followings status :
0 : Package have been installed successfully. 1 : Package have been upgraded successfully. 2 : Package have been removed successfully. 3 : Can't install package : new package not found in the cache. 4 : Can't remove package : no such package installed. 5 : Can't upgrade package : new package not found in the cache. 6 : Can't install package : an error occured during <installpkg-binary /> system call 7 : Can't remove package : an error occured during <removepkg-binary /> system call 8 : Can't upgrade package : an error occured during <upgradepkg-binary /> system call 9 : Package scheduled for install on next reboot. 10 : An error occured in the Slackware::Slackget::PkgTool class (during installpkg, upgradepkg or removepkg) but the class is unable to understand the error.
Take a single Slackware::Slackget::Package object or a single Slackware::Slackget::PackageList as argument and call installpkg on all this packages. Return 1 or undef if an error occured. But methods from the Slackware::Slackget::PkgTools class don't return on the first error, it will try to install all packages. Additionnally, for each package, set a status.
$pkgtool->install($package_list);
Take a single Slackware::Slackget::Package object or a single Slackware::Slackget::PackageList as argument and call upgradepkg on all this packages. Return 1 or undef if an error occured. But methods from the Slackware::Slackget::PkgTools class don't return on the first error, it will try to install all packages. Additionnally, for each package, set a status.
$pkgtool->install($package_list) ;
$pkgtool->remove($package_list);
DUPUIS Arnaud, <a.dupuis@infinityperl.org>
<a.dupuis@infinityperl.org>
Please report any bugs or feature requests to bug-Slackware-Slackget@rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Slackware-Slackget. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-Slackware-Slackget@rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc Slackware::Slackget
You can also look for information at:
Infinity Perl website
http://www.infinityperl.org/category/slack-get
slack-get specific website
http://slackget.infinityperl.org
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Slackware-Slackget
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/Slackware-Slackget
CPAN Ratings
http://cpanratings.perl.org/d/Slackware-Slackget
Search CPAN
http://search.cpan.org/dist/Slackware-Slackget
Thanks to Bertrand Dupuis (yes my brother) for his contribution to the documentation.
Copyright 2005 DUPUIS Arnaud, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Slackware::Slackget, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Slackware::Slackget
CPAN shell
perl -MCPAN -e shell install Slackware::Slackget
For more information on module installation, please visit the detailed CPAN module installation guide.