mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-26 09:58:31 +01:00
updated for version 2.1.1
This commit is contained in:
parent
09010cb3b6
commit
5ef0abc555
14 changed files with 159 additions and 111 deletions
27
CHANGELOG
27
CHANGELOG
|
@ -1,3 +1,12 @@
|
|||
Version 2.1.1-dev
|
||||
02-12-2014
|
||||
|
||||
[Feature] - Added options in /etc/slpkg/slpkg.conf file to select
|
||||
repositories.
|
||||
- Added options to skip unsupported and untested packages.
|
||||
|
||||
[Updated] - Bugfix TypeError for unsupported/untested sbo packages.
|
||||
|
||||
Version 2.1.0
|
||||
28-11-2014
|
||||
|
||||
|
@ -14,13 +23,13 @@ Version 2.0.9
|
|||
Version 2.0.8
|
||||
25-11-2014
|
||||
|
||||
[Updated] - Add more options in slpkg configuration file.
|
||||
[Updated] - Added more options in slpkg configuration file.
|
||||
|
||||
Version 2.0.7
|
||||
22-11-2014
|
||||
|
||||
[Feature] - Add more option in slpkg.conf file.
|
||||
- Add slackware-mirrors file in /etc/slpkg
|
||||
[Feature] - Added more option in slpkg.conf file.
|
||||
- Added slackware-mirrors file in /etc/slpkg
|
||||
|
||||
[Updated] - Fix upgrade Slackware packages if installed.
|
||||
|
||||
|
@ -32,19 +41,19 @@ Version 2.0.6
|
|||
Version 2.0.5
|
||||
18-11-2014
|
||||
|
||||
[Feature] - Add /etc/slpkg.conf file.
|
||||
[Feature] - Added /etc/slpkg.conf file.
|
||||
- Move "--current" switch in /etc/slpkg.conf file.
|
||||
- Add local PACKAGES.TXT for Slackware repository.
|
||||
- Add options to view package description.
|
||||
- Add all repositories in tracking dependencies options '-t'.
|
||||
- Add configuration file managment
|
||||
- Added local PACKAGES.TXT for Slackware repository.
|
||||
- Added options to view package description.
|
||||
- Added all repositories in tracking dependencies options '-t'.
|
||||
- Added configuration file managment
|
||||
|
||||
[Updated] - Bugfix upgrading binary packages.
|
||||
|
||||
Version 2.0.4
|
||||
07-11-2014
|
||||
|
||||
[Feature] - Add Robby Workman, Alien Bob (Eric Hameleers) and
|
||||
[Feature] - Added Robby Workman, Alien Bob (Eric Hameleers) and
|
||||
slacky.eu repositories.
|
||||
|
||||
[Updated] - Fix remove list reference.
|
||||
|
|
2
PKG-INFO
2
PKG-INFO
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 1.1
|
||||
Name: slpkg
|
||||
Version: 2.1.0
|
||||
Version: 2.1.1
|
||||
Author: dslackw
|
||||
Author-email: d zlatanidis at gmail com
|
||||
Maintainer: dslackw
|
||||
|
|
18
README.rst
18
README.rst
|
@ -11,9 +11,9 @@
|
|||
|
||||
Latest Release:
|
||||
|
||||
- Version: 2.1.0
|
||||
- Version: 2.1.1
|
||||
- `Package <https://sourceforge.net/projects/slpkg/files/slpkg/binary/>`_
|
||||
- `Source <https://github.com/dslackw/slpkg/archive/v2.1.0.tar.gz>`_
|
||||
- `Source <https://github.com/dslackw/slpkg/archive/v2.1.1.tar.gz>`_
|
||||
- `CHANGELOG <https://github.com/dslackw/slpkg/blob/master/CHANGELOG>`_
|
||||
|
||||
.. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png
|
||||
|
@ -50,6 +50,9 @@ Supported Repositories:
|
|||
Arch: {x86, x86_64}
|
||||
Versions: {13.37, 14.0, 14.1}
|
||||
|
||||
* Choose repositories you need to work from file '/etc/slpkg/slpkg.conf' default is all repositories.
|
||||
|
||||
|
||||
Slpkg works in accordance with the standards of the organization slackbuilds.org
|
||||
to builds packages. Also uses the Slackware linux instructions for installation,
|
||||
upgrading or removing packages.
|
||||
|
@ -115,8 +118,8 @@ Untar the archive and run install.sh script:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ tar xvf slpkg-2.1.0.tar.gz
|
||||
$ cd slpkg-2.1.0
|
||||
$ tar xvf slpkg-2.1.1.tar.gz
|
||||
$ cd slpkg-2.1.1
|
||||
$ ./install.sh
|
||||
|
||||
From SourceForge:
|
||||
|
@ -136,6 +139,9 @@ Upgrade
|
|||
In each slpkg upgrade should track the configuration files in the file '/etc/slpkg' for
|
||||
new updates.
|
||||
|
||||
*** IMPORTANT :
|
||||
*** Recommended to replace '/etc/slpkg/slpkg.conf' file with '/etc/slpkg/slpkg.conf.new' file.
|
||||
|
||||
|
||||
Configuration files
|
||||
-------------------
|
||||
|
@ -197,8 +203,6 @@ Command Line Tool Usage
|
|||
-r, [package...] remove binary packages
|
||||
-d, [package...] display the contents
|
||||
|
||||
Repositories: <slack, sbo, alien, slacky, rlw, studio>
|
||||
Colors = [red, green, yellow, cyan, grey]
|
||||
|
||||
Slpkg Examples
|
||||
--------------
|
||||
|
@ -700,7 +704,7 @@ Print package description:
|
|||
|
||||
.. code-block:: bash
|
||||
|
||||
$ slpkg -p alien vlc
|
||||
$ slpkg -p alien vlc --color=green
|
||||
|
||||
vlc (multimedia player for various audio and video formats)
|
||||
|
||||
|
|
|
@ -23,6 +23,10 @@
|
|||
# Slackware version 'stable' or 'current'.
|
||||
VERSION=stable
|
||||
|
||||
# Choose repositories want to work.
|
||||
# Available repositories : slack, sbo, alien, rlw, slacky, studio
|
||||
REPOSITORIES=slack,sbo,alien,rlw,slacky,studio
|
||||
|
||||
# Build directory for repository slackbuilds.org. In this directory
|
||||
# downloaded sources and scripts for building.
|
||||
BUILD=/tmp/slpkg/build/
|
||||
|
@ -55,6 +59,9 @@ DEFAULT_ANSWER=n
|
|||
# Choose 'y' if you do not want to question.
|
||||
REMOVE_DEPS_ANSWER=n
|
||||
|
||||
# If you want build UNSUPPORTED or UNTESTED packages choose 'y'.
|
||||
SKIP_UNST=n
|
||||
|
||||
# Delete package dependencies if DEL_DEPS is on.
|
||||
DEL_DEPS=on
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=slpkg
|
||||
VERSION=${VERSION:-2.1.0}
|
||||
VERSION=${VERSION:-2.1.1}
|
||||
TAG=${TAG:-_dsw}
|
||||
|
||||
# Installation script.
|
||||
|
|
21
man/slpkg.8
21
man/slpkg.8
|
@ -15,7 +15,7 @@
|
|||
.SH NAME
|
||||
slpkg - Utility for easy management packages in Slackware
|
||||
.SH SYNOPSIS
|
||||
\fBUsage: slpkg [-h] [-v] [-a script.tar.gz [sources...]]
|
||||
Usage: slpkg [-h] [-v] [-a script.tar.gz [sources...]]
|
||||
[-b --list, --add, --remove [...]]
|
||||
[-q --list, [...] --add, --remove]
|
||||
[ --build, --install, --build-install]
|
||||
|
@ -26,17 +26,16 @@ slpkg - Utility for easy management packages in Slackware
|
|||
[-t [repository] [package]]
|
||||
[-p [repository] [package] --color=]
|
||||
[-f] [-n] [-i [...]] [-u [...]]
|
||||
[-o [...]] [-r [...]] [-d [...]]\fp
|
||||
[-o [...]] [-r [...]] [-d [...]]
|
||||
|
||||
.SH DESCRIPTION
|
||||
\fBslpkg\fP is a terminal multitool in order to easy use Slackware packages.
|
||||
.PP
|
||||
It's a quick and easy way to manage your packages in slackware to a command.
|
||||
.SH EXAMPLES
|
||||
\fB
|
||||
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
|
||||
-v, --version print version and exit
|
||||
-a, script.tar.gz [source...] auto build SBo packages
|
||||
|
@ -57,9 +56,11 @@ It's a quick and easy way to manage your packages in slackware to a command.
|
|||
-r, [package...] remove binary packages
|
||||
-d, [package...] display the contents
|
||||
|
||||
Repositories: <slack, sbo, alien, slacky, rlw, studio>
|
||||
Colors = [red, green, yellow, cyan, grey]\fP
|
||||
|
||||
.SH REPOSITORIES
|
||||
slack, sbo, alien, slacky, rlw, studio
|
||||
.SH COLORS
|
||||
red, green, yellow, cyan, grey
|
||||
.PP
|
||||
.SH GLOBAL OPTIONS
|
||||
.TP
|
||||
\fB\-v\fP, \fB\-\-version\fP
|
||||
|
@ -117,9 +118,9 @@ Tracking all dependencies of that package.
|
|||
The sequence shown is that you must follow to correctly install package.
|
||||
|
||||
.SS -p , print packages description
|
||||
\fBslpkg\fP \fB-p\fP <\fIrepository\fP> <\fIname of package\fP>
|
||||
\fBslpkg\fP \fB-p\fP <\fIrepository\fP> <\fIname of package\fP> \fI--color=\fP
|
||||
.PP
|
||||
Print package description
|
||||
Print package description with color. Available colors: red, green, yellow, cyan, grey
|
||||
|
||||
.SS -f find packages
|
||||
\fBslpkg\fP \fB-f\fP <\fIname of package\fP>
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
PRGNAM=slpkg
|
||||
VERSION=${VERSION:-2.1.0}
|
||||
VERSION=${VERSION:-2.1.1}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_dsw}
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ import os
|
|||
|
||||
__all__ = "slpkg"
|
||||
__author__ = "dslackw"
|
||||
__version_info__ = (2, 1, 0)
|
||||
__version_info__ = (2, 1, 1)
|
||||
__version__ = "{0}.{1}.{2}".format(*__version_info__)
|
||||
__license__ = "GNU General Public License v3 (GPLv3)"
|
||||
__email__ = "d.zlatanidis@gmail.com"
|
||||
|
@ -36,6 +36,14 @@ tmp = "/tmp/"
|
|||
|
||||
# Default configuration values
|
||||
slack_rel = "stable"
|
||||
repositories = [
|
||||
'slack',
|
||||
'sbo',
|
||||
'rlw',
|
||||
'alien',
|
||||
'slacky',
|
||||
'studio'
|
||||
]
|
||||
build_path = "/tmp/slpkg/build/"
|
||||
slpkg_tmp_packages = tmp + "slpkg/packages/"
|
||||
slpkg_tmp_patches = tmp + "slpkg/patches/"
|
||||
|
@ -45,6 +53,7 @@ del_build = "off"
|
|||
sbo_build_log = "on"
|
||||
default_answer = "n"
|
||||
remove_deps_answer = "n"
|
||||
skip_unst = "n"
|
||||
del_deps = "on"
|
||||
use_colors = "on"
|
||||
|
||||
|
@ -58,6 +67,8 @@ if os.path.isfile("/etc/slpkg/slpkg.conf"):
|
|||
slack_rel = line[8:].strip()
|
||||
if not slack_rel:
|
||||
slack_rel = "stable"
|
||||
if line.startswith("REPOSITORIES"):
|
||||
repositories = line[13:].strip().split(",")
|
||||
if line.startswith("BUILD"):
|
||||
build_path = line[6:].strip()
|
||||
if line.startswith("PACKAGES"):
|
||||
|
@ -76,22 +87,13 @@ if os.path.isfile("/etc/slpkg/slpkg.conf"):
|
|||
default_answer = line[15:].strip()
|
||||
if line.startswith("REMOVE_DEPS_ANSWER"):
|
||||
remove_deps_answer = line[19:].strip()
|
||||
if line.startswith("SKIP_UNST"):
|
||||
skip_unst = line[10:].strip()
|
||||
if line.startswith("DEL_DEPS"):
|
||||
del_deps = line[9:].strip()
|
||||
if line.startswith("USE_COLORS"):
|
||||
use_colors = line[11:].strip()
|
||||
|
||||
|
||||
# repositories
|
||||
repositories = [
|
||||
'slack',
|
||||
'sbo',
|
||||
'rlw',
|
||||
'alien',
|
||||
'slacky',
|
||||
'studio'
|
||||
]
|
||||
|
||||
if use_colors == "on":
|
||||
color = {
|
||||
'RED': '\x1b[31m',
|
||||
|
|
|
@ -22,7 +22,10 @@
|
|||
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
from __metadata__ import __version__
|
||||
from __metadata__ import (
|
||||
__version__,
|
||||
repositories
|
||||
)
|
||||
|
||||
|
||||
def options():
|
||||
|
@ -56,8 +59,6 @@ def options():
|
|||
" -o, [package...] reinstall binary packages",
|
||||
" -r, [package...] remove binary packages",
|
||||
" -d, [package...] display the contents\n",
|
||||
"Repositories: <slack, sbo, alien, slacky, rlw, studio>",
|
||||
"Colors = [red, green, yellow, cyan, grey]\n",
|
||||
]
|
||||
for opt in arguments:
|
||||
print(opt)
|
||||
|
@ -78,7 +79,10 @@ def usage():
|
|||
" [-p [repository] [package] --color=[]]",
|
||||
" [-f] [-n] [-i [...]] [-u [...]]",
|
||||
" [-o [...]] [-r [...]] [-d [...]]\n",
|
||||
"Repositories: " + ", ".join(repositories),
|
||||
"Colors: red, green, yellow, cyan, grey\n",
|
||||
"For more information try 'slpkg --help'\n"
|
||||
]
|
||||
|
||||
for usg in view:
|
||||
print(usg)
|
||||
|
|
|
@ -38,6 +38,7 @@ class Config(object):
|
|||
print("") # new line at start
|
||||
conf_args = [
|
||||
'VERSION',
|
||||
'REPOSITORIES',
|
||||
'BUILD',
|
||||
'SBO_CHECK_MD5',
|
||||
'PACKAGES',
|
||||
|
@ -47,6 +48,7 @@ class Config(object):
|
|||
'SBO_BUILD_LOG',
|
||||
'DEFAULT_ANSWER',
|
||||
'REMOVE_DEPS_ANSWER',
|
||||
'SKIP_UNST',
|
||||
'DEL_DEPS',
|
||||
'USE_COLORS'
|
||||
]
|
||||
|
|
|
@ -134,7 +134,6 @@ def main():
|
|||
usage()
|
||||
elif len(args) == 3 and args[0] == "-s":
|
||||
pkg = Case(args[2])
|
||||
if args[1] in repositories:
|
||||
install = {
|
||||
'sbo': pkg.sbo_install,
|
||||
'slack': pkg.slack_install,
|
||||
|
@ -143,13 +142,14 @@ def main():
|
|||
'slacky': pkg.slacky_install,
|
||||
'studio': pkg.studioware_install
|
||||
}
|
||||
if args[1] in repositories:
|
||||
install[args[1]]()
|
||||
else:
|
||||
usage()
|
||||
elif (len(args) == 3 and args[0] == "-t" and args[1] in repositories
|
||||
and args[1] != "slack"):
|
||||
track_dep(args[2], args[1])
|
||||
elif len(args) == 2 and args[0] == "-n":
|
||||
elif len(args) == 2 and args[0] == "-n" and "sbo" in repositories:
|
||||
SBoNetwork(args[1]).view()
|
||||
elif len(args) == 2 and args[0] == "-b" and args[1] == "--list":
|
||||
blacklist.listed()
|
||||
|
|
|
@ -81,7 +81,7 @@ class BuildPackage(object):
|
|||
if sbo_check_md5 == "on":
|
||||
check_md5(sbo_md5, src)
|
||||
shutil.copy2(src, self.prgnam)
|
||||
os.chdir(self.path + "/" + self.prgnam)
|
||||
os.chdir(self.path + self.prgnam)
|
||||
# change permissions
|
||||
subprocess.call("chmod +x {0}.SlackBuild".format(self.prgnam),
|
||||
shell=True)
|
||||
|
|
|
@ -23,7 +23,8 @@
|
|||
|
||||
from slpkg.__metadata__ import (
|
||||
arch,
|
||||
lib_path
|
||||
lib_path,
|
||||
skip_unst
|
||||
)
|
||||
|
||||
|
||||
|
@ -43,7 +44,8 @@ class SBoGrep(object):
|
|||
self.line_md5_64 = "SLACKBUILD MD5SUM_{0}: ".format(arch64)
|
||||
self.line_des = "SLACKBUILD SHORT DESCRIPTION: "
|
||||
self.sbo_txt = lib_path + "sbo_repo/SLACKBUILDS.TXT"
|
||||
|
||||
self.answer = ['y', 'Y']
|
||||
self.unst = ['UNSUPPORTED', 'UNTESTED']
|
||||
# open an read SLACKBUILDS.TXT file
|
||||
f = open(self.sbo_txt, "r")
|
||||
self.SLACKBUILDS_TXT = f.read()
|
||||
|
@ -53,20 +55,29 @@ class SBoGrep(object):
|
|||
'''
|
||||
Grab sources downloads links
|
||||
'''
|
||||
if arch == "x86_64":
|
||||
for line in self.SLACKBUILDS_TXT.splitlines():
|
||||
if line.startswith(self.line_name):
|
||||
sbo_name = line[17:].strip()
|
||||
if line.startswith(self.line_down_64):
|
||||
if sbo_name == self.name:
|
||||
if line[28:].strip():
|
||||
return line[28:].strip()
|
||||
source, source64, src, = "", "", ""
|
||||
for line in self.SLACKBUILDS_TXT.splitlines():
|
||||
if line.startswith(self.line_name):
|
||||
sbo_name = line[17:].strip()
|
||||
if line.startswith(self.line_down):
|
||||
if sbo_name == self.name:
|
||||
return line[21:].strip()
|
||||
if sbo_name == self.name and line[21:].strip():
|
||||
source = line[21:]
|
||||
if line.startswith(self.line_down_64):
|
||||
if sbo_name == self.name and line[28:].strip():
|
||||
source64 = line[28:]
|
||||
if arch == "x86_64":
|
||||
if source64:
|
||||
src = source64
|
||||
else:
|
||||
src = source
|
||||
if skip_unst in self.answer and source64 in self.unst:
|
||||
src = source
|
||||
else:
|
||||
if source:
|
||||
src = source
|
||||
if skip_unst in self.answer and source in self.unst:
|
||||
src = source64
|
||||
return src
|
||||
|
||||
def requires(self):
|
||||
'''
|
||||
|
@ -94,20 +105,29 @@ class SBoGrep(object):
|
|||
'''
|
||||
Grab checksum string
|
||||
'''
|
||||
if arch == "x86_64":
|
||||
md5sum, md5sum64, md5 = [], [], []
|
||||
for line in self.SLACKBUILDS_TXT.splitlines():
|
||||
if line.startswith(self.line_name):
|
||||
sbo_name = line[17:].strip()
|
||||
if line.startswith(self.line_md5_64):
|
||||
if sbo_name == self.name:
|
||||
if line[26:].strip():
|
||||
return line[26:].strip().split()
|
||||
for line in self.SLACKBUILDS_TXT.splitlines():
|
||||
if line.startswith(self.line_name):
|
||||
sbo_name = line[17:].strip()
|
||||
if sbo_name == self.name and line[26:].strip():
|
||||
md5sum64 = line[26:].strip().split()
|
||||
if line.startswith(self.line_md5):
|
||||
if sbo_name == self.name:
|
||||
return line[19:].strip().split()
|
||||
if sbo_name == self.name and line[19:].strip():
|
||||
md5sum = line[19:].strip().split()
|
||||
if arch == "x86_64":
|
||||
if md5sum64:
|
||||
md5 = md5sum64
|
||||
else:
|
||||
md5 = md5sum
|
||||
if skip_unst in self.answer:
|
||||
md5 = md5sum
|
||||
else:
|
||||
if md5sum:
|
||||
md5 = md5sum
|
||||
if skip_unst in self.answer and not md5sum:
|
||||
md5 = md5sum64
|
||||
return md5
|
||||
|
||||
def description(self):
|
||||
'''
|
||||
|
|
|
@ -214,8 +214,7 @@ def pkg_colors_tag(name, sbo_versions, count_upg, count_ins):
|
|||
'''
|
||||
Tag with color green if package already installed,
|
||||
color yellow for packages to upgrade and color red
|
||||
if not installed. Also if package arch is UNSUPPORTED
|
||||
tag with color red and if UNTESTED with color yellow.
|
||||
if not installed.
|
||||
'''
|
||||
# check if 'sbo_versions' is list if true
|
||||
# then get last package from list is master package
|
||||
|
@ -238,12 +237,12 @@ def arch_colors_tag(support, package_arch):
|
|||
'''
|
||||
Arch color tag
|
||||
'''
|
||||
color = ""
|
||||
paint = ""
|
||||
if support[0] in package_arch[-1]:
|
||||
color = color['RED']
|
||||
paint = color['RED']
|
||||
elif support[1] in package_arch[-1]:
|
||||
color = color['YELLOW']
|
||||
return color
|
||||
paint = color['YELLOW']
|
||||
return paint
|
||||
|
||||
|
||||
def top_view():
|
||||
|
|
Loading…
Reference in a new issue