mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-29 20:34:22 +01:00
updated search dependencies from local
This commit is contained in:
parent
d9b990ebff
commit
a95d295ca0
3 changed files with 12 additions and 10 deletions
|
@ -43,7 +43,7 @@ def sbo_dependencies_pkg(name):
|
|||
dependencies = []
|
||||
sbo_url = sbo_search_pkg(name)
|
||||
if sbo_url:
|
||||
requires = sbo_requires_pkg(sbo_url, name)
|
||||
requires = sbo_requires_pkg(name)
|
||||
for req in requires:
|
||||
# avoid to add %README% as dependency
|
||||
if "%README%" not in req:
|
||||
|
|
|
@ -47,14 +47,16 @@ def sbo_source_dwn(name):
|
|||
if sbo_name == name:
|
||||
return line[21:].strip()
|
||||
|
||||
def sbo_requires_pkg(sbo_url, name):
|
||||
'''
|
||||
Grab package requirements
|
||||
'''
|
||||
read_info = url_read(sbo_url + name + ".info")
|
||||
for line in read_info.splitlines():
|
||||
if line.startswith("REQUIRES=\""):
|
||||
return line[10:-1].strip().split()
|
||||
def sbo_requires_pkg(name):
|
||||
'''
|
||||
Grab package requirements
|
||||
'''
|
||||
for line in open(lib_path + "sbo_repo/SLACKBUILDS.TXT", "r"):
|
||||
if line.startswith("SLACKBUILD NAME: "):
|
||||
sbo_name = line[17:].strip()
|
||||
if line.startswith("SLACKBUILD REQUIRES: "):
|
||||
if sbo_name == name:
|
||||
return line[21:].strip().split()
|
||||
|
||||
def sbo_build_tag(sbo_url, name):
|
||||
# This feature is not yet used
|
||||
|
|
|
@ -52,7 +52,7 @@ def sbo_network(name):
|
|||
initialization()
|
||||
sbo_url = sbo_search_pkg(name)
|
||||
if sbo_url:
|
||||
sbo_req = sbo_requires_pkg(sbo_url, name)
|
||||
sbo_req = sbo_requires_pkg(name)
|
||||
sbo_dwn = sbo_slackbuild_dwn(sbo_url)
|
||||
source_dwn = sbo_source_dwn(name).split()
|
||||
sys.stdout.write("{0}Done{1}\n".format(colors.GREY, colors.ENDC))
|
||||
|
|
Loading…
Add table
Reference in a new issue