mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-30 20:34:38 +01:00
update source
This commit is contained in:
parent
ed1dd53b31
commit
46bc75fc46
5 changed files with 26 additions and 19 deletions
|
@ -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"
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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("_ ")
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue