diff options
author | 2011-08-22 00:49:14 +0000 | |
---|---|---|
committer | 2011-08-22 00:49:14 +0000 | |
commit | 73ea870fc954527ca168160bb86c3d42216203b0 (patch) | |
tree | 15993d0decdfb185f1a126e86cdfd58503a238a7 | |
parent | python 2.6 compatibility (diff) | |
download | autodep-73ea870fc954527ca168160bb86c3d42216203b0.tar.gz autodep-73ea870fc954527ca168160bb86c3d42216203b0.tar.bz2 autodep-73ea870fc954527ca168160bb86c3d42216203b0.zip |
add self to blocking white list
-rw-r--r-- | portage_with_autodep/pym/_emerge/EventsAnalyser.py | 12 | ||||
-rwxr-xr-x | src/autodep/autodep | 7 |
2 files changed, 13 insertions, 6 deletions
diff --git a/portage_with_autodep/pym/_emerge/EventsAnalyser.py b/portage_with_autodep/pym/_emerge/EventsAnalyser.py index a0562aa..f0aa7f8 100644 --- a/portage_with_autodep/pym/_emerge/EventsAnalyser.py +++ b/portage_with_autodep/pym/_emerge/EventsAnalyser.py @@ -263,7 +263,7 @@ class FilterProcGenerator: portageutils=PortageUtils(settings=settings) deps_all=portageutils.get_deps_for_package_building(pkgname) - deps_portage=portageutils.get_dep('portage',["RDEPEND"]) + deps_portage=portageutils.get_dep('sys-apps/portage',["RDEPEND"]) system_packages=portageutils.get_system_packages_list() @@ -273,6 +273,7 @@ class FilterProcGenerator: allowedpkgs=system_packages+list(deps_portage)+list(deps_all) + allowedpkgs+=["app-portage/autodep"] allowedfiles=GentoolkitUtils().getfilesbypackages(allowedpkgs) #for pkg in allowedpkgs: @@ -304,8 +305,8 @@ class EventsAnalyser: self.deps_all=self.portageutils.get_deps_for_package_building(pkgname) self.deps_direct=self.portageutils.get_dep(pkgname,["DEPEND"]) - self.deps_portage=self.portageutils.get_dep('portage',["RDEPEND"]) - + self.deps_portage=self.portageutils.get_dep('sys-apps/portage',["RDEPEND"]) + self.system_packages=self.portageutils.get_system_packages_list() # All analyse work is here @@ -381,12 +382,13 @@ class EventsAnalyser: if package=="unknown": continue - + is_pkg_in_dep=package in self.deps_all is_pkg_in_portage_dep=package in self.deps_portage is_pkg_in_system=package in self.system_packages is_pkg_python="dev-lang/python" in package + is_pkg_self="app-portage/autodep" in package stages=[] for stage in sorted(packagesinfo[package].keys(), key=stagesorder.get): @@ -425,6 +427,8 @@ class EventsAnalyser: portage.util.writemsg("[SYSTEM]") elif is_pkg_in_portage_dep: portage.util.writemsg("[PORTAGE DEP]") + elif is_pkg_self: + portage.util.writemsg("[AUTODEP]") elif is_pkg_python: portage.util.writemsg("[INTERPRETER]") elif not self.is_package_useful(package,stages,filenames.keys()): diff --git a/src/autodep/autodep b/src/autodep/autodep index d607ed6..335cb2e 100755 --- a/src/autodep/autodep +++ b/src/autodep/autodep @@ -172,8 +172,8 @@ def get_filter_function(options,args,system_packages,portage_api): portage_api.get_deps(file_to_package[program_path],["RDEPEND"])) allowedpkgs+=depslist - #print allowedpkgs - + # Do not forget to add self + allowedpkgs+=["app-portage/autodep"] # remember the allowedpkgs in deps_all. It is bad to do it here. runtime_vars["deps_all"]=allowedpkgs @@ -320,6 +320,7 @@ 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_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 stages=[] @@ -357,6 +358,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_self: + color_printer.printmsg("text","[AUTODEP]") elif is_pkg_python: color_printer.printmsg("text","[INTERPRETER]") elif not events_analysis.is_package_useful(package,stages,filenames.keys()): |