mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2024-12-29 10:26:12 +01:00
fix install noarch SBo pkgs
This commit is contained in:
parent
4cea213b4c
commit
d50bfe66b5
3 changed files with 31 additions and 5 deletions
|
@ -25,6 +25,7 @@ import os
|
||||||
import sys
|
import sys
|
||||||
import subprocess
|
import subprocess
|
||||||
|
|
||||||
|
from pkg.find import find_package
|
||||||
from pkg.build import build_package
|
from pkg.build import build_package
|
||||||
from pkg.manager import pkg_upgrade
|
from pkg.manager import pkg_upgrade
|
||||||
|
|
||||||
|
@ -100,7 +101,7 @@ def sbo_check():
|
||||||
os.mkdir(build_path)
|
os.mkdir(build_path)
|
||||||
os.chdir(build_path)
|
os.chdir(build_path)
|
||||||
for name, version in zip(pkg_name, sbo_ver):
|
for name, version in zip(pkg_name, sbo_ver):
|
||||||
pkg_for_install = ("{0}-{1}".format(name, version))
|
prgnam = ("{0}-{1}".format(name, version))
|
||||||
sbo_url = sbo_search_pkg(name)
|
sbo_url = sbo_search_pkg(name)
|
||||||
sbo_dwn = sbo_slackbuild_dwn(sbo_url, name)
|
sbo_dwn = sbo_slackbuild_dwn(sbo_url, name)
|
||||||
src_dwn = sbo_source_dwn(name).split()
|
src_dwn = sbo_source_dwn(name).split()
|
||||||
|
@ -112,8 +113,16 @@ def sbo_check():
|
||||||
subprocess.call("wget -N {0}".format(src), shell=True)
|
subprocess.call("wget -N {0}".format(src), shell=True)
|
||||||
sources.append(get_file(src, "/"))
|
sources.append(get_file(src, "/"))
|
||||||
build_package(script, sources, build_path)
|
build_package(script, sources, build_path)
|
||||||
|
'''
|
||||||
|
Before installing new binary package look if arch is noarch.
|
||||||
|
This is because some maintainers changes arch manualy.
|
||||||
|
'''
|
||||||
|
if "-noarch-" in "".join(find_package(prgnam, tmp)):
|
||||||
|
sbo_arch = "-noarch-"
|
||||||
|
else:
|
||||||
|
from __metadata__ import sbo_arch
|
||||||
binary = ("{0}{1}{2}{3}{4}{5}".format(
|
binary = ("{0}{1}{2}{3}{4}{5}".format(
|
||||||
tmp, pkg_for_install, sbo_arch, build, sbo_tag, sbo_filetype).split())
|
tmp, prgnam, sbo_arch, build, sbo_tag, sbo_filetype).split())
|
||||||
print("{0}[ Upgrading ] --> {1}{2}".format(
|
print("{0}[ Upgrading ] --> {1}{2}".format(
|
||||||
colors.GREEN, colors.ENDC, name))
|
colors.GREEN, colors.ENDC, name))
|
||||||
pkg_upgrade(binary)
|
pkg_upgrade(binary)
|
||||||
|
|
|
@ -28,7 +28,7 @@ import subprocess
|
||||||
from colors import colors
|
from colors import colors
|
||||||
from functions import get_file
|
from functions import get_file
|
||||||
from messages import pkg_not_found, pkg_found, template
|
from messages import pkg_not_found, pkg_found, template
|
||||||
from __metadata__ import sbo_arch, build, sbo_tag, sbo_filetype
|
from __metadata__ import build, sbo_tag, sbo_filetype
|
||||||
from __metadata__ import tmp, pkg_path, build_path, log_path, sp
|
from __metadata__ import tmp, pkg_path, build_path, log_path, sp
|
||||||
|
|
||||||
from pkg.find import find_package
|
from pkg.find import find_package
|
||||||
|
@ -135,6 +135,14 @@ def sbo_build(name):
|
||||||
subprocess.call("wget -N {0}".format(src), shell=True)
|
subprocess.call("wget -N {0}".format(src), shell=True)
|
||||||
sources.append(get_file(src, "/"))
|
sources.append(get_file(src, "/"))
|
||||||
build_package(script, sources, build_path)
|
build_package(script, sources, build_path)
|
||||||
|
'''
|
||||||
|
Before installing new binary package look if arch is noarch.
|
||||||
|
This is because some maintainers changes arch manualy.
|
||||||
|
'''
|
||||||
|
if "-noarch-" in "".join(find_package(prgnam, tmp)):
|
||||||
|
sbo_arch = "-noarch-"
|
||||||
|
else:
|
||||||
|
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 ] --> {1}{2}".format(
|
||||||
|
|
|
@ -109,7 +109,7 @@ def sbo_network(name):
|
||||||
if find_package(name + sp, pkg_path) == []:
|
if find_package(name + sp, pkg_path) == []:
|
||||||
sources = []
|
sources = []
|
||||||
os.chdir(build_path)
|
os.chdir(build_path)
|
||||||
pkg_for_install = ("{0}-{1}".format(name, sbo_version))
|
prgnam = ("{0}-{1}".format(name, sbo_version))
|
||||||
print("\n{0}Start -->{1} {2}\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, "/")
|
||||||
|
@ -117,8 +117,17 @@ def sbo_network(name):
|
||||||
subprocess.call("wget -N {0}".format(src), shell=True)
|
subprocess.call("wget -N {0}".format(src), shell=True)
|
||||||
sources.append(get_file(src, "/"))
|
sources.append(get_file(src, "/"))
|
||||||
build_package(script, sources, build_path)
|
build_package(script, sources, build_path)
|
||||||
|
'''
|
||||||
|
Before installing new binary package look if arch is noarch.
|
||||||
|
This is because some maintainers changes arch manualy.
|
||||||
|
|
||||||
|
'''
|
||||||
|
if "-noarch-" in "".join(find_package(prgnam, tmp)):
|
||||||
|
sbo_arch = "-noarch-"
|
||||||
|
else:
|
||||||
|
from __metadata__ import sbo_arch
|
||||||
binary = ("{0}{1}{2}{3}{4}{5}".format(
|
binary = ("{0}{1}{2}{3}{4}{5}".format(
|
||||||
tmp, pkg_for_install, 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 ] --> {1}{2}".format(
|
||||||
colors.GREEN, colors.ENDC, name))
|
colors.GREEN, colors.ENDC, name))
|
||||||
pkg_upgrade(binary)
|
pkg_upgrade(binary)
|
||||||
|
|
Loading…
Reference in a new issue