List packages maintained by others
This commit is contained in:
parent
51c58c1899
commit
8320df3bc5
|
@ -3,11 +3,13 @@
|
|||
|
||||
from sys import argv
|
||||
from pkgcrap.list_update import main as update
|
||||
from pkgcrap.list_update import maintlist as maintlist
|
||||
from pkgcrap.outdated_check import main as outdated
|
||||
|
||||
options = {
|
||||
'update': update,
|
||||
'outdated': outdated,
|
||||
'maintlist': maintlist,
|
||||
}
|
||||
|
||||
def main():
|
||||
|
|
|
@ -4,13 +4,14 @@
|
|||
from pkgcrap.util import conf_file_path
|
||||
import pkgcrap.parse as parse
|
||||
|
||||
def packages_scan(maintainer):
|
||||
def packages_scan(maintainer, verbose=False):
|
||||
repos = parse.repos()
|
||||
repos.load()
|
||||
packages = []
|
||||
for repo in repos.repos.values():
|
||||
repo.load()
|
||||
print('Scanning', repo.name)
|
||||
if verbose:
|
||||
print('Scanning', repo.name)
|
||||
for cat in repo.categories.values():
|
||||
cat.load()
|
||||
for pkg in cat.packages.values():
|
||||
|
@ -22,11 +23,19 @@ def packages_scan(maintainer):
|
|||
pass
|
||||
return packages
|
||||
|
||||
def maintlist(args):
|
||||
if len(args) < 1:
|
||||
print('Specify the maintainer\'s email address')
|
||||
return
|
||||
packages = packages_scan(args[0])
|
||||
for pkg in packages:
|
||||
print(pkg.full_name)
|
||||
|
||||
def main(args):
|
||||
if len(args) < 1:
|
||||
print('Specify your maintainer email address')
|
||||
return
|
||||
packages = packages_scan(args[0])
|
||||
packages = packages_scan(args[0], verbose=True)
|
||||
with open(conf_file_path('maintained.txt'), 'w') as fp:
|
||||
fp.write("\n".join([pkg.full_name for pkg in packages]))
|
||||
print('Updated maintained package list')
|
||||
|
|
Loading…
Reference in New Issue