comparison mxtool/mx.py @ 22043:770fdbe70bb3

only (re)make archives from build command for distributions with at least one constituent project that was (re)compiled
author Doug Simon <doug.simon@oracle.com>
date Sun, 21 Jun 2015 22:24:40 +0200
parents db48a62aba36
children 62fa6ad33667
comparison
equal deleted inserted replaced
22042:db48a62aba36 22043:770fdbe70bb3
3121 abort('{0} Java compilation tasks failed'.format(len(failed))) 3121 abort('{0} Java compilation tasks failed'.format(len(failed)))
3122 3122
3123 if len(tasks) != 0: 3123 if len(tasks) != 0:
3124 if args.java and not args.only: 3124 if args.java and not args.only:
3125 files = [] 3125 files = []
3126 rebuiltProjects = frozenset([t.proj for t in tasks.itervalues()])
3126 for dist in sorted_dists(): 3127 for dist in sorted_dists():
3127 if dist not in updatedAnnotationProcessorDists: 3128 if dist not in updatedAnnotationProcessorDists:
3128 archive(['@' + dist.name]) 3129 projectsInDist = dist.sorted_deps()
3130 n = len(rebuiltProjects.intersection(projectsInDist))
3131 if n != 0:
3132 log('Updating jars for {0} [{1} constituent projects (re)built]'.format(dist.name, n))
3133 dist.make_archive()
3134 else:
3135 logv('[all constituent projects for {0} are up to date - skipping jar updating]'.format(dist.name))
3129 if args.check_distributions and not dist.isProcessorDistribution: 3136 if args.check_distributions and not dist.isProcessorDistribution:
3130 with zipfile.ZipFile(dist.path, 'r') as zf: 3137 with zipfile.ZipFile(dist.path, 'r') as zf:
3131 files.extend([member for member in zf.namelist() if not member.startswith('META-INF')]) 3138 files.extend([member for member in zf.namelist() if not member.startswith('META-INF')])
3132 dups = set([x for x in files if files.count(x) > 1]) 3139 dups = set([x for x in files if files.count(x) > 1])
3133 if len(dups) > 0: 3140 if len(dups) > 0: