-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add command-line option to force rebuilding specific packages #756
Merged
Merged
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,9 +19,6 @@ | |
# cd to this directory before start | ||
DEFAULT_CHDIR = os.environ.get("ALIBUILD_CHDIR") or "." | ||
|
||
def csv_list(s): | ||
return s.split(',') | ||
|
||
|
||
# This is syntactic sugar for the --dist option (which should really be called | ||
# --dist-tag). It can be either: | ||
|
@@ -89,14 +86,23 @@ def doParseArgs(star): | |
help=("Fetch updates to repositories in MIRRORDIR. Required but nonexistent " | ||
"repositories are always cloned, even if this option is not given.")) | ||
|
||
build_parser.add_argument("--no-local", dest="noDevel", metavar="PKGLIST", default="", type=csv_list, | ||
build_parser.add_argument("--no-local", dest="noDevel", metavar="PACKAGE", default=[], action="append", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does this mean it will not support comma separated lists anymore? I do not think this is acceptable. |
||
help=("Do not pick up the following packages from a local checkout. " | ||
"%(metavar)s is a comma-separated list.")) | ||
"You can specify this option multiple times or separate " | ||
"multiple arguments with commas.")) | ||
build_parser.add_argument("--force-tracked", dest="forceTracked", default=False, action="store_true", | ||
help=("Do not pick up any packages from a local checkout. ")) | ||
build_parser.add_argument("--plugin", dest="plugin", default="legacy", help=("Plugin to use to do the actual build. ")) | ||
build_parser.add_argument("--disable", dest="disable", default=[], metavar="PACKAGE", action="append", | ||
help="Do not build %(metavar)s and all its (unique) dependencies.") | ||
help=("Do not build %(metavar)s and all its (unique) dependencies. " | ||
"You can specify this option multiple times or separate " | ||
"multiple arguments with commas.")) | ||
build_parser.add_argument("--force-rebuild", default=[], metavar="PACKAGE", action="append", | ||
help=("Always rebuild the following packages from scratch, even if " | ||
"they were built before. Specifying a package here has the " | ||
"same effect as adding 'force_rebuild: true' to its recipe " | ||
"in CONFIGDIR. You can specify this option multiple times or " | ||
"separate multiple arguments with commas.")) | ||
|
||
build_docker = build_parser.add_argument_group(title="Build inside a container", description="""\ | ||
Builds can be done inside a Docker container, to make it easier to get a | ||
|
@@ -191,7 +197,9 @@ def doParseArgs(star): | |
deps_parser.add_argument("--defaults", dest="defaults", default="release", metavar="DEFAULT", | ||
help="Use defaults from CONFIGDIR/defaults-%(metavar)s.sh.") | ||
deps_parser.add_argument("--disable", dest="disable", default=[], metavar="PACKAGE", action="append", | ||
help="Do not build %(metavar)s and all its (unique) dependencies.") | ||
help=("Assume we're not building %(metavar)s and all its (unique) dependencies. " | ||
"You can specify this option multiple times or separate multiple arguments " | ||
"with commas.")) | ||
|
||
deps_graph = deps_parser.add_argument_group(title="Customise graph output") | ||
deps_graph.add_argument("--neat", dest="neat", action="store_true", | ||
|
@@ -237,7 +245,9 @@ def doParseArgs(star): | |
doctor_parser.add_argument("--defaults", dest="defaults", default="release", metavar="DEFAULT", | ||
help="Use defaults from CONFIGDIR/defaults-%(metavar)s.sh.") | ||
doctor_parser.add_argument("--disable", dest="disable", default=[], metavar="PACKAGE", action="append", | ||
help="Assume we're not building %(metavar)s and all its (unique) dependencies.") | ||
help=("Assume we're not building %(metavar)s and all its (unique) dependencies. " | ||
"You can specify this option multiple times or separate multiple arguments " | ||
"with commas.")) | ||
|
||
doctor_system = doctor_parser.add_mutually_exclusive_group() | ||
doctor_system.add_argument("--always-prefer-system", dest="preferSystem", action="store_true", | ||
|
@@ -361,8 +371,12 @@ def finaliseArgs(args, parser, star): | |
"Alternatively, you can use the `--force-unknown-architecture' option." | ||
.format(table=ARCHITECTURE_TABLE, architecture=args.architecture)) | ||
|
||
if "noDevel" in args: | ||
args.noDevel = normalise_multiple_options(args.noDevel) | ||
if "disable" in args: | ||
args.disable = normalise_multiple_options(args.disable) | ||
if "force_rebuild" in args: | ||
args.force_rebuild = normalise_multiple_options(args.force_rebuild) | ||
|
||
if args.action in ["build", "init"]: | ||
args.referenceSources = format(args.referenceSources, workDir=args.workDir) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this mean it will not support comma separated lists anymore? I do not think this is acceptable.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, 2ebab24 fixes this so that
--no-devel
and--force-rebuild
work like--disable
(in that--disable A,B
and--disable A --disable B
are equivalent).