Permalink
Browse files

sample scripts updated for 3.0.0

Signed-off-by: Kwpolska <kwpolska@gmail.com>
  • Loading branch information...
Kwpolska committed Apr 21, 2013
1 parent ae1f729 commit 42980ee3ef4539cc7455135b4351bbae887bed33
Showing with 10 additions and 16 deletions.
  1. +6 −8 sample-scripts/aur-ood-orphans.py
  2. +2 −4 sample-scripts/list-non-aur.py
  3. +2 −4 sample-scripts/upgrade.py
@@ -53,18 +53,16 @@
'packages')
args = parser.parse_args()
- upg = pkgbuilder.upgrade.Upgrade()
- uti = pkgbuilder.utils.Utils()
- foreign = upg.gather_foreign_pkgs().keys()
+ foreign = pkgbuilder.upgrade.gather_foreign_pkgs().keys()
ood = []
orphans = []
toprint = []
- for i in uti.info(foreign):
- if i['Maintainer'] == None:
- orphans.append(i['Name'])
+ for i in pkgbuilder.utils.info(foreign):
+ if not i.human:
+ orphans.append(i.name)
- if i['OutOfDate'] == '1':
- ood.append(i['Name'])
+ if i.is_outdated:
+ ood.append(i.name)
if args.orphans and args.ood:
both = list(set(ood + orphans))
@@ -40,9 +40,7 @@
import pkgbuilder.upgrade
if __name__ == '__main__':
- upg = pkgbuilder.upgrade.Upgrade()
- uti = pkgbuilder.utils.Utils()
- foreign = set(upg.gather_foreign_pkgs().keys())
- aurinfo = set([i['Name'] for i in uti.info(foreign)])
+ foreign = set(pkgbuilder.upgrade.gather_foreign_pkgs().keys())
+ aurinfo = set([i.name for i in pkgbuilder.utils.info(foreign)])
print('\n'.join(foreign - aurinfo))
@@ -54,10 +54,8 @@
if not args.count and not args.list:
exit(0)
- upg = pkgbuilder.upgrade.Upgrade()
-
- foreign = upg.gather_foreign_pkgs()
- gradable = upg.list_upgradable(foreign.keys(), False)
+ foreign = pkgbuilder.upgrade.gather_foreign_pkgs()
+ gradable = pkgbuilder.upgrade.list_upgradable(foreign.keys(), False)
upgradable = gradable[0]
downgradable = gradable[1]

0 comments on commit 42980ee

Please sign in to comment.