From fd426d6ea94eda755703afade5558f5405629a44 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 4 Feb 2016 05:53:13 +0200 Subject: [PATCH 1/8] Fixed: List only shows updated applications? #58 --- slpkg/pkg/manager.py | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/slpkg/pkg/manager.py b/slpkg/pkg/manager.py index dd29c0e3..244496f7 100644 --- a/slpkg/pkg/manager.py +++ b/slpkg/pkg/manager.py @@ -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 = [] @@ -542,7 +549,10 @@ class PackageManager(object): name = split_package(inst)[0] all_installed_names.append(name) 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 From 5d43531634e0636f575ebb02f17b6923dbfbf024 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 4 Feb 2016 13:28:49 +0200 Subject: [PATCH 2/8] Updated for repositories issues --- REPOSITORIES | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/REPOSITORIES b/REPOSITORIES index e0e52863..1511506e 100644 --- a/REPOSITORIES +++ b/REPOSITORIES @@ -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. From e63b6a2ad6b26109b107f799ea85a38d606a64df Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 4 Feb 2016 14:55:28 +0200 Subject: [PATCH 3/8] Updated for upgrading Slackware 14.2 beta 2 --- TESTING | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/TESTING b/TESTING index 951bb7b0..f6c449ef 100644 --- a/TESTING +++ b/TESTING @@ -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 From 7c3b1c8935904c914cf164aa1df3f8e0bce03825 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 4 Feb 2016 14:59:06 +0200 Subject: [PATCH 4/8] Updated for version 3.0.9 --- ChangeLog.txt | 4 ++++ README.rst | 10 +++++----- slpkg/__metadata__.py | 2 +- 3 files changed, 10 insertions(+), 6 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 96068cfc..a3435f38 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,3 +1,7 @@ +3.0.9 - 04/01/2016 +Fixed: +- Listed installed packages from repositories with the name only #58 + 3.0.8 - 29/01/2016 Added: - Flag "--name" in option list to show only package name diff --git a/README.rst b/README.rst index 9e820a75..bc3c5a60 100644 --- a/README.rst +++ b/README.rst @@ -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 `_ +Slackware: `slpkg-3.0.9-i486-1_dsw.txz `_ -Slackware64: `slpkg-3.0.8-x86_64-1_dsw.txz `_ +Slackware64: `slpkg-3.0.9-x86_64-1_dsw.txz `_ Optional dependencies diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index 2eeed8f8..63590627 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -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" From 53812b9e9d0e909b76ec60ae96baa8681274d314 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Thu, 4 Feb 2016 15:03:45 +0200 Subject: [PATCH 5/8] Updated for Slackware mirrors --- conf/slackware-mirrors | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/slackware-mirrors b/conf/slackware-mirrors index 1c170dbb..5279732c 100644 --- a/conf/slackware-mirrors +++ b/conf/slackware-mirrors @@ -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: # From ab40ff8daf019fb92e208ca945b7a101b78b53f9 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 9 Feb 2016 03:59:51 +0200 Subject: [PATCH 6/8] Fixed: passing char '+' from sources --- ChangeLog.txt | 3 ++- slpkg/downloader.py | 3 ++- slpkg/md5sum.py | 2 ++ slpkg/pkg/build.py | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index a3435f38..94d09fd6 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -1,6 +1,7 @@ -3.0.9 - 04/01/2016 +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: diff --git a/slpkg/downloader.py b/slpkg/downloader.py index 252170d9..8659de23 100644 --- a/slpkg/downloader.py +++ b/slpkg/downloader.py @@ -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"], diff --git a/slpkg/md5sum.py b/slpkg/md5sum.py index 8372469c..ce4d1c09 100644 --- a/slpkg/md5sum.py +++ b/slpkg/md5sum.py @@ -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() diff --git a/slpkg/pkg/build.py b/slpkg/pkg/build.py index d9518db8..b784814b 100644 --- a/slpkg/pkg/build.py +++ b/slpkg/pkg/build.py @@ -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), From 1c1e732c71bdb0998cc93781f3ce274c7cffdb05 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 9 Feb 2016 19:53:51 +0200 Subject: [PATCH 7/8] Added slpkg logo when setup --- logo.txt | 12 ++++++++++++ setup.py | 7 +++++++ 2 files changed, 19 insertions(+) create mode 100644 logo.txt diff --git a/logo.txt b/logo.txt new file mode 100644 index 00000000..f800c5e1 --- /dev/null +++ b/logo.txt @@ -0,0 +1,12 @@ + + ████████████████████████████████████████████████████████████████ + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ __ ▓▓▓▓▓▓▓▓ __ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▒▒▒▒▒▒▒▒▒▒▒▒▒▒____| |__ ___ | | ______ __▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ + ░░░░░░░░░░░░░/ | | ' \ | | / / ' |░░░░░░░░░░░░░░░░░░ + ░░░░░░░░░░░░/ ___| | __ \| |/ / __ |░░░░░░░░░░░░░░░░░░ + ░░░░░░░░░░░░\ \ | |__) | < (__| |░░░░░░░░░░░░░░░░░░ + ░░░░░░░░░░░░░\____ \ | /| |\ \ |░░░░░░░░░░░░░░░░░░ + | / | .___/ |__| \__\___, | + |____/__| | | | + |__| |_____/ + Slackware package manager diff --git a/setup.py b/setup.py index 638757a1..4ef290c4 100755 --- a/setup.py +++ b/setup.py @@ -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", From c20a2dad1a656a349c86a18dfc954201c9a4c0c6 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 9 Feb 2016 21:49:51 +0200 Subject: [PATCH 8/8] Update logo --- logo.txt | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/logo.txt b/logo.txt index f800c5e1..029a3106 100644 --- a/logo.txt +++ b/logo.txt @@ -1,7 +1,8 @@ ████████████████████████████████████████████████████████████████ - ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ __ ▓▓▓▓▓▓▓▓ __ ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ - ▒▒▒▒▒▒▒▒▒▒▒▒▒▒____| |__ ___ | | ______ __▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ + ▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓ + ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ __ ▒▒▒▒▒▒▒▒ __ ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒ + ░░░░░░░░░░░░░░____| |__ ___ | | ______ __░░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░░/ | | ' \ | | / / ' |░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░/ ___| | __ \| |/ / __ |░░░░░░░░░░░░░░░░░░ ░░░░░░░░░░░░\ \ | |__) | < (__| |░░░░░░░░░░░░░░░░░░ @@ -9,4 +10,5 @@ | / | .___/ |__| \__\___, | |____/__| | | | |__| |_____/ - Slackware package manager + ____________ Slackware package manager _________________________ +