mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-18 10:26:29 +01:00
fix find pkg with version
This commit is contained in:
parent
6342bb4bce
commit
2d7c821cc9
1 changed files with 7 additions and 8 deletions
|
@ -93,7 +93,7 @@ def sbo_network(name):
|
||||||
sources = []
|
sources = []
|
||||||
os.chdir(build_path)
|
os.chdir(build_path)
|
||||||
script = get_file(sbo_dwn, "/")
|
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)
|
subprocess.call("wget -N {0}".format(sbo_dwn), shell=True)
|
||||||
for src in source_dwn:
|
for src in source_dwn:
|
||||||
subprocess.call("wget -N {0}".format(src), shell=True)
|
subprocess.call("wget -N {0}".format(src), shell=True)
|
||||||
|
@ -105,11 +105,11 @@ def sbo_network(name):
|
||||||
if not os.path.exists(build_path):
|
if not os.path.exists(build_path):
|
||||||
os.mkdir(build_path)
|
os.mkdir(build_path)
|
||||||
sbo_version = sbo_version_pkg(name)
|
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 = []
|
sources = []
|
||||||
os.chdir(build_path)
|
os.chdir(build_path)
|
||||||
prgnam = ("{0}-{1}".format(name, sbo_version))
|
print("\n{0}Start -->{0} {1}\n".format(colors.GREEN, colors.ENDC, name))
|
||||||
print("\n{0}Start -->{1} {2}\n".format(colors.GREEN, colors.ENDC, name))
|
|
||||||
subprocess.call("wget -N {0}".format(sbo_dwn), shell=True)
|
subprocess.call("wget -N {0}".format(sbo_dwn), shell=True)
|
||||||
script = get_file(sbo_dwn, "/")
|
script = get_file(sbo_dwn, "/")
|
||||||
for src in source_dwn:
|
for src in source_dwn:
|
||||||
|
@ -124,16 +124,15 @@ def sbo_network(name):
|
||||||
if "-noarch-" in "".join(find_package(prgnam, tmp)):
|
if "-noarch-" in "".join(find_package(prgnam, tmp)):
|
||||||
sbo_arch = "-noarch-"
|
sbo_arch = "-noarch-"
|
||||||
else:
|
else:
|
||||||
from slpkg.__metadata__ import sbo_arch
|
from __metadata__ import sbo_arch
|
||||||
binary = ("{0}{1}{2}{3}{4}{5}".format(
|
binary = ("{0}{1}{2}{3}{4}{5}".format(
|
||||||
tmp, prgnam, sbo_arch, build, sbo_tag, sbo_filetype).split())
|
tmp, prgnam, sbo_arch, build, sbo_tag, sbo_filetype).split())
|
||||||
print("{0}[ Installing ] --> {1}{2}".format(
|
print("{0}[ Installing ] --> {0}{1}".format(colors.GREEN, colors.ENDC, name))
|
||||||
colors.GREEN, colors.ENDC, name))
|
|
||||||
pkg_upgrade(binary)
|
pkg_upgrade(binary)
|
||||||
if find_package(name + sp, pkg_path):
|
if find_package(name + sp, pkg_path):
|
||||||
print("Complete!\n")
|
print("Complete!\n")
|
||||||
else:
|
else:
|
||||||
print("The package {0} may not install successfully".format(name))
|
print("The package {0} not installed successfully".format(name))
|
||||||
break
|
break
|
||||||
else:
|
else:
|
||||||
template(78)
|
template(78)
|
||||||
|
|
Loading…
Reference in a new issue