{"action":"created","comment":{"url":"https://api.github.com/repos/ev3dev/brickstrap/pulls/comments/50217534","id":50217534,"diff_hunk":"@@ -40,35 +40,43 @@ function br_script_path()\n     echo -n \"$SCRIPT_PATH\"\n }\n \n+. \"$(br_script_path)/brickstrap-argv.sh\"\n . \"$(br_script_path)/brickstrap-components.sh\"\n . \"$(br_script_path)/brickstrap-utils.sh\"\n \n # Commandline options. This defines the usage page\n BRP_USAGE=$(cat <<'EOF'\n-Usage: brickstrap -p <project> [-c <component>] [-d <dir>] <command>\n+Usage: brickstrap -p <project> [-c <component>] [-d <dest>] <command>\n \n Options\n -------\n -c <component> Select components from the project directory.\n                Multiple components may be selected by specifying multiple '-c'\n                options; at least one component must be specified.\n--d <dir>       The name of the directory for the rootfs.\n-               Note: This is also used for the .tar and .img file names.\n+-d <dest>      Destination directory in which brickstrap should store output.\n -p <project>   Directory which contains the brickstrap configuration (project).\n                This option is required and should occur exactly once.\n                Values are either a path to the project directory or the name of\n                an example project shipped with brickstrap by default.\n--Q <qemu>      Optional: override which QEMU binary to use for emulation of\n+-I <image>     Name of the disk image file to generate (without type suffix).\n+-Q <emulator>  Optional: override which QEMU binary to use for emulation of\n                foreign instruction sets.\n \n-               The <qemu> value must be either the path to a binary or\n+               The <emulator> value must be either the path to a binary or\n                the name of a Debian or QEMU architecture or the special string\n-               'none'. If <qemu> corresponds to a binary it is used\n+               'none'. If <emulator> corresponds to a binary it is used\n                unconditionally, without further validation. If <qemu> is an\n                architecture which matches the host architecture or 'native'\n                then no emulator will be used. Otherwise the system is queried\n                for a well known QEMU emulator for the architecture matching the\n-               <qemu> value.\n+               <emulator> value.\n+-B <filename>  Blacklist a package file from the project. The file will be\n+               ignored while determining the set of packages to install. If the\n+               project does not use the PACKAGES variable this setting will\n+               have no effect.\n+-P <package>   Blacklist a package (name). The package will not be added to the","path":"brickstrap.sh","position":45,"original_position":45,"commit_id":"8414a4394799c06e36025f5a66cd0fa9c8f586c4","original_commit_id":"8414a4394799c06e36025f5a66cd0fa9c8f586c4","user":{"login":"dlech","id":963645,"avatar_url":"https://avatars.githubusercontent.com/u/963645?v=3","gravatar_id":"","url":"https://api.github.com/users/dlech","html_url":"https://github.com/dlech","followers_url":"https://api.github.com/users/dlech/followers","following_url":"https://api.github.com/users/dlech/following{/other_user}","gists_url":"https://api.github.com/users/dlech/gists{/gist_id}","starred_url":"https://api.github.com/users/dlech/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dlech/subscriptions","organizations_url":"https://api.github.com/users/dlech/orgs","repos_url":"https://api.github.com/users/dlech/repos","events_url":"https://api.github.com/users/dlech/events{/privacy}","received_events_url":"https://api.github.com/users/dlech/received_events","type":"User","site_admin":false},"body":"I'm not sure that I like this option. For example, a package could still be installed even if it is listed here because it is a dependency of another package.\r\n\r\nLikewise, rather than blacklisting full package lists, it seems like we should just advocate making components more granular.\r\n\r\nAlso, if you blacklist a package and there is a hook that depends on it, you will have to blacklist the hook as well. I just see these options causing more problems than they fix and I am not looking forward to providing technical support for them.\r\n\r\nIf you really feel they are necessary, I would be OK with having them as an environment variable as sort of a back door, but I'm just not liking the idea of having blacklisting as a regular command line option.","created_at":"2016-01-20T06:00:47Z","updated_at":"2016-01-20T06:00:47Z","html_url":"https://github.com/ev3dev/brickstrap/pull/28#discussion_r50217534","pull_request_url":"https://api.github.com/repos/ev3dev/brickstrap/pulls/28","_links":{"self":{"href":"https://api.github.com/repos/ev3dev/brickstrap/pulls/comments/50217534"},"html":{"href":"https://github.com/ev3dev/brickstrap/pull/28#discussion_r50217534"},"pull_request":{"href":"https://api.github.com/repos/ev3dev/brickstrap/pulls/28"}}},"pull_request":{"url":"https://api.github.com/repos/ev3dev/brickstrap/pulls/28","id":56127498,"html_url":"https://github.com/ev3dev/brickstrap/pull/28","diff_url":"https://github.com/ev3dev/brickstrap/pull/28.diff","patch_url":"https://github.com/ev3dev/brickstrap/pull/28.patch","issue_url":"https://api.github.com/repos/ev3dev/brickstrap/issues/28","number":28,"state":"open","locked":false,"title":"Extract common code, and cleanup various directory paths.","user":{"login":"cmacq2","id":13215950,"avatar_url":"https://avatars.githubusercontent.com/u/13215950?v=3","gravatar_id":"","url":"https://api.github.com/users/cmacq2","html_url":"https://github.com/cmacq2","followers_url":"https://api.github.com/users/cmacq2/followers","following_url":"https://api.github.com/users/cmacq2/following{/other_user}","gists_url":"https://api.github.com/users/cmacq2/gists{/gist_id}","starred_url":"https://api.github.com/users/cmacq2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmacq2/subscriptions","organizations_url":"https://api.github.com/users/cmacq2/orgs","repos_url":"https://api.github.com/users/cmacq2/repos","events_url":"https://api.github.com/users/cmacq2/events{/privacy}","received_events_url":"https://api.github.com/users/cmacq2/received_events","type":"User","site_admin":false},"body":"This change introduces the new brickstrap-argv.sh module.\r\n\r\nChanges:\r\n\r\n - Change the -d option to be 'destdir' as opposed to 'rootfs' directory.\r\n   All output of brickstrap should now be generated as files or subdirectorys located within the given 'destdir'.\r\n - Extract common option parsing code into utility functions\r\n - Re-organise brickstrap artefacts inside rootfs/chroot.\r\n   Artefacts like tar-only directory or tar-exclude file are now confined to a 'brickstrap' directory hierarchy.\r\n   This way there is a lot less arbitrary poking inside the rootfs going on.\r\n - Introduce 'images' directory for storing rootfs image files.\r\n   This paves the way for generating multiple images with arbitrary partition layouts.\r\n - Introduce -I option to specify image base name.\r\n   By default the basename of 'destdir' is used with an appended timestamp.\r\n - Introduce getter function to lookup various paths, and base paths.\r\n - Remove numerous globally namespaced variables, notably ROOTDIR.\r\n   (There are 'getter' functions which provide same information more safely now).\r\n - Introduce -P option for blacklisting individual packages.\r\n   This is a more convenient alternative to BLACKLIST_PACKAGES\r\n - Introduce -B option for blacklisting entire package files.\r\n   This is a more convenient alternative to BLACKLIST_PACKAGE_FILES\r\n - Update brickstrap-utils.sh module to take advantage of the changes.\r\n - Update brickstrap.sh to take advantage the changes.\r\n - Fix image generation logic to not require a temporary file + mv step, to avoid name clashes.\r\n\r\nThis change resolves issue #26 (through destdir):\r\nhttps://github.com/ev3dev/brickstrap/issues/26\r\n\r\nSee also:\r\nhttps://github.com/ev3dev/brickstrap/pull/23#discussion_r49371653","created_at":"2016-01-15T03:40:55Z","updated_at":"2016-01-20T06:00:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"ccd4d6ffcfba5e24791d6ce5f8e3a2b4265272c7","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ev3dev/brickstrap/pulls/28/commits","review_comments_url":"https://api.github.com/repos/ev3dev/brickstrap/pulls/28/comments","review_comment_url":"https://api.github.com/repos/ev3dev/brickstrap/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ev3dev/brickstrap/issues/28/comments","statuses_url":"https://api.github.com/repos/ev3dev/brickstrap/statuses/8414a4394799c06e36025f5a66cd0fa9c8f586c4","head":{"label":"cmacq2:simplification-cleanups","ref":"simplification-cleanups","sha":"8414a4394799c06e36025f5a66cd0fa9c8f586c4","user":{"login":"cmacq2","id":13215950,"avatar_url":"https://avatars.githubusercontent.com/u/13215950?v=3","gravatar_id":"","url":"https://api.github.com/users/cmacq2","html_url":"https://github.com/cmacq2","followers_url":"https://api.github.com/users/cmacq2/followers","following_url":"https://api.github.com/users/cmacq2/following{/other_user}","gists_url":"https://api.github.com/users/cmacq2/gists{/gist_id}","starred_url":"https://api.github.com/users/cmacq2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmacq2/subscriptions","organizations_url":"https://api.github.com/users/cmacq2/orgs","repos_url":"https://api.github.com/users/cmacq2/repos","events_url":"https://api.github.com/users/cmacq2/events{/privacy}","received_events_url":"https://api.github.com/users/cmacq2/received_events","type":"User","site_admin":false},"repo":{"id":48535809,"name":"brickstrap","full_name":"cmacq2/brickstrap","owner":{"login":"cmacq2","id":13215950,"avatar_url":"https://avatars.githubusercontent.com/u/13215950?v=3","gravatar_id":"","url":"https://api.github.com/users/cmacq2","html_url":"https://github.com/cmacq2","followers_url":"https://api.github.com/users/cmacq2/followers","following_url":"https://api.github.com/users/cmacq2/following{/other_user}","gists_url":"https://api.github.com/users/cmacq2/gists{/gist_id}","starred_url":"https://api.github.com/users/cmacq2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cmacq2/subscriptions","organizations_url":"https://api.github.com/users/cmacq2/orgs","repos_url":"https://api.github.com/users/cmacq2/repos","events_url":"https://api.github.com/users/cmacq2/events{/privacy}","received_events_url":"https://api.github.com/users/cmacq2/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/cmacq2/brickstrap","description":"Tool for bootstrapping Debian and creating bootable image files for embedded systems","fork":true,"url":"https://api.github.com/repos/cmacq2/brickstrap","forks_url":"https://api.github.com/repos/cmacq2/brickstrap/forks","keys_url":"https://api.github.com/repos/cmacq2/brickstrap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/cmacq2/brickstrap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/cmacq2/brickstrap/teams","hooks_url":"https://api.github.com/repos/cmacq2/brickstrap/hooks","issue_events_url":"https://api.github.com/repos/cmacq2/brickstrap/issues/events{/number}","events_url":"https://api.github.com/repos/cmacq2/brickstrap/events","assignees_url":"https://api.github.com/repos/cmacq2/brickstrap/assignees{/user}","branches_url":"https://api.github.com/repos/cmacq2/brickstrap/branches{/branch}","tags_url":"https://api.github.com/repos/cmacq2/brickstrap/tags","blobs_url":"https://api.github.com/repos/cmacq2/brickstrap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/cmacq2/brickstrap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/cmacq2/brickstrap/git/refs{/sha}","trees_url":"https://api.github.com/repos/cmacq2/brickstrap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/cmacq2/brickstrap/statuses/{sha}","languages_url":"https://api.github.com/repos/cmacq2/brickstrap/languages","stargazers_url":"https://api.github.com/repos/cmacq2/brickstrap/stargazers","contributors_url":"https://api.github.com/repos/cmacq2/brickstrap/contributors","subscribers_url":"https://api.github.com/repos/cmacq2/brickstrap/subscribers","subscription_url":"https://api.github.com/repos/cmacq2/brickstrap/subscription","commits_url":"https://api.github.com/repos/cmacq2/brickstrap/commits{/sha}","git_commits_url":"https://api.github.com/repos/cmacq2/brickstrap/git/commits{/sha}","comments_url":"https://api.github.com/repos/cmacq2/brickstrap/comments{/number}","issue_comment_url":"https://api.github.com/repos/cmacq2/brickstrap/issues/comments{/number}","contents_url":"https://api.github.com/repos/cmacq2/brickstrap/contents/{+path}","compare_url":"https://api.github.com/repos/cmacq2/brickstrap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/cmacq2/brickstrap/merges","archive_url":"https://api.github.com/repos/cmacq2/brickstrap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/cmacq2/brickstrap/downloads","issues_url":"https://api.github.com/repos/cmacq2/brickstrap/issues{/number}","pulls_url":"https://api.github.com/repos/cmacq2/brickstrap/pulls{/number}","milestones_url":"https://api.github.com/repos/cmacq2/brickstrap/milestones{/number}","notifications_url":"https://api.github.com/repos/cmacq2/brickstrap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/cmacq2/brickstrap/labels{/name}","releases_url":"https://api.github.com/repos/cmacq2/brickstrap/releases{/id}","created_at":"2015-12-24T09:22:23Z","updated_at":"2016-01-13T16:38:00Z","pushed_at":"2016-01-19T10:22:24Z","git_url":"git://github.com/cmacq2/brickstrap.git","ssh_url":"git@github.com:cmacq2/brickstrap.git","clone_url":"https://github.com/cmacq2/brickstrap.git","svn_url":"https://github.com/cmacq2/brickstrap","homepage":"","size":315,"stargazers_count":0,"watchers_count":0,"language":"Shell","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"ev3dev:master","ref":"master","sha":"db81bd81b5a4d063f84051b168243b223d91dd30","user":{"login":"ev3dev","id":6878323,"avatar_url":"https://avatars.githubusercontent.com/u/6878323?v=3","gravatar_id":"","url":"https://api.github.com/users/ev3dev","html_url":"https://github.com/ev3dev","followers_url":"https://api.github.com/users/ev3dev/followers","following_url":"https://api.github.com/users/ev3dev/following{/other_user}","gists_url":"https://api.github.com/users/ev3dev/gists{/gist_id}","starred_url":"https://api.github.com/users/ev3dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev3dev/subscriptions","organizations_url":"https://api.github.com/users/ev3dev/orgs","repos_url":"https://api.github.com/users/ev3dev/repos","events_url":"https://api.github.com/users/ev3dev/events{/privacy}","received_events_url":"https://api.github.com/users/ev3dev/received_events","type":"Organization","site_admin":false},"repo":{"id":17956865,"name":"brickstrap","full_name":"ev3dev/brickstrap","owner":{"login":"ev3dev","id":6878323,"avatar_url":"https://avatars.githubusercontent.com/u/6878323?v=3","gravatar_id":"","url":"https://api.github.com/users/ev3dev","html_url":"https://github.com/ev3dev","followers_url":"https://api.github.com/users/ev3dev/followers","following_url":"https://api.github.com/users/ev3dev/following{/other_user}","gists_url":"https://api.github.com/users/ev3dev/gists{/gist_id}","starred_url":"https://api.github.com/users/ev3dev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ev3dev/subscriptions","organizations_url":"https://api.github.com/users/ev3dev/orgs","repos_url":"https://api.github.com/users/ev3dev/repos","events_url":"https://api.github.com/users/ev3dev/events{/privacy}","received_events_url":"https://api.github.com/users/ev3dev/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ev3dev/brickstrap","description":"Tool for bootstrapping Debian and creating bootable image files for embedded systems","fork":false,"url":"https://api.github.com/repos/ev3dev/brickstrap","forks_url":"https://api.github.com/repos/ev3dev/brickstrap/forks","keys_url":"https://api.github.com/repos/ev3dev/brickstrap/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ev3dev/brickstrap/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ev3dev/brickstrap/teams","hooks_url":"https://api.github.com/repos/ev3dev/brickstrap/hooks","issue_events_url":"https://api.github.com/repos/ev3dev/brickstrap/issues/events{/number}","events_url":"https://api.github.com/repos/ev3dev/brickstrap/events","assignees_url":"https://api.github.com/repos/ev3dev/brickstrap/assignees{/user}","branches_url":"https://api.github.com/repos/ev3dev/brickstrap/branches{/branch}","tags_url":"https://api.github.com/repos/ev3dev/brickstrap/tags","blobs_url":"https://api.github.com/repos/ev3dev/brickstrap/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ev3dev/brickstrap/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ev3dev/brickstrap/git/refs{/sha}","trees_url":"https://api.github.com/repos/ev3dev/brickstrap/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ev3dev/brickstrap/statuses/{sha}","languages_url":"https://api.github.com/repos/ev3dev/brickstrap/languages","stargazers_url":"https://api.github.com/repos/ev3dev/brickstrap/stargazers","contributors_url":"https://api.github.com/repos/ev3dev/brickstrap/contributors","subscribers_url":"https://api.github.com/repos/ev3dev/brickstrap/subscribers","subscription_url":"https://api.github.com/repos/ev3dev/brickstrap/subscription","commits_url":"https://api.github.com/repos/ev3dev/brickstrap/commits{/sha}","git_commits_url":"https://api.github.com/repos/ev3dev/brickstrap/git/commits{/sha}","comments_url":"https://api.github.com/repos/ev3dev/brickstrap/comments{/number}","issue_comment_url":"https://api.github.com/repos/ev3dev/brickstrap/issues/comments{/number}","contents_url":"https://api.github.com/repos/ev3dev/brickstrap/contents/{+path}","compare_url":"https://api.github.com/repos/ev3dev/brickstrap/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ev3dev/brickstrap/merges","archive_url":"https://api.github.com/repos/ev3dev/brickstrap/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ev3dev/brickstrap/downloads","issues_url":"https://api.github.com/repos/ev3dev/brickstrap/issues{/number}","pulls_url":"https://api.github.com/repos/ev3dev/brickstrap/pulls{/number}","milestones_url":"https://api.github.com/repos/ev3dev/brickstrap/milestones{/number}","notifications_url":"https://api.github.com/repos/ev3dev/brickstrap/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ev3dev/brickstrap/labels{/name}","releases_url":"https://api.github.com/repos/ev3dev/brickstrap/releases{/id}","created_at":"2014-03-20T20:09:35Z","updated_at":"2016-01-13T01:58:07Z","pushed_at":"2016-01-19T10:22:25Z","git_url":"git://github.com/ev3dev/brickstrap.git","ssh_url":"git@github.com:ev3dev/brickstrap.git","clone_url":"https://github.com/ev3dev/brickstrap.git","svn_url":"https://github.com/ev3dev/brickstrap","homepage":"","size":313,"stargazers_count":8,"watchers_count":8,"language":"Shell","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":9,"mirror_url":null,"open_issues_count":8,"forks":9,"open_issues":8,"watchers":8,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ev3dev/brickstrap/pulls/28"},"html":{"href":"https://github.com/ev3dev/brickstrap/pull/28"},"issue":{"href":"https://api.github.com/repos/ev3dev/brickstrap/issues/28"},"comments":{"href":"https://api.github.com/repos/ev3dev/brickstrap/issues/28/comments"},"review_comments":{"href":"https://api.github.com/repos/ev3dev/brickstrap/pulls/28/comments"},"review_comment":{"href":"https://api.github.com/repos/ev3dev/brickstrap/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ev3dev/brickstrap/pulls/28/commits"},"statuses":{"href":"https://api.github.com/repos/ev3dev/brickstrap/statuses/8414a4394799c06e36025f5a66cd0fa9c8f586c4"}}}}