Loading find-deps +3 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ from argparse import ArgumentParser from elftools.elf.elffile import ELFFile from elftools.elf.dynamic import DynamicSection, DynamicSegment from os import walk from os import walk, environ from os.path import join, exists, isdir, isfile, normpath, realpath from pprint import pprint from pycman import config Loading @@ -48,7 +48,8 @@ def find_pkg(path): path = normpath(realpath(path)).lstrip('/') global PACKAGES if PACKAGES is None: PACKAGES = config.init_with_config("/etc/pacman.conf").get_localdb().pkgcache PACKAGES = config.init_with_config(environ.get("PACMAN_CONF", "/etc/pacman.conf")).get_localdb().pkgcache for pkg in PACKAGES: if path in [ x[0] for x in pkg.files]: return(pkg.name) Loading Loading
find-deps +3 −2 Original line number Diff line number Diff line Loading @@ -22,7 +22,7 @@ from argparse import ArgumentParser from elftools.elf.elffile import ELFFile from elftools.elf.dynamic import DynamicSection, DynamicSegment from os import walk from os import walk, environ from os.path import join, exists, isdir, isfile, normpath, realpath from pprint import pprint from pycman import config Loading @@ -48,7 +48,8 @@ def find_pkg(path): path = normpath(realpath(path)).lstrip('/') global PACKAGES if PACKAGES is None: PACKAGES = config.init_with_config("/etc/pacman.conf").get_localdb().pkgcache PACKAGES = config.init_with_config(environ.get("PACMAN_CONF", "/etc/pacman.conf")).get_localdb().pkgcache for pkg in PACKAGES: if path in [ x[0] for x in pkg.files]: return(pkg.name) Loading