From 2afcf0ed860696fe9d30753f5b1911588a8db9b6 Mon Sep 17 00:00:00 2001 From: dslackw Date: Mon, 19 May 2014 21:09:49 +0300 Subject: [PATCH] updated for version 1.2.5 --- CHANGELOG | 5 +++++ PKG-INFO | 2 +- README.rst | 2 +- bin/slpkg | 31 ++++++++++++++++++------------- setup.py | 2 +- 5 files changed, 26 insertions(+), 16 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 3073e33a..f0866b2f 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,8 @@ +19-05-2014 +Version 1.2.5 + +[Updated] - Fix download source x86_64 arcitecture + 19-05-2014 Version 1.2.4 diff --git a/PKG-INFO b/PKG-INFO index 7b114843..68e1f5f1 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: slpkg -Version: 1.2.4 +Version: 1.2.5 Author: dslackw Author-email: d zlatanidis at gmail com Maintainer: dslackw diff --git a/README.rst b/README.rst index e2ffd132..637d3547 100644 --- a/README.rst +++ b/README.rst @@ -17,7 +17,7 @@ build, upgrade, remove, find and view Slackware packages contents. It's a quick and easy way to manage your packages in slackware to a command. -Note: The software is in progress... +[CHANGELOG] : https://github.com/dslackw/slpkg/blob/master/CHANGELOG Installation ------------ diff --git a/bin/slpkg b/bin/slpkg index b17fe45d..96f29928 100755 --- a/bin/slpkg +++ b/bin/slpkg @@ -16,7 +16,7 @@ import argparse import subprocess __author__ = "dslackw" -__version__ = "1.2.4" +__version__ = "1.2.5" __license__ = "GNU General Public License v3 (GPLv3)" __email__ = "d.zlatanidis@gmail.com" @@ -71,10 +71,10 @@ def rmv_unused(name): # this fuction return if the package exist def find_package(find_pkg): results = [] - for file in os.listdir(packages): if file.startswith(find_pkg): results.append(file) + return results @@ -131,30 +131,35 @@ def sbo_slackbuild_dwn(sbo_url, name): def sbo_source_dwn(sbo_url, name): sbo_url = sbo_url + name + ".info" sbo_url = sbo_url.replace("repository", "slackbuilds") - + read_info = url_read(sbo_url) # read lines from .info files grep download line and return source link if arch == "x86_64": - for line in url_read(sbo_url).splitlines(): + for line in read_info.splitlines(): if line.startswith('DOWNLOAD_x86_64='): - line = line[17:-1] + arch_x86_64_len = len(line) + if arch_x86_64_len > 18: + line = line[17:-1] - return line - + return line + else: + for line in read_info.splitlines(): + if line.startswith('DOWNLOAD='): + line = line[10:-1] + + return line if arch != "x86_64": - for line in url_read(sbo_url).splitlines(): - if line.startswith('DOWNLOAD='): - line = line[10:-1] + for line in read_info.splitlines(): + if line.startswith('DOWNLOAD='): + line = line[10:-1] - return line + return line # find extra source downloads def sbo_extra_dwn(sbo_url, name): sbo_url = sbo_url + name + ".info" sbo_url = sbo_url.replace("repository", "slackbuilds") - results = [] - # read lines from .info files remove gaps and return lines to start `http` for line in url_read(sbo_url).splitlines(): if line.startswith(' '): diff --git a/setup.py b/setup.py index 65168b81..1cffbe31 100644 --- a/setup.py +++ b/setup.py @@ -7,7 +7,7 @@ from distutils.core import setup setup( name = 'slpkg', - version = "1.2.4", + version = "1.2.5", description = "Python tool to manage Slackware packages", keywords = ["slackware", "slpkg", "upgrade", "install", "remove", "view", "slackpkg", "tool"],