This commit is contained in:
dslackw 2014-07-21 02:54:58 +03:00
parent d94c8d4301
commit 1e54be5a51
3 changed files with 40 additions and 45 deletions

View file

@ -5,10 +5,8 @@
.. image:: https://pypip.in/license/slpkg/badge.png .. image:: https://pypip.in/license/slpkg/badge.png
:target: https://pypi.python.org/pypi/slpkg :target: https://pypi.python.org/pypi/slpkg
Slpkg is a terminal tool in order to easy use Slackware packages. Slpkg is a terminal tool in order to easy use Slackware packages.
.. image:: https://raw.githubusercontent.com/dslackw/slpkg/master/logo/slpkg.png .. image:: https://raw.githubusercontent.com/dslackw/slpkg/master/logo/slpkg.png
:alt: logo :alt: logo
@ -63,8 +61,6 @@ Using pip:
$ pip uninstall slpkg $ pip uninstall slpkg
Command Line Tool Usage Command Line Tool Usage
----------------------- -----------------------
@ -130,12 +126,12 @@ build and install with all dependencies :
Executing install script for brasero-3.11.3-x86_64-1_SBo.tgz. Executing install script for brasero-3.11.3-x86_64-1_SBo.tgz.
Package brasero-3.11.3-x86_64-1_SBo.tgz installed. Package brasero-3.11.3-x86_64-1_SBo.tgz installed.
The package `orc` was installed slpkg: package: orc was installed
The package `gstreamer1` was installed slpkg: package: gstreamer1 installed
The package `gst1-plugins-base` was installed slpkg: package: gst1-plugins-base installed
The package `gst1-plugins-bad` was installed slpkg: package: gst1-plugins-bad installed
The package `libunique` was installed slpkg: package: libunique installed
The package `brasero` was installed slpkg: package: brasero installed
Tracking all dependencies of packages: Tracking all dependencies of packages:
@ -165,10 +161,10 @@ Check if your packages is up to date (www.slackbuilds.org):
$ slpkg -c flashplayer-plugin $ slpkg -c flashplayer-plugin
Searching `flashplayer-plugin` from slackbuilds.org ... Searching `flashplayer-plugin` from slackbuilds.org ...
New version is available !!! New version is available:
+================================================== +==============================================================================
| flashplayer-plugin 11.2.202.356 | slpkg: package: flashplayer-plugin 11.2.202.356 --> flashplayer-plugin 11.2.202.394
+================================================== +==============================================================================
Would you like to install ? [Y/y] Would you like to install ? [Y/y]
@ -192,14 +188,14 @@ Find slackbuild from network (www.slackbuilds.org):
$ slpkg -n bitfighter $ slpkg -n bitfighter
Searching `bitfighter` from slackbuilds.org ... Searching `bitfighter` from slackbuilds.org ...
+======================================================================================= +===============================================================================
| The `bitfighter` found in --> http://slackbuilds.org/repository/14.1/games/bitfighter/ | The `bitfighter` found in --> http://slackbuilds.org/repository/14.1/games/bitfighter/
+======================================================================================= +===============================================================================
| Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/games/bitfighter.tar.gz | Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/games/bitfighter.tar.gz
| Source Downloads : http://bitfighter.org/files/bitfighter-019c.tar.gz | Source Downloads : http://bitfighter.org/files/bitfighter-019c.tar.gz
| Extra Downloads : https://bitfighter.googlecode.com/files/classic_level_pack.zip | Extra Downloads : https://bitfighter.googlecode.com/files/classic_level_pack.zip
| Package requirements : OpenAL SDL2 speex libmodplug | Package requirements : OpenAL SDL2 speex libmodplug
+======================================================================================= +===============================================================================
README View the README file README View the README file
SlackBuild View the SlackBuild file SlackBuild View the SlackBuild file
Info View the Info file Info View the Info file
@ -286,9 +282,6 @@ Auto build tool to build package:
Slackware package /tmp/termcolor-1.1.0-x86_64-1_SBo.tgz created. Slackware package /tmp/termcolor-1.1.0-x86_64-1_SBo.tgz created.
Use `slpkg -u` to install - upgrade this package
Upgrade install package: Upgrade install package:
.. code-block:: bash .. code-block:: bash
@ -328,13 +321,12 @@ Find if your packages installed:
$ slpkg -f termcolor lua yetris you-get rar pip $ slpkg -f termcolor lua yetris you-get rar pip
found --> termcolor-1.1.0-x86_64-1_SBo slpkg: package: found --> termcolor-1.1.0
The package `lua` not found slpkg: package: lua not found
found --> yetris-2.0.1-x86_64-1_SBo slpkg: package: found --> yetris-2.0.1
The package `you-get` not found slpkg: package: you-get not found
found --> rar-5.0.1-x86_64-1_SBo slpkg: package: found --> rar-5.0.1
found --> pip-1.5.4-x86_64-1_SBo slpkg: package: found --> pip-1.5.4
Display the contents of the package: Display the contents of the package:
@ -391,6 +383,7 @@ Remove package:
$ slpkg -r termcolor $ slpkg -r termcolor
These package(s) will be deleted: These package(s) will be deleted:
termcolor-1.1.0-x86_64-1_SBo termcolor-1.1.0-x86_64-1_SBo
1 package marked
Are you sure to remove this package(s) [y/n] y Are you sure to remove this package(s) [y/n] y
Package: termcolor-1.1.0-x86_64-1_SBo Package: termcolor-1.1.0-x86_64-1_SBo
@ -414,15 +407,15 @@ Remove package:
WARNING: Unique directory /usr/lib64/python3.3/ contains new files WARNING: Unique directory /usr/lib64/python3.3/ contains new files
--> Deleting empty directory /usr/doc/termcolor-1.1.0/ --> Deleting empty directory /usr/doc/termcolor-1.1.0/
The package `termcolor` removed +==============================================================================
| slpkg: package: termcolor removed
+==============================================================================
$ slpkg -f termcolor lua rar $ slpkg -f termcolor lua rar
The package `termcolor` not found slpkg: package: termcolor not found
The package `lua` not found slpkg: package: lua not found
found --> rar-5.0.1-x86_64-1_SBo slpkg: package: found --> rar-5.0.1
$ slpkg -v $ slpkg -v
Version: x.x.x Version: x.x.x

View file

@ -165,10 +165,10 @@ $ \fBslpkg -s brasero\fP
$ \fBslpkg -c flashplayer-plugin\fP $ \fBslpkg -c flashplayer-plugin\fP
Searching `flashplayer-plugin` from slackbuilds.org ... Searching `flashplayer-plugin` from slackbuilds.org ...
New version is available !!! New version is available:
+================================================== +==============================================================================
| flashplayer-plugin 11.2.202.356 | slpkg: package: flashplayer-plugin 11.2.202.356 --> flashplayer-plugin 11.2.202.394
+================================================== +==============================================================================
Would you like to install ? [Y/y] Would you like to install ? [Y/y]
@ -177,14 +177,14 @@ $ \fBslpkg -n termcolor\fP
Searching 'termcolor' from slackbuilds.org ... Searching 'termcolor' from slackbuilds.org ...
+====================================================================================== +==============================================================================
| The `termcolor` found in --> http://slackbuilds.org/repository/14.1/python/termcolor/ | The `termcolor` found in --> http://slackbuilds.org/repository/14.1/python/termcolor/
+====================================================================================== +==============================================================================
| Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/python/termcolor.tar.gz | Download SlackBuild : http://slackbuilds.org/slackbuilds/14.1/python/termcolor.tar.gz
| Source Downloads : https://pypi.python.org/packages/source/t/termcolor/termcolor-1.1.0.tar.gz | Source Downloads : https://pypi.python.org/packages/source/t/termcolor/termcolor-1.1.0.tar.gz
| Extra Downloads : | Extra Downloads :
| Package requirements : | Package requirements :
+====================================================================================== +===============================================================================
README View the README file README View the README file
SlackBuild View the SlackBuild file SlackBuild View the SlackBuild file
Info View the Info file Info View the Info file
@ -218,11 +218,11 @@ $ \fBslpkg -r termcolor yetris\fP
$ \fBslpkg -f termcolor\fP $ \fBslpkg -f termcolor\fP
The package 'termcolor' not found slpkg: package: termcolor not found
$ \fBslpkg -d termcolor\fP $ \fBslpkg -d termcolor\fP
The package 'termcolor' not found slpkg: package: termcolor not found
$ \fBslpkg -v\fP $ \fBslpkg -v\fP

View file

@ -65,7 +65,9 @@ def pkg_remove(binary):
for pkg in range(len(binary)): for pkg in range(len(binary)):
pkgs = find_package(binary[pkg], packages) pkgs = find_package(binary[pkg], packages)
if pkgs != []: if pkgs != []:
print colors.RED + '\n'.join(pkgs) + colors.ENDC sbo_tag_len = len(arch) + 7
found_pkg = pkgs[0][:-sbo_tag_len]
print (colors.RED + found_pkg + colors.ENDC)
count.append(pkgs) count.append(pkgs)
sum_pkgs = 0 sum_pkgs = 0
for i in range(len(count)): for i in range(len(count)):