From aa7582798baf90d5f2eef793cda2ea91006b68d3 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Fri, 5 Sep 2014 06:20:59 +0300 Subject: [PATCH] prepare for ver 1.8.1 --- CHANGELOG | 7 +++++++ INSTALL | 4 +++- PKG-INFO | 2 +- README.rst | 6 +++--- THANKS | 4 ++++ install.sh | 2 +- man/slpkg.8 | 42 +++++++++++++++++++------------------ slackbuild/slpkg.SlackBuild | 2 +- slackbuild/slpkg.info | 4 ++-- slpkg/__metadata__.py | 15 +------------ slpkg/pkg/manager.py | 2 -- slpkg/sbo/check.py | 3 ++- slpkg/sbo/slackbuild.py | 15 +++++++++++-- slpkg/sbo/views.py | 16 ++++++++++++++ slpkg/slack/install.py | 14 ++++++------- slpkg/slack/patches.py | 6 +++--- 16 files changed, 85 insertions(+), 59 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index fc6ee90b..4aa8e239 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,10 @@ +Version 1.8.1 +04-09-2014 + +[Updated] - Fix install.sh script to install wget download tar.gz + archive file. + Fix install packages like adobe-reader + Version 1.8.0 02-09-2014 diff --git a/INSTALL b/INSTALL index 1f89fe6c..0310ac0c 100644 --- a/INSTALL +++ b/INSTALL @@ -35,12 +35,14 @@ There are mainly five ways: `pip install slpkg` or upgrade `pip install --upgrade slpkg` -4) Download slpkg package from slackbuilds.org and run the first procedure described above. +4) Download slpkg package from slackbuilds.org and run the second procedure described above. 5) Download binary package from sourceforge: https://sourceforge.net/projects/slpkg/ + and use Slackware command `upgradepkg --install-new ` + Proposed mode if you want to have installed the most updated version is 1 or 2 and 3 process. diff --git a/PKG-INFO b/PKG-INFO index 07577f88..41134e90 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: slpkg -Version: 1.8.0 +Version: 1.8.1 Author: dslackw Author-email: d zlatanidis at gmail com Maintainer: dslackw diff --git a/README.rst b/README.rst index 454636c7..98eef26e 100644 --- a/README.rst +++ b/README.rst @@ -7,7 +7,7 @@ .. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png :target: https://github.com/dslackw/slpkg -slpkg 1.8.0 +slpkg 1.8.1 =========== `Slpkg `_ is a terminal multitool in order to easy use `Slackware `_ @@ -87,8 +87,8 @@ Untar the archive and run install.sh script: .. code-block:: bash - $ tar xvf slpkg-1.8.0.tar.gz - $ cd slpkg-1.8.0 + $ tar xvf slpkg-1.8.1.tar.gz + $ cd slpkg-1.8.1 $ ./install.sh Using `pip `_ : diff --git a/THANKS b/THANKS index 58419fde..7c013738 100644 --- a/THANKS +++ b/THANKS @@ -8,3 +8,7 @@ Willy Sudiarto Raharjo - https://github.com/willysr For the interesting and valuable advice around the systems of Slackware and SBo packages. + +LinuxQuestions.org - http://www.linuxquestions.org + + In all members of the community of Slackware forum linuxquestions.org. diff --git a/install.sh b/install.sh index f453a044..4ce48a12 100755 --- a/install.sh +++ b/install.sh @@ -21,7 +21,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=slpkg -VERSION=${VERSION:-1.8.0} +VERSION=${VERSION:-1.8.1} TAG=${TAG:-_dsw} cd .. diff --git a/man/slpkg.8 b/man/slpkg.8 index 66b2a160..3fc08074 100644 --- a/man/slpkg.8 +++ b/man/slpkg.8 @@ -62,6 +62,17 @@ Support .tar.gz and .tar.bz2 slackbuilds archives. .PP Four display options list, sbo, slack, noarch and all packages items that are installed on the system. +.SS -c , sbo, slack [sbo, slack ...] check if your packages is up to date +\fBslpkg\fP \fB-c\fP <\fIsbo\fP> <\fIslack\fP> <\fIupgrade\fP> +.PP +Check your packages from Slackware official mirrors or from +slackbuilds.org is up to date. +.SS -s , sbo, slack [sbo, slack ...] download, build and install package with all dependencies +\fBslpkg\fP \fB-s\fP <\fIsbo\fP> <\fIslack\fP> <\fIname of package\fP> +.PP +Installs packages from the repository slackbuilds.org automatically resolving all +dependencies of the package. Also installs the official distribution Slackware +packages. .SS -t , tracking dependencies \fBslpkg\fP \fB-t\fP <\fIname of package\fP> .PP @@ -72,18 +83,6 @@ The sequence shown is that you must follow to correctly install package. .PP With this method you can find the SBo script that interests you through the network. (www.slackbuilds.org) -.SS -c , sbo, slack [sbo, slack ...] check if your packages is up to date -\fBslpkg\fP \fB-c\fP <\fIsbo\fP> <\fIslack\fP> <\fIupgrade\fP> -.PP -Check your packages from Slackware official mirrors or from -slackbuilds.org is up to date. -.SS -s , sbo, slack [sbo, slack ...] download, build and install package with all dependencies -\fBslpkg\fP \fB-s\fP <\fIsbo\fP> <\fIslack\fP> <\fIname of package\fP> -.PP -Find package from slackbuild.org with all dependencies, -download, build and install them if not installed or new version is -available. Even download and install official packages from Slackware -official mirrors and install or reinstall if already installed. .SS -i , install binary package \fBslpkg\fP \fB-i\fP <\fIpackages.t?z\fP> .PP @@ -152,18 +151,21 @@ $ \fBslpkg -t brasero\fP $ \fBslpkg -s sbo brasero\fP Building dependency tree...... Done - The following packages will be automatically installed or upgraded with new version: + + The following packages will be automatically installed or upgraded + with new version: + +============================================================================== - | Package Version Arch Repository + | Package Version Arch Repository +============================================================================== Installing: - brasero 3.11.3 x86_64 SBo + brasero 3.11.3 x86_64 SBo Installing for dependencies: - orc 0.4.19 x86_64 SBo - gstreamer1 1.2.2 x86_64 SBo - gst1-plugins-base 1.2.2 x86_64 SBo - gst1-plugins-bad 1.2.2 x86_64 SBo - libunique 1.1.6 x86_64 SBo + orc 0.4.19 x86_64 SBo + gstreamer1 1.2.2 x86_64 SBo + gst1-plugins-base 1.2.2 x86_64 SBo + gst1-plugins-bad 1.2.2 x86_64 SBo + libunique 1.1.6 x86_64 SBo Installing summary =============================================================================== diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild index 1bdbe759..67d8901f 100755 --- a/slackbuild/slpkg.SlackBuild +++ b/slackbuild/slpkg.SlackBuild @@ -23,7 +23,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=slpkg -VERSION=${VERSION:-1.8.0} +VERSION=${VERSION:-1.8.1} BUILD=${BUILD:-1} TAG=${TAG:-_dsw} diff --git a/slackbuild/slpkg.info b/slackbuild/slpkg.info index a0d9102d..ea5c0543 100644 --- a/slackbuild/slpkg.info +++ b/slackbuild/slpkg.info @@ -1,7 +1,7 @@ PRGNAM="slpkg" -VERSION="1.7.9" +VERSION="1.8.1" HOMEPAGE="https://github.com/dslackw/slpkg" -DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.0.tar.gz" +DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.1.tar.gz" MD5SUM="" DOWNLOAD_x86_64="" MD5SUM_x86_64="" diff --git a/slpkg/__metadata__.py b/slpkg/__metadata__.py index 41a0576d..587df90f 100644 --- a/slpkg/__metadata__.py +++ b/slpkg/__metadata__.py @@ -26,7 +26,7 @@ import subprocess __all__ = "slpkg" __author__ = "dslackw" -__version_info__ = (1, 8, 0) +__version_info__ = (1, 8, 1) __version__ = "{0}.{1}.{2}".format(*__version_info__) __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" @@ -56,18 +56,6 @@ pkg_path = "/var/log/packages/" ''' computer architecture ''' arch = os.uname()[4] -''' slackbuild fietype binary packages ''' -if arch == "x86_64": - sbo_arch = "-x86_64-" -elif arch.startswith("i") and arch.endswith("86"): - sbo_arch = "-i486-" -elif "arm" in arch: - sbo_arch = "-arm-" - -build = "*" -sbo_tag = "_SBo" -sbo_filetype = ".tgz" - ''' Slackware architectures ''' slack_archs = [ "-noarch-", @@ -78,4 +66,3 @@ slack_archs = [ "-x86-", "-fw-" ] - diff --git a/slpkg/pkg/manager.py b/slpkg/pkg/manager.py index 1ba9a5de..7f9ec8af 100755 --- a/slpkg/pkg/manager.py +++ b/slpkg/pkg/manager.py @@ -25,8 +25,6 @@ import os import sys import subprocess -from collections import OrderedDict - from colors import colors from messages import pkg_not_found, template from __metadata__ import pkg_path, sp, log_path diff --git a/slpkg/sbo/check.py b/slpkg/sbo/check.py index 92fb77e0..311ec704 100755 --- a/slpkg/sbo/check.py +++ b/slpkg/sbo/check.py @@ -138,7 +138,8 @@ def sbo_check(): for pkg, upg, ver in zip(pkg_for_upg, upg_name, upg_ver): upgraded = ("{0}-{1}".format(upg, ver)) if find_package(upgraded, pkg_path): - print("| Package {0} upgraded with new package {1}-{2}".format(pkg, upg, ver)) + print("| Package {0} upgraded with new package {1}-{2}".format( + pkg, upg, ver)) template(78) else: print("\nTotal {0} SBo packages are up to date:\n".format(len(sbo_list))) diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index 2ec324c6..d4f5932d 100755 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -101,6 +101,7 @@ def sbo_build(name): sbo_pkg = ("{0}-{1}".format(pkg, version)) if find_package(sbo_pkg, pkg_path): pkg_sum += 1 + sys.stdout.write("Done\n") ''' Tag with color green if package already installed @@ -154,6 +155,16 @@ def sbo_build(name): print("Total {0} {1}.".format(len(dependencies), msg_pkg)) print("{0} {1} will be installed, {2} allready installed.".format( (len(dependencies) - pkg_sum), msg_2_pkg, pkg_sum)) + ''' + Check if package supported by arch + before proceed to install + ''' + UNST = ["UNSUPPORTED", "UNTESTED"] + for item in UNST: + for un in pkg_arch: + if item == un: + print("\n{0}The package {1}{2}\n".format(colors.RED, item, ENDC)) + sys.exit() read = raw_input("\nDo you want to continue [Y/n]? ") if read == "Y" or read == "y": if not os.path.exists(build_path): @@ -168,7 +179,7 @@ def sbo_build(name): sbo_link = sbo_slackbuild_dwn(sbo_url) src_link = sbo_source_dwn(pkg).split() script = get_file(sbo_link, "/") - print("\n{0}Start -->{1} {2}\n".format(colors.GREEN, colors.ENDC, pkg)) + print("\n{0}Start -->{1} {2}\n".format(colors.GREEN, ENDC, pkg)) subprocess.call("wget -N {0}".format(sbo_link), shell=True) sources = [] for src in src_link: @@ -176,7 +187,7 @@ def sbo_build(name): sources.append(get_file(src, "/")) build_package(script, sources, build_path) print("{0}[ Installing ] --> {1}{2}".format( - colors.GREEN, colors.ENDC, pkg)) + colors.GREEN, ENDC, pkg)) ''' Searches the package name and version in /tmp to install. If find two or more packages e.g. to build tag diff --git a/slpkg/sbo/views.py b/slpkg/sbo/views.py index 76b78652..98e0b135 100755 --- a/slpkg/sbo/views.py +++ b/slpkg/sbo/views.py @@ -58,6 +58,16 @@ def sbo_network(name): view_sbo(name, sbo_url, get_file(sbo_dwn, "/"), \ ", ".join([get_file(src, "/") for src in source_dwn]), \ sbo_req) + ''' + Check if package supported by arch + before proceed to install + ''' + FAULT = "" + UNST = ["UNSUPPORTED", "UNTESTED"] + for item in UNST: + for un in source_dwn: + if item == un: + FAULT = item while True: try: read = raw_input("_ ") @@ -87,6 +97,9 @@ def sbo_network(name): subprocess.call("less {0}{1}{2}".format(rdm_path, name, site), shell=True) os.remove("{0}{1}{2}".format(rdm_path, name, site)) elif read == "B" or read == "b": + if FAULT: + print("\n{0}The package {1}{2}\n".format(colors.RED, FAULT, colors.ENDC)) + sys.exit() if not os.path.exists(build_path): os.mkdir(build_path) sources = [] @@ -101,6 +114,9 @@ def sbo_network(name): print("Complete!\n") break elif read == "I" or read == "i": + if FAULT: + print("\n{0}The package {1}{2}\n".format(colors.RED, FAULT, colors.ENDC)) + sys.exit() if not os.path.exists(build_path): os.mkdir(build_path) sbo_version = sbo_version_pkg(name) diff --git a/slpkg/slack/install.py b/slpkg/slack/install.py index bfcb54ed..9c15d878 100755 --- a/slpkg/slack/install.py +++ b/slpkg/slack/install.py @@ -120,20 +120,20 @@ def install(slack_pkg): (len(install_all) - pkg_sum), msg_2_pkg, pkg_sum)) print("Need to get {0} {1} of archives.".format(compressed, comp_unit)) print("After this process, {0} {1} of additional disk space will be used.".format( - uncompressed, uncomp_unit)) + uncompressed, uncomp_unit)) read = raw_input("\nWould you like to install [Y/n]? ") if read == "Y" or read == "y": for dwn in dwn_list: subprocess.call("wget -N --directory-prefix={0} {1} {2}.asc".format( - tmp_path, dwn, dwn), shell=True) + tmp_path, dwn, dwn), shell=True) for install in install_all: if not os.path.isfile(pkg_path + install[:-4]): print("{0}[ installing ] --> {1}{2}".format( - colors.GREEN, ENDC, install)) + colors.GREEN, ENDC, install)) pkg_upgrade((tmp_path + install).split()) else: print("{0}[ reinstalling ] --> {1}{2}".format( - colors.GREEN, ENDC, install)) + colors.GREEN, ENDC, install)) pkg_reinstall((tmp_path + install).split()) print("Completed!\n") read = raw_input("Removal downloaded packages [Y/n]? ") @@ -144,11 +144,9 @@ def install(slack_pkg): if os.listdir(tmp_path) == []: print("Packages removed") else: - print("\nThere are packages in directory {0}\n".format( - tmp_path)) + print("\nThere are packages in directory {0}\n".format(tmp_path)) else: - print("\nThere are packages in directory {0}\n".format( - tmp_path)) + print("\nThere are packages in directory {0}\n".format(tmp_path)) else: message = "No matching" pkg_not_found("", slack_pkg, message, "\n") diff --git a/slpkg/slack/patches.py b/slpkg/slack/patches.py index d9a28777..43205525 100755 --- a/slpkg/slack/patches.py +++ b/slpkg/slack/patches.py @@ -115,12 +115,12 @@ def patches(): print("Total {0} {1} will be upgraded.".format(len(upgrade_all), msg_pkg)) print("Need to get {0} {1} of archives.".format(compressed, comp_unit)) print("After this process, {0} {1} of additional disk space will be used.".format( - uncompressed, uncomp_unit)) + uncompressed, uncomp_unit)) read = raw_input("\nWould you like to upgrade [Y/n]? ") if read == "Y" or read == "y": for dwn in dwn_patches: subprocess.call("wget -N --directory-prefix={0} {1} {2}.asc".format( - patch_path, dwn, dwn), shell=True) + patch_path, dwn, dwn), shell=True) for pkg in upgrade_all: print("{0}[ upgrading ] --> {1}{2}".format(GREEN, ENDC, pkg[:-4])) pkg_upgrade((patch_path + pkg).split()) @@ -145,7 +145,7 @@ def patches(): if os.uname()[4] == "x86_64": slack_arch = 64 print("\nSlackware{0} v{1} distribution is up to date\n".format( - slack_arch, slack_ver())) + slack_arch, slack_ver())) except KeyboardInterrupt: print # new line at exit sys.exit()