Merge branch 'develop'

This commit is contained in:
Dimitris Zlatanidis 2016-02-09 21:58:49 +02:00
commit cfc8b4d233
12 changed files with 71 additions and 16 deletions

View file

@ -1,3 +1,8 @@
3.0.9 - 09/02/2016
Fixed:
- Listed installed packages from repositories with the name only #58
- Passing char '+' from sources
3.0.8 - 29/01/2016 3.0.8 - 29/01/2016
Added: Added:
- Flag "--name" in option list to show only package name - Flag "--name" in option list to show only package name

View file

@ -20,7 +20,7 @@
:target: https://github.com/dslackw/slpkg/issues :target: https://github.com/dslackw/slpkg/issues
Slpkg v3.0.8 Slpkg v3.0.9
============ ============
| |
@ -79,8 +79,8 @@ Download latest release:
Required root privileges Required root privileges
$ tar xvf slpkg-3.0.8.tar.gz $ tar xvf slpkg-3.0.9.tar.gz
$ cd slpkg-3.0.8 $ cd slpkg-3.0.9
$ ./install.sh $ ./install.sh
Installed as Slackware package Installed as Slackware package
@ -111,9 +111,9 @@ Using pip:
Binary packages: Binary packages:
Slackware: `slpkg-3.0.8-i486-1_dsw.txz <https://github.com/dslackw/slpkg/releases/download/v3.0.8/slpkg-3.0.8-i486-1_dsw.txz>`_ Slackware: `slpkg-3.0.9-i486-1_dsw.txz <https://github.com/dslackw/slpkg/releases/download/v3.0.9/slpkg-3.0.9-i486-1_dsw.txz>`_
Slackware64: `slpkg-3.0.8-x86_64-1_dsw.txz <https://github.com/dslackw/slpkg/releases/download/v3.0.8/slpkg-3.0.8-x86_64-1_dsw.txz>`_ Slackware64: `slpkg-3.0.9-x86_64-1_dsw.txz <https://github.com/dslackw/slpkg/releases/download/v3.0.9/slpkg-3.0.9-x86_64-1_dsw.txz>`_
Optional dependencies Optional dependencies

View file

@ -48,3 +48,9 @@ can not be calculated, good is the report these problems.
Slackware ARM repositories: Slackware ARM repositories:
--------------------------- ---------------------------
Slackware ARM users will must use only two repositories at the moment slack and sbo. Slackware ARM users will must use only two repositories at the moment slack and sbo.
REPOSITORIES ISSUES:
--------------------
SlackBuilds.org (sbo) repository 14.1:
Slackbuilds SDL2_mixer and SDL2_image they have wrong version in the .info file.
Edit /var/log/slpkg/sbo_repo/SLACKBUILDS.TXT file for change VERSION from 2.0.0 to 2.0.1.

View file

@ -46,3 +46,12 @@ Test to upgrade fresh installation Slackware Linux Distribution.
Successful upgrade fresh full installation with command 'slpkg -c slack --upgrade' Successful upgrade fresh full installation with command 'slpkg -c slack --upgrade'
Total 62 packages upgraded and kernel, after auto-install 'lilo' reinstall successfully so. Total 62 packages upgraded and kernel, after auto-install 'lilo' reinstall successfully so.
https://asciinema.org/a/16889 https://asciinema.org/a/16889
--------------------------------
04-02-2016
Slackware Arch: x86 Version 14.2 'current'
Test to upgrade Slackware Linux Distribution.
Successful upgrade with command 'slpkg -c slack --upgrade skip="slack:kde-l10n*,slack:calligra-l10n*"
Total 42 packages upgraded with kernel and 2 new packages installed.
http://pastebin.com/3gbc77Wj

View file

@ -31,7 +31,7 @@
# below. Be careful is the template that the rest. # below. Be careful is the template that the rest.
# #
# #
# Last Updated: Tue Jan 26 06:47:01 UTC 2016 # Last Updated: Thu Feb 4 12:47:01 UTC 2016
# #
# Available http mirrors: # Available http mirrors:
# #

14
logo.txt Normal file
View file

@ -0,0 +1,14 @@
████████████████████████████████████████████████████████████████
▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓
▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ __ ▒▒▒▒▒▒▒▒ __ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
░░░░░░░░░░░░░░____| |__ ___ | | ______ __░░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░/ | | ' \ | | / / ' |░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░/ ___| | __ \| |/ / __ |░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░\ \ | |__) | < (__| |░░░░░░░░░░░░░░░░░░
░░░░░░░░░░░░░\____ \ | /| |\ \ |░░░░░░░░░░░░░░░░░░
| / | .___/ |__| \__\___, |
|____/__| | | |
|__| |_____/
____________ Slackware package manager _________________________

View file

@ -25,6 +25,7 @@
import os import os
import sys import sys
import gzip import gzip
import time
import shutil import shutil
from slpkg.md5sum import md5 from slpkg.md5sum import md5
from slpkg.__metadata__ import MetaData as _meta_ from slpkg.__metadata__ import MetaData as _meta_
@ -45,6 +46,12 @@ OPTIONAL_REQUIREMENTS = [
# Non-Python/non-PyPI optional dependencies: # Non-Python/non-PyPI optional dependencies:
# ascii diagram: graph-easy (available from SBo repository) # ascii diagram: graph-easy (available from SBo repository)
logo_fname = os.path.join(os.path.dirname(__file__), 'logo.txt')
with open(logo_fname, 'rb') as f:
logo = f.read().decode('utf-8')
print(logo)
time.sleep(1)
setup( setup(
name="slpkg", name="slpkg",

View file

@ -77,7 +77,7 @@ class MetaData(object):
__all__ = "slpkg" __all__ = "slpkg"
__author__ = "dslackw" __author__ = "dslackw"
__version_info__ = (3, 0, 8) __version_info__ = (3, 0, 9)
__version__ = "{0}.{1}.{2}".format(*__version_info__) __version__ = "{0}.{1}.{2}".format(*__version_info__)
__license__ = "GNU General Public License v3 (GPLv3)" __license__ = "GNU General Public License v3 (GPLv3)"
__email__ = "d.zlatanidis@gmail.com" __email__ = "d.zlatanidis@gmail.com"

View file

@ -51,7 +51,8 @@ class Download(object):
dwn_count = 1 dwn_count = 1
self._directory_prefix() self._directory_prefix()
for dwn in self.url: for dwn in self.url:
self.file_name = dwn.split("/")[-1] # get file name from url and fix passing char '+'
self.file_name = dwn.split("/")[-1].replace("%2B", "+")
self._check_certificate() self._check_certificate()
print("\n[{0}/{1}][ {2}Download{3} ] --> {4}\n".format( print("\n[{0}/{1}][ {2}Download{3} ] --> {4}\n".format(
dwn_count, len(self.url), self.meta.color["GREEN"], dwn_count, len(self.url), self.meta.color["GREEN"],

View file

@ -28,6 +28,8 @@ import hashlib
def md5(source): def md5(source):
"""Return MD5 Checksum """Return MD5 Checksum
""" """
# fix passing char '+' from source
source = source.replace("%2B", "+")
with open(source) as file_to_check: with open(source) as file_to_check:
data = file_to_check.read() data = file_to_check.read()
return hashlib.md5(data).hexdigest() return hashlib.md5(data).hexdigest()

View file

@ -82,7 +82,8 @@ class BuildPackage(object):
# fix build sources with spaces # fix build sources with spaces
src = src.replace("%20", " ") src = src.replace("%20", " ")
check_md5(self.sbo_md5[src], src) check_md5(self.sbo_md5[src], src)
shutil.copy2(src, self.path + self.prgnam) # copy source and fix passing char '+' from file name
shutil.copy2(src.replace("%2B", "+"), self.path + self.prgnam)
os.chdir(self.path + self.prgnam) os.chdir(self.path + self.prgnam)
# change permissions # change permissions
subprocess.call("chmod +x {0}.SlackBuild".format(self.prgnam), subprocess.call("chmod +x {0}.SlackBuild".format(self.prgnam),

View file

@ -447,12 +447,10 @@ class PackageManager(object):
index, page, pkg_list = 0, row, [] index, page, pkg_list = 0, row, []
r = self.list_lib(repo) r = self.list_lib(repo)
pkg_list = self.list_greps(repo, r)[0] pkg_list = self.list_greps(repo, r)[0]
all_installed_names = self.list_of_installed(repo) all_installed_names = self.list_of_installed(repo, name)
print("") print("")
for pkg in sorted(pkg_list): for pkg in sorted(pkg_list):
package = pkg pkg = self._splitting_packages(pkg, repo, name)
if name and repo != "sbo":
pkg = split_package(pkg)[0]
if INDEX: if INDEX:
index += 1 index += 1
pkg = self.list_color_tag(pkg) pkg = self.list_color_tag(pkg)
@ -475,7 +473,7 @@ class PackageManager(object):
pkg, pkg,
self.meta.color["ENDC"])) self.meta.color["ENDC"]))
else: else:
if package[:-4] in all_installed_names: if pkg in all_installed_names:
print("{0}{1}{2}".format(self.meta.color["GREEN"], print("{0}{1}{2}".format(self.meta.color["GREEN"],
pkg, pkg,
self.meta.color["ENDC"])) self.meta.color["ENDC"]))
@ -486,6 +484,15 @@ class PackageManager(object):
print("") # new line at exit print("") # new line at exit
raise SystemExit() raise SystemExit()
def _splitting_packages(self, pkg, repo, name):
"""Return package name from repositories
"""
if name and repo != "sbo":
pkg = split_package(pkg)[0]
elif not name and repo != "sbo":
pkg = pkg[:-4]
return pkg
def list_greps(self, repo, packages): def list_greps(self, repo, packages):
"""Grep packages """Grep packages
""" """
@ -532,7 +539,7 @@ class PackageManager(object):
self.meta.color["ENDC"]) self.meta.color["ENDC"])
return pkg return pkg
def list_of_installed(self, repo): def list_of_installed(self, repo, name):
"""Return installed packages """Return installed packages
""" """
all_installed_names = [] all_installed_names = []
@ -542,7 +549,10 @@ class PackageManager(object):
name = split_package(inst)[0] name = split_package(inst)[0]
all_installed_names.append(name) all_installed_names.append(name)
else: else:
all_installed_names.append(inst) if name:
all_installed_names.append(split_package(inst)[0])
else:
all_installed_names.append(inst)
return all_installed_names return all_installed_names