Loading find-deps +4 −3 Original line number Diff line number Diff line Loading @@ -20,15 +20,15 @@ '''Find dependencies of a package or directory''' from argparse import ArgumentParser from elftools.elf.elffile import ELFFile from elftools.elf.dynamic import DynamicSection, DynamicSegment from elftools.elf.elffile import ELFFile from os import walk, environ, getcwd, chdir from os.path import join, exists, isdir, isfile, normpath, realpath from pprint import pprint from pycman import config from shlex import split from subprocess import check_call from sys import stderr from tarfile import open as tar from tempfile import TemporaryDirectory PACKAGES = None Loading Loading @@ -93,7 +93,8 @@ def main(): args = parse_argv() if isfile(args.path): pkgdir = TemporaryDirectory() check_call(["tar", "xfC", args.path, pkgdir.name]) tarball = tar(args.path) tarball.extractall(pkgdir.name) args.path = pkgdir.name if isdir(args.path): pprint(find_deps(args.path)) Loading Loading
find-deps +4 −3 Original line number Diff line number Diff line Loading @@ -20,15 +20,15 @@ '''Find dependencies of a package or directory''' from argparse import ArgumentParser from elftools.elf.elffile import ELFFile from elftools.elf.dynamic import DynamicSection, DynamicSegment from elftools.elf.elffile import ELFFile from os import walk, environ, getcwd, chdir from os.path import join, exists, isdir, isfile, normpath, realpath from pprint import pprint from pycman import config from shlex import split from subprocess import check_call from sys import stderr from tarfile import open as tar from tempfile import TemporaryDirectory PACKAGES = None Loading Loading @@ -93,7 +93,8 @@ def main(): args = parse_argv() if isfile(args.path): pkgdir = TemporaryDirectory() check_call(["tar", "xfC", args.path, pkgdir.name]) tarball = tar(args.path) tarball.extractall(pkgdir.name) args.path = pkgdir.name if isdir(args.path): pprint(find_deps(args.path)) Loading