From 46bc75fc467eecb9fdc3d92264c8413b85a77354 Mon Sep 17 00:00:00 2001 From: Dimitris Zlatanidis Date: Sat, 30 Aug 2014 06:08:53 +0300 Subject: [PATCH] update source --- slpkg/sbo/check.py | 7 ++++--- slpkg/sbo/slackbuild.py | 14 ++++++++------ slpkg/sbo/views.py | 7 ++++--- slpkg/slack/install.py | 8 +++++--- slpkg/slack/patches.py | 9 +++++---- 5 files changed, 26 insertions(+), 19 deletions(-) diff --git a/slpkg/sbo/check.py b/slpkg/sbo/check.py index e7cf7734..f0fc7dc5 100755 --- a/slpkg/sbo/check.py +++ b/slpkg/sbo/check.py @@ -50,7 +50,8 @@ def sbo_check(): sys.stdout.flush() initialization() index, toolbar_width = 0, 3 - pkg_name, sbo_ver, pkg_for_upg, sbo_list, pkg_arch = [], [], [], [], [] + pkg_name, sbo_ver, pkg_for_upg = [], [], [] + sbo_list, pkg_arch = [], [] for pkg in os.listdir(pkg_path): if pkg.endswith("_SBo"): sbo_list.append(pkg) @@ -88,8 +89,8 @@ def sbo_check(): template(78) print("Upgrading:") for upg, ver, arch in zip(pkg_for_upg, sbo_ver, pkg_arch): - print " ", upg, " "*(34-len(upg)), ver, " "*( - 16-len(ver)), arch, " "*(11-len(arch)), "SBo" + print " ", upg, " "*(34-len(upg)), ver, \ + " "*(16-len(ver)), arch, " "*(11-len(arch)), "SBo" msg_pkg = "package" if len(pkg_for_upg) > 1: msg_pkg = msg_pkg + "s" diff --git a/slpkg/sbo/slackbuild.py b/slpkg/sbo/slackbuild.py index 4a29e214..cc5fc456 100755 --- a/slpkg/sbo/slackbuild.py +++ b/slpkg/sbo/slackbuild.py @@ -94,14 +94,16 @@ def sbo_build(name): for dep in dependencies[:-1]: sbo_ver = sbo_version_pkg(dep) if find_package(dep + sp, pkg_path): - print " ", colors.GREEN + dep + colors.ENDC, " "*(38-len( - dep)), sbo_ver, " "*(14-len(sbo_ver)), SC + arch + EC, " "*(9-len( - arch)), "SBo" + print " ", colors.GREEN + dep + colors.ENDC, \ + " "*(38-len(dep)), sbo_ver, \ + " "*(14-len(sbo_ver)), SC + arch + EC, \ + " "*(9-len(arch)), "SBo" pkg_sum += 1 else: - print " ", colors.RED + dep + colors.ENDC, " "*(38-len( - dep)), sbo_ver, " "*(14-len(sbo_ver)), SC + arch + EC, " "*(9-len( - arch)), "SBo" + print " ", colors.RED + dep + colors.ENDC, \ + " "*(38-len(dep)), sbo_ver, \ + " "*(14-len(sbo_ver)), SC + arch + EC, \ + " "*(9-len(arch)), "SBo" msg_pkg = "package" msg_2_pkg = msg_pkg if len(dependencies) > 1: diff --git a/slpkg/sbo/views.py b/slpkg/sbo/views.py index a8833052..9bfb5309 100755 --- a/slpkg/sbo/views.py +++ b/slpkg/sbo/views.py @@ -29,7 +29,7 @@ from colors import colors from functions import get_file from messages import pkg_not_found, pkg_found, view_sbo, template from __metadata__ import (tmp, build, sbo_tag, sbo_filetype, build_path, - pkg_path, slpkg_tmp, sp) + pkg_path, slpkg_tmp, sp) from pkg.build import build_package from pkg.find import find_package @@ -56,8 +56,9 @@ def sbo_network(name): sbo_dwn = sbo_slackbuild_dwn(sbo_url) source_dwn = sbo_source_dwn(name).split() sys.stdout.write ("Done\n") - view_sbo(name, sbo_url, get_file(sbo_dwn, "/"), - ", ".join([get_file(src, "/") for src in source_dwn]), sbo_req) + view_sbo(name, sbo_url, get_file(sbo_dwn, "/"), \ + ", ".join([get_file(src, "/") for src in source_dwn]), \ + sbo_req) while True: try: read = raw_input("_ ") diff --git a/slpkg/slack/install.py b/slpkg/slack/install.py index 9dbb502b..ab1999ca 100755 --- a/slpkg/slack/install.py +++ b/slpkg/slack/install.py @@ -95,9 +95,11 @@ def install(slack_pkg): SC, EC = colors.GREEN, colors.ENDC else: SC, EC = colors.RED, colors.ENDC - print " ", SC + pkgs[:-5] + EC, " "*(40-len(pkgs[:-5])), arch, " "*( - 7-len(arch)), pkgs[-5:-4], " "*(6-len(pkgs[-5:-4])), "Slack", " ", comp, " "*( - 3-len(comp)), "K" + print " ", SC + pkgs[:-5] + EC, \ + " "*(40-len(pkgs[:-5])), arch, \ + " "*(7-len(arch)), pkgs[-5:-4], \ + " "*(6-len(pkgs[-5:-4])), "Slack", \ + " ", comp, " "*(3-len(comp)), "K" comp_unit, uncomp_unit = "Mb", "Mb" compressed = round((sum(map(float, comp_sum)) * 0.0001220703125), 2) uncompressed = round((sum(map(float, uncomp_sum)) * 0.0001220703125), 2) diff --git a/slpkg/slack/patches.py b/slpkg/slack/patches.py index 44b1dc86..72223796 100755 --- a/slpkg/slack/patches.py +++ b/slpkg/slack/patches.py @@ -92,10 +92,11 @@ def patches(): slack = "_slack" + slack_ver() else: slack = "" - print " ", upg[:-(5+len(slack))], " "*(40-len(upg[:-( - 5+len(slack))])), arch, " "*(7-len(arch)), upg[-15:-14], " "*( - 6-len(upgrade[-15:-14])), "Slack", " ", size, " "*( - 3-len(size)), "K" + print " ", upg[:-(5+len(slack))], \ + " "*(40-len(upg[:-(5+len(slack))])), arch, \ + " "*(7-len(arch)), upg[-(5+len(slack)):-(4+len(slack))], \ + " "*(6-len(upg[-(5+len(slack)):-(4+len(slack))])), "Slack", \ + " ", size, " "*(3-len(size)), "K" comp_unit, uncomp_unit = "Mb", "Mb" compressed = round((sum(map(float, comp_sum)) * 0.0001220703125), 2) uncompressed = round((sum(map(float, uncomp_sum)) * 0.0001220703125), 2)