mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-02-07 08:46:21 +01:00
updated for verssion 1.9.3
This commit is contained in:
parent
0ce01ae998
commit
f17fc64ea5
11 changed files with 109 additions and 86 deletions
|
@ -1,3 +1,9 @@
|
||||||
|
Version 1.9.3
|
||||||
|
29-09-2014
|
||||||
|
|
||||||
|
[Feature] - Added blacklist configuration file.
|
||||||
|
- Added blacklist options.
|
||||||
|
|
||||||
Version 1.9.2
|
Version 1.9.2
|
||||||
27-09-2014
|
27-09-2014
|
||||||
|
|
||||||
|
|
2
PKG-INFO
2
PKG-INFO
|
@ -1,6 +1,6 @@
|
||||||
Metadata-Version: 1.1
|
Metadata-Version: 1.1
|
||||||
Name: slpkg
|
Name: slpkg
|
||||||
Version: 1.9.2
|
Version: 1.9.3
|
||||||
Author: dslackw
|
Author: dslackw
|
||||||
Author-email: d zlatanidis at gmail com
|
Author-email: d zlatanidis at gmail com
|
||||||
Maintainer: dslackw
|
Maintainer: dslackw
|
||||||
|
|
74
README.rst
74
README.rst
|
@ -7,9 +7,9 @@
|
||||||
|
|
||||||
Latest Release:
|
Latest Release:
|
||||||
|
|
||||||
- Version: 1.9.2
|
- Version: 1.9.3
|
||||||
- `Package <https://sourceforge.net/projects/slpkg/files/slpkg/binary/>`_
|
- `Package <https://sourceforge.net/projects/slpkg/files/slpkg/binary/>`_
|
||||||
- `Source <https://github.com/dslackw/slpkg/archive/v1.9.2.tar.gz>`_
|
- `Source <https://github.com/dslackw/slpkg/archive/v1.9.3.tar.gz>`_
|
||||||
- `CHANGELOG <https://github.com/dslackw/slpkg/blob/master/CHANGELOG>`_
|
- `CHANGELOG <https://github.com/dslackw/slpkg/blob/master/CHANGELOG>`_
|
||||||
|
|
||||||
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
|
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
|
||||||
|
@ -88,7 +88,7 @@ Tutorial
|
||||||
--------
|
--------
|
||||||
|
|
||||||
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/screenshot-1.png
|
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/screenshot-1.png
|
||||||
:target: https://asciinema.org/a/12340
|
:target: https://asciinema.org/a/12544
|
||||||
|
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
|
@ -98,8 +98,8 @@ Untar the archive and run install.sh script:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
$ tar xvf slpkg-1.9.2.tar.gz
|
$ tar xvf slpkg-1.9.3.tar.gz
|
||||||
$ cd slpkg-1.9.2
|
$ cd slpkg-1.9.3
|
||||||
$ ./install.sh
|
$ ./install.sh
|
||||||
|
|
||||||
Using `pip <https://pip.pypa.io/en/latest/>`_ :
|
Using `pip <https://pip.pypa.io/en/latest/>`_ :
|
||||||
|
@ -120,28 +120,31 @@ Command Line Tool Usage
|
||||||
-----------------------
|
-----------------------
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
||||||
slpkg - Utility for easy management packages in Slackware
|
Utility for easy management packages in Slackware
|
||||||
|
|
||||||
Optional arguments:
|
Optional arguments:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
-v, --version print version and exit
|
-v, --version print version and exit
|
||||||
-a, script [source...] auto build packages
|
-a, script [source...] auto build packages
|
||||||
-l, all, sbo, slack, noarch list of installed packages
|
-l, all, sbo, slack, noarch list of installed packages
|
||||||
-c, <repository> --upgrade check if your packages is up to date
|
-c, <repository> --upgrade check if your packages is up to date
|
||||||
-s, <repository> <package> download, build & install packages
|
-s, <repository> <package> download, build & install packages
|
||||||
-f, <package> find installed packages
|
-f, <package> find installed packages
|
||||||
-t, <package> packages tracking dependencies from SBo
|
-t, <package> packages tracking dependencies from SBo
|
||||||
-n, <package> view packages from SBo repository
|
-n, <package> view packages from SBo repository
|
||||||
-i, [package...] install binary packages
|
-b, --list blacklisted packages
|
||||||
-u, [package...] upgrade binary packages
|
-b [package...] --add --remove add, remove packages in blacklist
|
||||||
-o, [package...] reinstall binary packages
|
-i, [package...] install binary packages
|
||||||
-r, [package...] remove binary packages
|
-u, [package...] upgrade binary packages
|
||||||
-d, [package...] display the contents of the packages
|
-o, [package...] reinstall binary packages
|
||||||
|
-r, [package...] remove binary packages
|
||||||
|
-d, [package...] display the contents of the packages
|
||||||
|
|
||||||
Repositories:
|
Repositories:
|
||||||
SlackBuilds = sbo
|
SlackBuilds = sbo
|
||||||
Slackware = slack
|
Slackware = slack
|
||||||
|
|
||||||
|
|
||||||
Slpkg Examples
|
Slpkg Examples
|
||||||
--------------
|
--------------
|
||||||
|
@ -576,6 +579,35 @@ Remove packages with all dependencies:
|
||||||
| Package werkzeug removed
|
| Package werkzeug removed
|
||||||
+==============================================================================
|
+==============================================================================
|
||||||
|
|
||||||
|
|
||||||
|
Using the blacklist file manually from /etc/slpkg/blacklist or
|
||||||
|
with the following options:
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
$ slpkg -b live554 speex faac --add
|
||||||
|
|
||||||
|
Add packages in blacklist:
|
||||||
|
|
||||||
|
live555
|
||||||
|
speex
|
||||||
|
faac
|
||||||
|
|
||||||
|
|
||||||
|
$ slpkg -b speex --remove
|
||||||
|
|
||||||
|
Remove packages from blacklist:
|
||||||
|
|
||||||
|
speex
|
||||||
|
|
||||||
|
|
||||||
|
$ slpkg -b --list
|
||||||
|
|
||||||
|
Packages in blacklist:
|
||||||
|
|
||||||
|
live555
|
||||||
|
faac
|
||||||
|
|
||||||
Man page it is available for full support:
|
Man page it is available for full support:
|
||||||
|
|
||||||
.. code-block:: bash
|
.. code-block:: bash
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
PRGNAM=slpkg
|
PRGNAM=slpkg
|
||||||
VERSION=${VERSION:-1.9.2}
|
VERSION=${VERSION:-1.9.3}
|
||||||
TAG=${TAG:-_dsw}
|
TAG=${TAG:-_dsw}
|
||||||
|
|
||||||
cd ..
|
cd ..
|
||||||
|
|
50
man/slpkg.8
50
man/slpkg.8
|
@ -27,25 +27,29 @@ slpkg - Utility for easy management packages in Slackware
|
||||||
.PP
|
.PP
|
||||||
It's a quick and easy way to manage your packages in slackware to a command.
|
It's a quick and easy way to manage your packages in slackware to a command.
|
||||||
.SH EXAMPLES
|
.SH EXAMPLES
|
||||||
\fBOptional arguments:
|
\fBUtility for easy management packages in Slackware
|
||||||
-h, --help show this help message and exit
|
|
||||||
-v, --version print version and exit
|
|
||||||
-a, script [source...] auto build packages
|
|
||||||
-l, all, sbo, slack, noarch list of installed packages
|
|
||||||
-c, <repository> --upgrade check if your packages is up to date
|
|
||||||
-s, <repository> <package> download, build & install packages
|
|
||||||
-f, <package> find installed packages
|
|
||||||
-t, <package> packages tracking dependencies from SBo
|
|
||||||
-n, <package> view packages from SBo repository
|
|
||||||
-i, [package...] install binary packages
|
|
||||||
-u, [package...] upgrade binary packages
|
|
||||||
-o, [package...] reinstall binary packages
|
|
||||||
-r, [package...] remove binary packages
|
|
||||||
-d, [package...] display the contents of the packages
|
|
||||||
|
|
||||||
Repositories:
|
Optional arguments:
|
||||||
SlackBuilds = sbo
|
-h, --help show this help message and exit
|
||||||
Slackware = slack\fp
|
-v, --version print version and exit
|
||||||
|
-a, script [source...] auto build packages
|
||||||
|
-l, all, sbo, slack, noarch list of installed packages
|
||||||
|
-c, <repository> --upgrade check if your packages is up to date
|
||||||
|
-s, <repository> <package> download, build & install packages
|
||||||
|
-f, <package> find installed packages
|
||||||
|
-t, <package> packages tracking dependencies from SBo
|
||||||
|
-n, <package> view packages from SBo repository
|
||||||
|
-b, --list blacklisted packages
|
||||||
|
-b [package...] --add --remove add, remove packages in blacklist
|
||||||
|
-i, [package...] install binary packages
|
||||||
|
-u, [package...] upgrade binary packages
|
||||||
|
-o, [package...] reinstall binary packages
|
||||||
|
-r, [package...] remove binary packages
|
||||||
|
-d, [package...] display the contents of the packages
|
||||||
|
|
||||||
|
Repositories:
|
||||||
|
SlackBuilds = sbo
|
||||||
|
Slackware = slack\fP
|
||||||
|
|
||||||
.SH GLOBAL OPTIONS
|
.SH GLOBAL OPTIONS
|
||||||
.TP
|
.TP
|
||||||
|
@ -88,6 +92,16 @@ The sequence shown is that you must follow to correctly install package.
|
||||||
.PP
|
.PP
|
||||||
With this method you can find the SBo script that interests you through
|
With this method you can find the SBo script that interests you through
|
||||||
the network. (www.slackbuilds.org)
|
the network. (www.slackbuilds.org)
|
||||||
|
.SS -b , --list blacklisted packages
|
||||||
|
\fBslpkg\fP \fB-b\fP \fB--list\fP
|
||||||
|
.PP
|
||||||
|
Print all blacklist packages. Each package listed here may not be
|
||||||
|
installed be upgraded be find or deleted.
|
||||||
|
.SS -b , <packages> -- add --remove
|
||||||
|
\fBslpkg\fP \fB-b\fP <\fIpackages\fP> \fB--add\fP \fB--remove\fP
|
||||||
|
.PP
|
||||||
|
Add or remove packages from blacklist. The settings here affect
|
||||||
|
all repositories.
|
||||||
.SS -i , install binary package
|
.SS -i , install binary package
|
||||||
\fBslpkg\fP \fB-i\fP <\fIpackages.t?z\fP>
|
\fBslpkg\fP \fB-i\fP <\fIpackages.t?z\fP>
|
||||||
.PP
|
.PP
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||||
|
|
||||||
PRGNAM=slpkg
|
PRGNAM=slpkg
|
||||||
VERSION=${VERSION:-1.9.2}
|
VERSION=${VERSION:-1.9.3}
|
||||||
BUILD=${BUILD:-1}
|
BUILD=${BUILD:-1}
|
||||||
TAG=${TAG:-_dsw}
|
TAG=${TAG:-_dsw}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
PRGNAM="slpkg"
|
PRGNAM="slpkg"
|
||||||
VERSION="1.9.2"
|
VERSION="1.9.3"
|
||||||
HOMEPAGE="https://github.com/dslackw/slpkg"
|
HOMEPAGE="https://github.com/dslackw/slpkg"
|
||||||
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.9.2.tar.gz"
|
DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.9.3.tar.gz"
|
||||||
MD5SUM=""
|
MD5SUM=""
|
||||||
DOWNLOAD_x86_64=""
|
DOWNLOAD_x86_64=""
|
||||||
MD5SUM_x86_64=""
|
MD5SUM_x86_64=""
|
||||||
|
|
|
@ -23,7 +23,9 @@
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
import getpass
|
||||||
|
|
||||||
|
from messages import s_user
|
||||||
from url_read import url_read
|
from url_read import url_read
|
||||||
from __metadata__ import log_path, lib_path, bls_path
|
from __metadata__ import log_path, lib_path, bls_path
|
||||||
from file_size import server_file_size, local_file_size
|
from file_size import server_file_size, local_file_size
|
||||||
|
@ -36,6 +38,7 @@ def initialization():
|
||||||
/var/lib/slpkg/sbo_repo/ and ChangeLog.txt in /var/log/slpkg/ from
|
/var/lib/slpkg/sbo_repo/ and ChangeLog.txt in /var/log/slpkg/ from
|
||||||
slackbuilds.org
|
slackbuilds.org
|
||||||
'''
|
'''
|
||||||
|
s_user(getpass.getuser())
|
||||||
blacklist_conf = [
|
blacklist_conf = [
|
||||||
"# This is the blacklist file. Each package listed here may not be\n",
|
"# This is the blacklist file. Each package listed here may not be\n",
|
||||||
"# installed be upgraded be find or deleted.\n",
|
"# installed be upgraded be find or deleted.\n",
|
||||||
|
|
|
@ -21,37 +21,13 @@
|
||||||
# You should have received a copy of the GNU General Public License
|
# You should have received a copy of the GNU General Public License
|
||||||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
|
||||||
'''
|
|
||||||
slpkg - Utility for easy management packages in Slackware
|
|
||||||
|
|
||||||
Optional arguments:
|
|
||||||
-h, --help show this help message and exit
|
|
||||||
-v, --version print version and exit
|
|
||||||
-a, script [source...] auto build packages
|
|
||||||
-l, all, sbo, slack, noarch list of installed packages
|
|
||||||
-c, <repository> --upgrade check if your packages is up to date
|
|
||||||
-s, <repository> <package> download, build & install packages
|
|
||||||
-f, <package> find installed packages
|
|
||||||
-t, <package> packages tracking dependencies from SBo
|
|
||||||
-n, <package> view packages from SBo repository
|
|
||||||
-i, [package...] install binary packages
|
|
||||||
-u, [package...] upgrade binary packages
|
|
||||||
-o, [package...] reinstall binary packages
|
|
||||||
-r, [package...] remove binary packages
|
|
||||||
-d, [package...] display the contents of the packages
|
|
||||||
|
|
||||||
Repositories:
|
|
||||||
SlackBuilds = sbo
|
|
||||||
Slackware = slack
|
|
||||||
'''
|
|
||||||
|
|
||||||
import getpass
|
import getpass
|
||||||
|
|
||||||
from colors import *
|
from colors import *
|
||||||
from messages import s_user
|
from messages import s_user
|
||||||
from version import prog_version
|
from version import prog_version
|
||||||
from blacklist import blacklisted, add_blacklist, remove_blacklist
|
|
||||||
from __metadata__ import path, __version__
|
from __metadata__ import path, __version__
|
||||||
|
from blacklist import blacklisted, add_blacklist, remove_blacklist
|
||||||
|
|
||||||
from pkg.manager import *
|
from pkg.manager import *
|
||||||
from pkg.build import build_package
|
from pkg.build import build_package
|
||||||
|
@ -66,6 +42,8 @@ from slack.install import install
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
|
|
||||||
|
s_user(getpass.getuser())
|
||||||
arguments = [
|
arguments = [
|
||||||
"slpkg - version {0}\n".format(__version__),
|
"slpkg - version {0}\n".format(__version__),
|
||||||
"Utility for easy management packages in Slackware\n",
|
"Utility for easy management packages in Slackware\n",
|
||||||
|
@ -96,7 +74,8 @@ def main():
|
||||||
" [-l all, sbo, slack, noarch]",
|
" [-l all, sbo, slack, noarch]",
|
||||||
" [-c <repository> --upgrade]",
|
" [-c <repository> --upgrade]",
|
||||||
" [-s <repository> <package>]",
|
" [-s <repository> <package>]",
|
||||||
" [-f] [-t] [-n] [-i [...]]",
|
" [-f] [-t] [-n] [-b --list]",
|
||||||
|
" [-b [...] --add --remove] [-i [...]]",
|
||||||
" [-u [...]] [-o [...]] [-r [...]] [-d [...]]\n",
|
" [-u [...]] [-o [...]] [-r [...]] [-d [...]]\n",
|
||||||
"For more information try 'slpkg --help'\n"
|
"For more information try 'slpkg --help'\n"
|
||||||
]
|
]
|
||||||
|
@ -110,7 +89,6 @@ def main():
|
||||||
elif len(args) == 1 and args[0] == "-v" or args[0] == "--version":
|
elif len(args) == 1 and args[0] == "-v" or args[0] == "--version":
|
||||||
prog_version()
|
prog_version()
|
||||||
elif len(args) == 3 and args[0] == "-a":
|
elif len(args) == 3 and args[0] == "-a":
|
||||||
s_user(getpass.getuser())
|
|
||||||
build_package(args[1], args[2:], path)
|
build_package(args[1], args[2:], path)
|
||||||
elif len(args) == 2 and args[0] == "-l":
|
elif len(args) == 2 and args[0] == "-l":
|
||||||
sbo_list = ["all", "sbo", "slack", "noarch"]
|
sbo_list = ["all", "sbo", "slack", "noarch"]
|
||||||
|
@ -119,7 +97,6 @@ def main():
|
||||||
else:
|
else:
|
||||||
for opt in usage: print(opt)
|
for opt in usage: print(opt)
|
||||||
elif len(args) == 3 and args[0] == "-c":
|
elif len(args) == 3 and args[0] == "-c":
|
||||||
s_user(getpass.getuser())
|
|
||||||
if args[1] == repository[0] and args[2] == "--upgrade":
|
if args[1] == repository[0] and args[2] == "--upgrade":
|
||||||
sbo_check()
|
sbo_check()
|
||||||
elif args[1] == repository[1] and args[2] == "--upgrade":
|
elif args[1] == repository[1] and args[2] == "--upgrade":
|
||||||
|
@ -127,37 +104,27 @@ def main():
|
||||||
else:
|
else:
|
||||||
for opt in usage: print(opt)
|
for opt in usage: print(opt)
|
||||||
elif len(args) == 3 and args[0] == "-s":
|
elif len(args) == 3 and args[0] == "-s":
|
||||||
s_user(getpass.getuser())
|
|
||||||
if args[1] == repository[0]:
|
if args[1] == repository[0]:
|
||||||
sbo_build(args[2])
|
sbo_build(args[2])
|
||||||
elif args[1] == repository[1]:
|
elif args[1] == repository[1]:
|
||||||
install(args[2])
|
install(args[2])
|
||||||
elif len(args) == 2 and args[0] == "-t":
|
elif len(args) == 2 and args[0] == "-t":
|
||||||
s_user(getpass.getuser())
|
|
||||||
pkg_tracking(args[1])
|
pkg_tracking(args[1])
|
||||||
elif len(args) == 2 and args[0] == "-n":
|
elif len(args) == 2 and args[0] == "-n":
|
||||||
s_user(getpass.getuser())
|
|
||||||
sbo_network(args[1])
|
sbo_network(args[1])
|
||||||
elif len(args) == 2 and args[0] == "-b" and args[1] == "--list":
|
elif len(args) == 2 and args[0] == "-b" and args[1] == "--list":
|
||||||
s_user(getpass.getuser())
|
|
||||||
blacklisted()
|
blacklisted()
|
||||||
elif len(args) > 2 and args[0] == "-b" and args[-1] == "--add":
|
elif len(args) > 2 and args[0] == "-b" and args[-1] == "--add":
|
||||||
s_user(getpass.getuser())
|
|
||||||
add_blacklist(args[1:-1])
|
add_blacklist(args[1:-1])
|
||||||
elif len(args) > 2 and args[0] == "-b" and args[-1] == "--remove":
|
elif len(args) > 2 and args[0] == "-b" and args[-1] == "--remove":
|
||||||
s_user(getpass.getuser())
|
|
||||||
remove_blacklist(args[1:-1])
|
remove_blacklist(args[1:-1])
|
||||||
elif len(args) > 1 and args[0] == "-i":
|
elif len(args) > 1 and args[0] == "-i":
|
||||||
s_user(getpass.getuser())
|
|
||||||
pkg_install(args[1:])
|
pkg_install(args[1:])
|
||||||
elif len(args) > 1 and args[0] == "-u":
|
elif len(args) > 1 and args[0] == "-u":
|
||||||
s_user(getpass.getuser())
|
|
||||||
pkg_upgrade(args[1:])
|
pkg_upgrade(args[1:])
|
||||||
elif len(args) > 1 and args[0] == "-o":
|
elif len(args) > 1 and args[0] == "-o":
|
||||||
s_user(getpass.getuser())
|
|
||||||
pkg_reinstall(args[1:])
|
pkg_reinstall(args[1:])
|
||||||
elif len(args) > 1 and args[0] == "-r":
|
elif len(args) > 1 and args[0] == "-r":
|
||||||
s_user(getpass.getuser())
|
|
||||||
pkg_remove(args[1:])
|
pkg_remove(args[1:])
|
||||||
elif len(args) > 1 and args[0] == "-f":
|
elif len(args) > 1 and args[0] == "-f":
|
||||||
pkg_find(args[1:])
|
pkg_find(args[1:])
|
||||||
|
@ -165,5 +132,6 @@ def main():
|
||||||
pkg_display(args[1:])
|
pkg_display(args[1:])
|
||||||
else:
|
else:
|
||||||
for opt in usage: print(opt)
|
for opt in usage: print(opt)
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -174,7 +174,7 @@ def pkg_find(binary):
|
||||||
matching = size = int()
|
matching = size = int()
|
||||||
print("\nInstalled packages with name matching [ {0}{1}{2} ]\n".format(
|
print("\nInstalled packages with name matching [ {0}{1}{2} ]\n".format(
|
||||||
CYAN, binary, ENDC))
|
CYAN, binary, ENDC))
|
||||||
for match in sorted(os.listdir(pkg_path)):
|
for match in sorted(find_package(binary, pkg_path)):
|
||||||
if binary in match:
|
if binary in match:
|
||||||
matching += 1
|
matching += 1
|
||||||
print("[ {0}installed{1} ] - {2}".format(
|
print("[ {0}installed{1} ] - {2}".format(
|
||||||
|
|
|
@ -27,6 +27,6 @@ def prog_version():
|
||||||
'''
|
'''
|
||||||
Print version, license and email
|
Print version, license and email
|
||||||
'''
|
'''
|
||||||
print ("Version : {}".format(__version__))
|
print ("Version : {0}".format(__version__))
|
||||||
print ("Licence : {}".format(__license__))
|
print ("Licence : {0}".format(__license__))
|
||||||
print ("Email : {}".format(__email__))
|
print ("Email : {0}".format(__email__))
|
||||||
|
|
Loading…
Add table
Reference in a new issue