Skip to content
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

bitbake: Don't create a pull request #266

Merged
merged 1 commit into from
Mar 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ should be followed to generate the OpenEmbedded recipes for `meta-ros`.
$ superflore-gen-oe-recipes --help
usage: Deploy ROS packages into OpenEmbedded Linux [-h]
[--ros-distro ROS_DISTRO]
[--dry-run] [--pr-only] [--no-branch]
--dry-run [--pr-only] [--no-branch]
[--output-repository-path OUTPUT_REPOSITORY_PATH]
[--only ONLY [ONLY ...]]
[--pr-comment PR_COMMENT]
Expand Down Expand Up @@ -189,8 +189,12 @@ This command will clone the `ros/meta-ros` repo into a subfolder under
distro, commit them, and issue a pull request for `ros/meta-ros`. The
`--ros-distro` flag must be supplied.

If you don't want to issue a PR for `ros/meta-ros`, you should add
the `--dry-run` flag. You can issue the PR later by using the `--pr-only` flag.
Generating bitbake recipes without specifying `--dry-run` is not
herb-kuta-lge marked this conversation as resolved.
Show resolved Hide resolved
supported. This is because it is almost inevitable that
changes to the metadata under recipes-bbappend will be required.
Only when these have been made and the images build and pass
the sanity test should a pull request be created.
You can issue the PR later by using the `--pr-only` flag.

If you want to use an existing repo instead of cloning one, specify
`--output-repository-path OUTPUT_REPOSITORY_PATH`.
Expand Down
8 changes: 3 additions & 5 deletions superflore/generators/bitbake/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@

from rosinstall_generator.distro import get_distro
from superflore.CacheManager import CacheManager
from superflore.exceptions import NoGitHubAuthToken
from superflore.generate_installers import generate_installers
from superflore.generators.bitbake.gen_packages import regenerate_pkg
from superflore.generators.bitbake.ros_meta import RosMeta
Expand Down Expand Up @@ -45,7 +44,9 @@ def main():
overlay = None
preserve_existing = True
parser = get_parser(
'Deploy ROS packages into OpenEmbedded Linux', exclude_all=True)
'Deploy ROS packages into OpenEmbedded Linux',
exclude_all=True,
require_dryrun=True)
parser.add_argument(
'--tar-archive-dir',
help='location to store archived packages',
Expand All @@ -55,9 +56,6 @@ def main():
pr_comment = args.pr_comment
skip_keys = set(args.skip_keys) if args.skip_keys else set()
selected_targets = None
if not args.dry_run:
if 'SUPERFLORE_GITHUB_TOKEN' not in os.environ:
raise NoGitHubAuthToken()
if args.pr_only:
if args.dry_run:
parser.error('Invalid args! cannot dry-run and file PR')
Expand Down
5 changes: 4 additions & 1 deletion superflore/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@


# set up a parser and return it
def get_parser(tool_tip, is_generator=True, exclude_all=False):
def get_parser(
tool_tip, is_generator=True, exclude_all=False, require_dryrun=False
):
parser = argparse.ArgumentParser(tool_tip)
if is_generator:
parser.add_argument(
Expand All @@ -33,6 +35,7 @@ def get_parser(tool_tip, is_generator=True, exclude_all=False):
parser.add_argument(
'--dry-run',
help='run without filing a PR to remote',
required=require_dryrun,
action="store_true"
)
parser.add_argument(
Expand Down