mirror of
https://gitlab.com/dslackw/slpkg.git
synced 2025-01-13 20:01:48 +01:00
Updated searching
Signed-off-by: Dimitris Zlatanidis <d.zlatanidis@gmail.com>
This commit is contained in:
parent
2fc4f64036
commit
9e035149bf
1 changed files with 2 additions and 8 deletions
|
@ -23,9 +23,7 @@
|
|||
|
||||
|
||||
from slpkg.utils import Utils
|
||||
from slpkg.toolbar import status
|
||||
from slpkg.blacklist import BlackList
|
||||
from slpkg.splitting import split_package
|
||||
from slpkg.__metadata__ import MetaData as _meta_
|
||||
|
||||
|
||||
|
@ -36,9 +34,5 @@ def search_pkg(name, repo):
|
|||
PACKAGES_TXT = Utils().read_file(_meta_.lib_path + f"{repo}_repo/PACKAGES.TXT")
|
||||
names = list(Utils().package_name(PACKAGES_TXT))
|
||||
blacklist = BlackList().packages(pkgs=names, repo=repo)
|
||||
for line in PACKAGES_TXT.splitlines():
|
||||
status(0)
|
||||
if line.startswith("PACKAGE NAME: ") and len(line) > 16:
|
||||
pkg_name = split_package(line[15:])[0].strip()
|
||||
if name == pkg_name and name not in blacklist:
|
||||
return pkg_name
|
||||
if name in names and name not in blacklist:
|
||||
return name
|
Loading…
Reference in a new issue