From 66e26daf6c500c8214f927c4883cc5e93ad0d37c Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Tue, 23 Sep 2014 23:00:07 +0300 Subject: [PATCH] updated for version 1.8.9 --- CHANGELOG | 10 ++++++- PKG-INFO | 2 +- README.rst | 51 +++++++++++++++++++++++++----------- install.sh | 2 +- man/slpkg.8 | 1 + setup.py | 0 slackbuild/slpkg.SlackBuild | 2 +- slackbuild/slpkg.info | 4 +-- slpkg/functions.py | 2 +- slpkg/main.py | 4 +-- slpkg/pkg/manager.py | 20 +++++++------- slpkg/sbo/download.py | 2 +- slpkg/sbo/search.py | 2 +- slpkg/sbo/slackbuild.py | 16 +++++------ slpkg/slack/install.py | 2 +- slpkg/slack/slack_version.py | 2 +- 16 files changed, 76 insertions(+), 46 deletions(-) mode change 100644 => 100755 setup.py diff --git a/CHANGELOG b/CHANGELOG index bc5d3e5d..8230d391 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,13 @@ +Version 1.8.9 +23-09-2014 + +[Feature] - Added short description + - Added view matching packages from SBo repostirory + +[Updated] - Update open-close files as SLACKBUILDS.TXT + Version 1.8.8 -22-08-2014 +22-09-2014 [Updated] - Fix Alignment viewing packages - Fix build time diff --git a/PKG-INFO b/PKG-INFO index 348663d4..644a98e8 100644 --- a/PKG-INFO +++ b/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: slpkg -Version: 1.8.8 +Version: 1.8.9 Author: dslackw Author-email: d zlatanidis at gmail com Maintainer: dslackw diff --git a/README.rst b/README.rst index 89ea1c85..38f98152 100644 --- a/README.rst +++ b/README.rst @@ -7,9 +7,9 @@ Latest Release: -- Version: 1.8.8 +- Version: 1.8.9 - `Package `_ -- `Source `_ +- `Source `_ - `CHANGELOG `_ .. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/logo.png @@ -88,7 +88,7 @@ Tutorial -------- .. image:: https://raw.githubusercontent.com/dslackw/images/master/slpkg/screenshot-1.png - :target: https://asciinema.org/a/12082 + :target: https://asciinema.org/a/12340 Installation @@ -98,8 +98,8 @@ Untar the archive and run install.sh script: .. code-block:: bash - $ tar xvf slpkg-1.8.8.tar.gz - $ cd slpkg-1.8.8 + $ tar xvf slpkg-1.8.9.tar.gz + $ cd slpkg-1.8.9 $ ./install.sh Using `pip `_ : @@ -158,7 +158,7 @@ build and install with all dependencies : .. code-block:: bash $ slpkg -s sbo brasero - Building dependency tree...... Done + Reading package lists ......Done The following packages will be automatically installed or upgraded with new version: @@ -183,6 +183,27 @@ build and install with all dependencies : Do you want to continue [Y/n]? y + + $ slpkg -s sbo fmpeg + Reading package lists ....Done + + Packages with name matching [ fmpeg ] + + +============================================================================== + | Package Version Arch Repository + +============================================================================== + Matching: + ffmpegthumbnailer 2.0.8 x86_64 SBo + ffmpeg 2.1.5 x86_64 SBo + ffmpeg2theora 0.29 x86_64 SBo + gst-ffmpeg 0.10.13 x86_64 SBo + + Installing summary + =============================================================================== + Total found 4 matching packages. + 0 installed package and 4 uninstalled packages. + + Find packages from `Slackware official mirrors `_ download and install: @@ -191,16 +212,15 @@ download and install: $ slpkg -s slack mozilla Packages with name matching [ mozilla ] - - Reading package lists.............................. Done + Reading package lists ..............................Done +============================================================================== | Package Version Arch Build Repos Size +============================================================================== Installing: - mozilla-firefox 24.1.0esr x86_64 1 Slack 23524 K - mozilla-nss 3.15.2 x86_64 2 Slack 1592 K - mozilla-thunderbird 24.1.0 x86_64 1 Slack 24208 K + mozilla-firefox 24.1.0esr x86_64 1 Slack 23524 K + mozilla-nss 3.15.2 x86_64 2 Slack 1592 K + mozilla-thunderbird 24.1.0 x86_64 1 Slack 24208 K Installing summary =============================================================================== @@ -217,7 +237,7 @@ and also displays installed packages: .. code-block:: bash $ slpkg -t brasero - Reading package lists...... Done + Reading package lists ......Done +========================= | brasero dependencies : @@ -240,7 +260,7 @@ Check if your packages is up to date from slackbuilds.org: .. code-block:: bash $ slpkg -c sbo upgrade - Reading package lists. Done + Reading package lists ...Done These packages need upgrading: @@ -269,7 +289,7 @@ Check if your distribution is up to date from `Slackware official mirrors .. code-block:: bash $ slpkg -c slack upgrade - Reading package lists....... Done + Reading package lists .......Done These packages need upgrading: @@ -294,11 +314,12 @@ Find packages from slackbuilds.org: .. code-block:: bash $ slpkg -n bitfighter - Reading package lists. Done + Reading package lists ...Done +=============================================================================== | Package bitfighter --> http://slackbuilds.org/repository/14.1/games/bitfighter/ +=============================================================================== + | Description : multi-player combat game | SlackBuild : bitfighter.tar.gz | Sources : bitfighter-019c.tar.gz, classic_level_pack.zip | Requirements : OpenAL, SDL2, speex, libmodplug diff --git a/install.sh b/install.sh index 3f96d4e0..9a1da44b 100755 --- a/install.sh +++ b/install.sh @@ -21,7 +21,7 @@ # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. PRGNAM=slpkg -VERSION=${VERSION:-1.8.8} +VERSION=${VERSION:-1.8.9} TAG=${TAG:-_dsw} cd .. diff --git a/man/slpkg.8 b/man/slpkg.8 index aca962a1..56587f7e 100644 --- a/man/slpkg.8 +++ b/man/slpkg.8 @@ -229,6 +229,7 @@ $ \fBslpkg -n termcolor\fP +============================================================================== | Package termcolor --> http://slackbuilds.org/repository/14.1/python/termcolor/ +============================================================================== + | Description : ANSII Color formatting for output in terminal | SlackBuild : termcolor.tar.gz | Source : termcolor-1.1.0.tar.gz | Requirements : diff --git a/setup.py b/setup.py old mode 100644 new mode 100755 diff --git a/slackbuild/slpkg.SlackBuild b/slackbuild/slpkg.SlackBuild index 3dabfa95..dc346683 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.8} +VERSION=${VERSION:-1.8.9} BUILD=${BUILD:-1} TAG=${TAG:-_dsw} diff --git a/slackbuild/slpkg.info b/slackbuild/slpkg.info index d8284cb4..48c5ab3b 100644 --- a/slackbuild/slpkg.info +++ b/slackbuild/slpkg.info @@ -1,7 +1,7 @@ PRGNAM="slpkg" -VERSION="1.8.8" +VERSION="1.8.9" HOMEPAGE="https://github.com/dslackw/slpkg" -DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.8.tar.gz" +DOWNLOAD="https://github.com/dslackw/slpkg/archive/v1.8.9.tar.gz" MD5SUM="" DOWNLOAD_x86_64="" MD5SUM_x86_64="" diff --git a/slpkg/functions.py b/slpkg/functions.py index 99bee232..a46e2b43 100755 --- a/slpkg/functions.py +++ b/slpkg/functions.py @@ -34,4 +34,4 @@ def get_file(link, char): results.append(link[i]) if link[i] == char: break - return "".join(results[::-1]).replace("/", "").strip() + return ("".join(results[::-1]).replace("/", "").strip()) diff --git a/slpkg/main.py b/slpkg/main.py index cd6075cd..034fa5ec 100755 --- a/slpkg/main.py +++ b/slpkg/main.py @@ -107,7 +107,7 @@ def main(): if args.verbose: prog_version() if args.a: - s_user(getpass.getuser()) + s_user(getpass.getuser()) build_package(args.a[0], args.a[1:], path) if args.l: pkg_list(args.l) @@ -180,7 +180,7 @@ def main(): s_user(getpass.getuser()) pkg_upgrade(args.u) if args.o: - s_user(getpass.getuser()) + s_user(getpass.getuser()) pkg_reinstall(args.o) if args.r: s_user(getpass.getuser()) diff --git a/slpkg/pkg/manager.py b/slpkg/pkg/manager.py index fa70b93a..72b46e7a 100755 --- a/slpkg/pkg/manager.py +++ b/slpkg/pkg/manager.py @@ -37,7 +37,7 @@ def pkg_install(binary): ''' for pkg in binary: try: - print subprocess.check_output("installpkg {0}".format(pkg), shell=True) + print(subprocess.check_output("installpkg {0}".format(pkg), shell=True)) except subprocess.CalledProcessError: message = "Can't install" if len(binary) > 1: @@ -52,8 +52,8 @@ def pkg_upgrade(binary): ''' for pkg in binary: try: - print subprocess.check_output("upgradepkg --install-new {0}".format(pkg), - shell=True) + print(subprocess.check_output("upgradepkg --install-new {0}".format(pkg), + shell=True)) except subprocess.CalledProcessError: message = "Can't upgrade" if len(binary) > 1: @@ -68,8 +68,8 @@ def pkg_reinstall(binary): ''' for pkg in binary: try: - print subprocess.check_output("upgradepkg --reinstall {0}".format(pkg), - shell=True) + print(subprocess.check_output("upgradepkg --reinstall {0}".format(pkg), + shell=True)) except subprocess.CalledProcessError: message = "Can't reinstall" if len(binary) > 1: @@ -134,19 +134,19 @@ def pkg_remove(binary): if remove_dep == "y" or remove_dep == "Y": for dep in dependencies: if find_package(dep + sp, pkg_path): - print subprocess.check_output("removepkg {0}".format(dep), shell=True) + print(subprocess.check_output("removepkg {0}".format(dep), shell=True)) rmv_list.append(dep) os.remove(dep_path + rmv) rmv_dependencies += dependencies[:-1] else: if find_package(rmv + sp, pkg_path): - print subprocess.check_output("removepkg {0}".format(rmv), shell=True) + print(subprocess.check_output("removepkg {0}".format(rmv), shell=True)) rmv_list.append(rmv) f.close() os.remove(dep_path + rmv) else: if find_package(rmv + sp, pkg_path): - print subprocess.check_output("removepkg {0}".format(rmv), shell=True) + print(subprocess.check_output("removepkg {0}".format(rmv), shell=True)) rmv_list.append(rmv) # Prints all removed packages if len(rmv_list) > 1: @@ -200,8 +200,8 @@ def pkg_display(binary): ''' for pkg in binary: if find_package(pkg + sp, pkg_path): - print subprocess.check_output("cat {0}{1}".format(pkg_path, - " /var/log/packages/".join(find_package(pkg +sp, pkg_path))), shell=True) + print(subprocess.check_output("cat {0}{1}".format(pkg_path, + " /var/log/packages/".join(find_package(pkg +sp, pkg_path))), shell=True)) else: message = "Can't dislpay" if len(binary) > 1: diff --git a/slpkg/sbo/download.py b/slpkg/sbo/download.py index ddd24cd0..91517900 100755 --- a/slpkg/sbo/download.py +++ b/slpkg/sbo/download.py @@ -25,4 +25,4 @@ def sbo_slackbuild_dwn(sbo_url): ''' Create download slackbuild tar.gz archive ''' - return sbo_url[:-1] + ".tar.gz" + return (sbo_url[:-1] + ".tar.gz") diff --git a/slpkg/sbo/search.py b/slpkg/sbo/search.py index 92b7991f..f02c60af 100755 --- a/slpkg/sbo/search.py +++ b/slpkg/sbo/search.py @@ -41,7 +41,7 @@ def sbo_search_pkg(name): if line.startswith("SLACKBUILD LOCATION"): if name == get_file(line[23:].strip(), "/").replace("\n", ""): SLACKBUILDS_TXT.close() - return sbo_url + line[23:].strip() + "/" + return (sbo_url + line[23:].strip() + "/") except KeyboardInterrupt: print # new line at exit sys.exit() diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index bc201176..cb475b1d 100755 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -127,11 +127,10 @@ def sbo_build(name): elif "UNTESTED" in dep_arch: ARCH_COLOR = colors.YELLOW sbo_packages_view(DEP_COLOR, dep, ver, ARCH_COLOR, dep_arch) - msg_ins = "package" - msg_upg = msg_ins + msg_upg = msg_ins = "package" if count_installed > 1: msg_ins = msg_ins + "s" - if msg_upg > 1: + if count_upgraded > 1: msg_upg = msg_upg + "s" print("\nInstalling summary") print("=" * 79) @@ -144,11 +143,12 @@ def sbo_build(name): UNST = ["UNSUPPORTED", "UNTESTED"] if src in UNST: print("\n{0}The package {1}{2}\n".format(colors.RED, src, ENDC)) - sys.exit() + read = "" # exit if all packages already installed - if pkg_sum == len(dependencies): - sys.exit() - read = raw_input("Do you want to continue [Y/n]? ") + elif pkg_sum == len(dependencies): + read = "" + else: + read = raw_input("Do you want to continue [Y/n]? ") if read == "Y" or read == "y": if not os.path.exists(build_path): os.mkdir(build_path) @@ -269,7 +269,7 @@ def sbo_build(name): ins_msg = ins_msg + "s" if uns > 1: uns_msg = uns_msg + "s" - print("\nMatching summary") + print("\nInstalling summary") print("=" * 79) print("{0}Total found {1} matching {2}.".format( GREY, len(sbo_matching), total_msg)) diff --git a/slpkg/slack/install.py b/slpkg/slack/install.py index b1823225..eeb92230 100755 --- a/slpkg/slack/install.py +++ b/slpkg/slack/install.py @@ -49,7 +49,7 @@ def install(slack_pkg): package_location = ([] for i in range(9)) GREEN, GREY, ENDC = colors.GREEN, colors.GREY, colors.ENDC arch = COLOR = str() - # create directories if not exist + # create directories if not exists tmp_path = slpkg_tmp + "packages/" if not os.path.exists(slpkg_tmp): os.mkdir(slpkg_tmp) diff --git a/slpkg/slack/slack_version.py b/slpkg/slack/slack_version.py index 85220c1b..588ad04a 100755 --- a/slpkg/slack/slack_version.py +++ b/slpkg/slack/slack_version.py @@ -30,4 +30,4 @@ def slack_ver(): with open("/etc/slackware-version", "r") as f: sv = f.read() f.close() - return ".".join(re.findall(r"\d+", sv)) + return (".".join(re.findall(r"\d+", sv)))