Allow projects to be specified as notdefault

Instead of every group being in the group "default", every project
is now in the group "all".   A group that should not be downloaded
by default may be added to the group "notdefault".

This allows all group names to be positive (instead of removing groups
directly in the manifest with -default) and offers a clear way of
selecting every project (--groups all).

Change-Id: I99cd70309adb1f8460db3bbc6eff46bdcd22256f
This commit is contained in:
Conley Owens
2012-08-13 13:11:18 -07:00
committed by gerrit code review
parent e2126652a3
commit bb1b5f5f86
5 changed files with 18 additions and 16 deletions

View File

@ -90,12 +90,12 @@ to update the working directory files.
dest='depth',
help='create a shallow clone with given depth; see git clone')
g.add_option('-g', '--groups',
dest='groups', default='default',
dest='groups', default='all,-notdefault',
help='restrict manifest projects to ones with a specified group',
metavar='GROUP')
g.add_option('-p', '--platform',
dest='platform', default='auto',
help='restrict manifest projects to ones with a specified'
help='restrict manifest projects to ones with a specified '
'platform group [auto|all|none|linux|darwin|...]',
metavar='PLATFORM')
@ -164,7 +164,7 @@ to update the working directory files.
groups = [x for x in groups if x]
groupstr = ','.join(groups)
if opt.platform == 'auto' and groupstr == 'default,platform-' + platform.system().lower():
if opt.platform == 'auto' and groupstr == 'all,-notdefault,platform-' + platform.system().lower():
groupstr = None
m.config.SetString('manifest.groups', groupstr)