[bin] add gtk3 bad deps detection script
This commit is contained in:
		
							
								
								
									
										27
									
								
								bin/kill_gtk3
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										27
									
								
								bin/kill_gtk3
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,27 @@ | |||||||
|  | #!/usr/bin/python2 | ||||||
|  |  | ||||||
|  | from entropy.server.interfaces import Server | ||||||
|  |  | ||||||
|  | srv = Server() | ||||||
|  | bad_pkgs = [] | ||||||
|  | dep_cache = set() | ||||||
|  |  | ||||||
|  | gtk2_match = srv.atom_match("x11-libs/gtk+:2") | ||||||
|  | gtk3_match = srv.atom_match("x11-libs/gtk+:3") | ||||||
|  |  | ||||||
|  | for repo_id in srv.repositories(): | ||||||
|  |     repo = srv.open_repository(repo_id) | ||||||
|  |     for pkg_id in repo.listAllPackageIds(): | ||||||
|  |         deps = [x for x in repo.retrieveDependencies(pkg_id) if x not in dep_cache] | ||||||
|  |         dep_cache.update(deps) | ||||||
|  |         for dep in deps: | ||||||
|  |             matches, rc = srv.atom_match(dep, multi_match=True, multi_repo=True) | ||||||
|  |             if gtk3_match in matches: | ||||||
|  |                 if gtk2_match in matches: | ||||||
|  |                     bad_pkgs.append((pkg_id, repo_id)) | ||||||
|  |                     print("found bad package: %s" % (repo.retrieveAtom(pkg_id),)) | ||||||
|  |  | ||||||
|  | for pkg_id, repo_id in bad_pkgs: | ||||||
|  |     print(srv.open_repository(repo_id).retrieveKeySlotAggregated(pkg_id)) | ||||||
|  |  | ||||||
|  | srv.shutdown() | ||||||
		Reference in New Issue
	
	Block a user