pamac-classic/test.py
2013-01-30 18:37:41 +01:00

21 lines
550 B
Python
Executable File

#! /usr/bin/python
# -*-coding:utf-8 -*-
from pamac import config
syncpkgs = {}
virtualdeps = {}
for repo in config.handle.get_syncdbs():
for pkg in repo.pkgcache:
if not pkg.name in syncpkgs.keys():
syncpkgs[pkg.name] = pkg
for pkg in syncpkgs.values():
for name in pkg.depends:
if (not name in syncpkgs.keys()) and (not '>' in name) and (not '<' in name) and (not '=' in name):
if 'module' in name:
if not virtualdeps.__contains__(name):
virtualdeps[name] = []
virtualdeps.get(name).append(pkg.name)
print(virtualdeps)