fix find pkg with version

This commit is contained in:
Dimitris Zlatanidis 2014-09-02 07:39:29 +03:00
parent 6342bb4bce
commit 2d7c821cc9

View file

@ -93,7 +93,7 @@ def sbo_network(name):
sources = []
os.chdir(build_path)
script = get_file(sbo_dwn, "/")
print("\n{0}Start -->{1} {2}\n".format(colors.GREEN, colors.ENDC, name))
print("\n{0}Start -->{0} {1}\n".format(colors.GREEN, colors.ENDC, name))
subprocess.call("wget -N {0}".format(sbo_dwn), shell=True)
for src in source_dwn:
subprocess.call("wget -N {0}".format(src), shell=True)
@ -105,11 +105,11 @@ def sbo_network(name):
if not os.path.exists(build_path):
os.mkdir(build_path)
sbo_version = sbo_version_pkg(name)
if find_package(name + sp, pkg_path) == []:
prgnam = ("{0}-{1}".format(name, sbo_version))
if find_package(prgnam + sp, pkg_path) == []:
sources = []
os.chdir(build_path)
prgnam = ("{0}-{1}".format(name, sbo_version))
print("\n{0}Start -->{1} {2}\n".format(colors.GREEN, colors.ENDC, name))
print("\n{0}Start -->{0} {1}\n".format(colors.GREEN, colors.ENDC, name))
subprocess.call("wget -N {0}".format(sbo_dwn), shell=True)
script = get_file(sbo_dwn, "/")
for src in source_dwn:
@ -124,16 +124,15 @@ def sbo_network(name):
if "-noarch-" in "".join(find_package(prgnam, tmp)):
sbo_arch = "-noarch-"
else:
from slpkg.__metadata__ import sbo_arch
from __metadata__ import sbo_arch
binary = ("{0}{1}{2}{3}{4}{5}".format(
tmp, prgnam, sbo_arch, build, sbo_tag, sbo_filetype).split())
print("{0}[ Installing ] --> {1}{2}".format(
colors.GREEN, colors.ENDC, name))
print("{0}[ Installing ] --> {0}{1}".format(colors.GREEN, colors.ENDC, name))
pkg_upgrade(binary)
if find_package(name + sp, pkg_path):
print("Complete!\n")
else:
print("The package {0} may not install successfully".format(name))
print("The package {0} not installed successfully".format(name))
break
else:
template(78)