diff options
author | Alexander Bersenev <bay@hackerdom.ru> | 2011-08-25 19:20:42 +0000 |
---|---|---|
committer | Alexander Bersenev <bay@hackerdom.ru> | 2011-08-25 19:20:42 +0000 |
commit | d4367ca0b5cdcccfb3d51b7868d15e1104b8b30c (patch) | |
tree | e40eed96a05c0291774ec5e324ffe921edf8218c /src | |
parent | docs changed: installing section (diff) | |
download | autodep-d4367ca0b5cdcccfb3d51b7868d15e1104b8b30c.tar.gz autodep-d4367ca0b5cdcccfb3d51b7868d15e1104b8b30c.tar.bz2 autodep-d4367ca0b5cdcccfb3d51b7868d15e1104b8b30c.zip |
allowing to access to rdepends of system packages
Diffstat (limited to 'src')
-rwxr-xr-x | src/autodep/autodep | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/autodep/autodep b/src/autodep/autodep index 335cb2e..8d22e00 100755 --- a/src/autodep/autodep +++ b/src/autodep/autodep @@ -54,8 +54,9 @@ def parse_args(): def init_environment(): portage_api=portage_misc_functions.portage_api() system_packages = portage_api.get_system_packages_list() + system_deps = portage_api.get_system_packages_rdeps() - return portage_api, system_packages + return portage_api, system_packages, system_deps def init_runtime_vars(portage_api, options,args): runtime_vars={} # This is here mainly for grouping. We are trying to @@ -108,7 +109,7 @@ def init_runtime_vars(portage_api, options,args): return runtime_vars -def get_filter_function(options,args,system_packages,portage_api): +def get_filter_function(options,args,system_packages,system_deps,portage_api): # handling --block # exits if package name is bad if not options.packages and not options.strict_block: @@ -138,6 +139,8 @@ def get_filter_function(options,args,system_packages,portage_api): allfiles=portage_utils.get_all_packages_files() allowedpkgs=[] allowedpkgs+=system_packages + allowedpkgs+=system_deps + if runtime_vars["is_emerge"]: # blocking logic for emerge print "Notice: you can use emerge_strict command instead of autodep emerge." print "Using this command allows to build any number of a packages.\n" @@ -192,13 +195,13 @@ def get_filter_function(options,args,system_packages,portage_api): return True return filter -portage_api, system_packages=init_environment() +portage_api, system_packages, system_deps=init_environment() options,args=parse_args() runtime_vars=init_runtime_vars(portage_api,options,args) color_printer=colorize_output.color_printer(not options.nocolor) -filter_function=get_filter_function(options,args,system_packages,portage_api) +filter_function=get_filter_function(options,args,system_packages,system_deps,portage_api) # launching program events=logfs.fstracer.getfsevents(args[0], args,approach=options.approach,filterproc=filter_function) @@ -319,6 +322,8 @@ for package in sorted(packagesinfo): is_pkg_in_dep=package in runtime_vars["deps_all"] is_pkg_in_system=package in system_packages + is_pkg_in_system_deps=package in system_deps + is_pkg_in_portage_dep=runtime_vars["is_emerge"] and package in runtime_vars["deps_portage"] is_pkg_self="app-portage/autodep" in package is_pkg_python="dev-lang/python" in package @@ -358,6 +363,8 @@ for package in sorted(packagesinfo): color_printer.printmsg("text","[SYSTEM]") elif is_pkg_in_portage_dep: color_printer.printmsg("text","[PORTAGE DEP]") + elif is_pkg_in_system_deps: + color_printer.printmsg("text","[SYSTEM DEP]") elif is_pkg_self: color_printer.printmsg("text","[AUTODEP]") elif is_pkg_python: |