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
Added:
- Flag "--name" in option list to show only package name

View file

@ -20,7 +20,7 @@
: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
$ tar xvf slpkg-3.0.8.tar.gz
$ cd slpkg-3.0.8
$ tar xvf slpkg-3.0.9.tar.gz
$ cd slpkg-3.0.9
$ ./install.sh
Installed as Slackware package
@ -111,9 +111,9 @@ Using pip:
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

View file

@ -48,3 +48,9 @@ can not be calculated, good is the report these problems.
Slackware ARM repositories:
---------------------------
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'
Total 62 packages upgraded and kernel, after auto-install 'lilo' reinstall successfully so.
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.
#
#
# Last Updated: Tue Jan 26 06:47:01 UTC 2016
# Last Updated: Thu Feb 4 12:47:01 UTC 2016
#
# 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 sys
import gzip
import time
import shutil
from slpkg.md5sum import md5
from slpkg.__metadata__ import MetaData as _meta_
@ -45,6 +46,12 @@ OPTIONAL_REQUIREMENTS = [
# Non-Python/non-PyPI optional dependencies:
# 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(
name="slpkg",

View file

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

View file

@ -51,7 +51,8 @@ class Download(object):
dwn_count = 1
self._directory_prefix()
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()
print("\n[{0}/{1}][ {2}Download{3} ] --> {4}\n".format(
dwn_count, len(self.url), self.meta.color["GREEN"],

View file

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

View file

@ -82,7 +82,8 @@ class BuildPackage(object):
# fix build sources with spaces
src = src.replace("%20", " ")
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)
# change permissions
subprocess.call("chmod +x {0}.SlackBuild".format(self.prgnam),

View file

@ -447,12 +447,10 @@ class PackageManager(object):
index, page, pkg_list = 0, row, []
r = self.list_lib(repo)
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("")
for pkg in sorted(pkg_list):
package = pkg
if name and repo != "sbo":
pkg = split_package(pkg)[0]
pkg = self._splitting_packages(pkg, repo, name)
if INDEX:
index += 1
pkg = self.list_color_tag(pkg)
@ -475,7 +473,7 @@ class PackageManager(object):
pkg,
self.meta.color["ENDC"]))
else:
if package[:-4] in all_installed_names:
if pkg in all_installed_names:
print("{0}{1}{2}".format(self.meta.color["GREEN"],
pkg,
self.meta.color["ENDC"]))
@ -486,6 +484,15 @@ class PackageManager(object):
print("") # new line at exit
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):
"""Grep packages
"""
@ -532,7 +539,7 @@ class PackageManager(object):
self.meta.color["ENDC"])
return pkg
def list_of_installed(self, repo):
def list_of_installed(self, repo, name):
"""Return installed packages
"""
all_installed_names = []
@ -541,6 +548,9 @@ class PackageManager(object):
if repo == "sbo" and inst.endswith("_SBo"):
name = split_package(inst)[0]
all_installed_names.append(name)
else:
if name:
all_installed_names.append(split_package(inst)[0])
else:
all_installed_names.append(inst)
return all_installed_names