)]}'
{"/COMMIT_MSG":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"10337cf84841746179f3f8bf371cf73223d2d39d","unresolved":false,"context_lines":[{"line_number":7,"context_line":"package-installs: provide for skip from env var"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Provide a \"when\" option that provides for not installing packages"},{"line_number":10,"context_line":"based on a \u003d or !\u003d match on an environment variable."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Unit tests are added."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"dfd5e7cf_d6d09653","line":10,"updated":"2019-01-08 06:58:40.000000000","message":"How about using \u0027\u003d\u003d\u0027 and \u0027!\u003d\u0027? Maybe my thinking is too pythonic here, but those do look more natural to me.","commit_id":"c52c383f1bbbff137b5f8324ddbf62c2416c940f"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"3b1238199954e1c07907441e1bc8af89413833ae","unresolved":false,"context_lines":[{"line_number":7,"context_line":"package-installs: provide for skip from env var"},{"line_number":8,"context_line":""},{"line_number":9,"context_line":"Provide a \"when\" option that provides for not installing packages"},{"line_number":10,"context_line":"based on a \u003d or !\u003d match on an environment variable."},{"line_number":11,"context_line":""},{"line_number":12,"context_line":"Unit tests are added."},{"line_number":13,"context_line":""}],"source_content_type":"text/x-gerrit-commit-message","patch_set":13,"id":"dfd5e7cf_472dbb93","line":10,"in_reply_to":"dfd5e7cf_d6d09653","updated":"2019-01-09 00:28:12.000000000","message":"I can see this, but I also didn\u0027t want any impression this is actually pythonic.  I think leave it like this at this point to avoid more runs through gate","commit_id":"c52c383f1bbbff137b5f8324ddbf62c2416c940f"}],"diskimage_builder/elements/package-installs/bin/package-installs-squash":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"f9c3f552417c1ff77a1770cbbda10aebf6d2a9e3","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    Returns True if the package should be skipped, False otherwise"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    If the ENVIRONMENT_VARIABLE is unset, returns True (skipped)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    \u0027\u0027\u0027"},{"line_number":76,"context_line":"    if statement is None:"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3f79a3b5_8e6dcc02","line":73,"updated":"2018-11-21 17:23:18.000000000","message":"What is the motivation for this behavior. If it is unset then it will fail an equality check but pass a not equal check. Would that be more intuitive behavior?\n\nBasically return true if op is !\u003d and false if op is \u003d ?","commit_id":"301b45cddd097444d0704a8a1dcc8f243e3ee57b"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"b7862941711adee920f9f287a31b3113c2afa59e","unresolved":false,"context_lines":[{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    Returns True if the package should be skipped, False otherwise"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"    If the ENVIRONMENT_VARIABLE is unset, returns True (skipped)"},{"line_number":74,"context_line":""},{"line_number":75,"context_line":"    \u0027\u0027\u0027"},{"line_number":76,"context_line":"    if statement is None:"}],"source_content_type":"application/octet-stream","patch_set":2,"id":"3f79a3b5_10a0f1a3","line":73,"in_reply_to":"3f79a3b5_8e6dcc02","updated":"2018-11-21 23:14:03.000000000","message":"My thinking was that if you have something like\n\n DIB_FEATURE_FOO\n\nThen you have\n\n package-foo:\n  skip_when: DIB_FEATURE_FOO\u003d0\n\nthen if the variable isn\u0027t defined or is explicitly set to 0 you don\u0027t get the package, but set it to 1 and you do.\n\nHowever, you\u0027re right that you can\u0027t \"toggle\" with this approach, e.g. if you want a default package, but optionally to switch in another\n\n package-default:\n  skip_when: DIB_FEATURE_FOO!\u003d0 # don\u0027t install default when feature\u003d1\n package-other:\n  skip_when: DIB_FEATURE_FOO\u003d0  # don\u0027t install feature when feature\u003d0\n\nboth will be skipped if not defined.\n\nIn the first case, we\u0027d want undefined\u003d to return True (skip).\n\nIn the second case we\u0027d want undefined!\u003d to return False (don\u0027t skip)\n\nI have to think through the full implications ...","commit_id":"301b45cddd097444d0704a8a1dcc8f243e3ee57b"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"6e390e7eb5145a81fb9fee43aa5526ee0ee5b2e8","unresolved":false,"context_lines":[{"line_number":66,"context_line":""},{"line_number":67,"context_line":"    Evaluate statements of the form"},{"line_number":68,"context_line":""},{"line_number":69,"context_line":"     when: ENVIRONMENT_VARIABLE[!]\u003dvalue"},{"line_number":70,"context_line":""},{"line_number":71,"context_line":"    Returns True if the package should be skipped, False otherwise"},{"line_number":72,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":9,"id":"3f79a3b5_85a1cca9","line":69,"updated":"2018-11-28 00:08:20.000000000","message":"yeah, clearly I had the idea of \"when:\" in my head -- I changed it to \"skip_when:\" when it seemed like we\u0027d have the default case with no env var.  But I\u0027m convinced that\u0027s a bad idea, and when: makes more sense now","commit_id":"00824b46821f5c4fdf9cbb7cee4e2570d34c35a0"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"cd56ad34f5669d385a3928b20fbd92527efb43ad","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            return False"},{"line_number":101,"context_line":"    elif op \u003d\u003d \u0027!\u003d\u0027:"},{"line_number":102,"context_line":"        if val !\u003d os.environ[var]:"},{"line_number":103,"context_line":"            return False"},{"line_number":104,"context_line":"    else:"},{"line_number":105,"context_line":"        print(\"Malformed when op: %s\" % op)"},{"line_number":106,"context_line":"        sys.exit(1)"}],"source_content_type":"application/octet-stream","patch_set":10,"id":"3f79a3b5_a5988818","line":103,"updated":"2018-11-28 00:39:00.000000000","message":"I think these two return False should be return True because docstring says return True if package should be installed.\n\nThe return True below should be a return False.","commit_id":"fd9027bfc246401686894c553e3b2dd72450fd48"},{"author":{"_account_id":7118,"name":"Ian Wienand","email":"iwienand@redhat.com","username":"iwienand"},"change_message_id":"b5a89c1e9436d8063b5bf75aa4cdc8f64fd98503","unresolved":false,"context_lines":[{"line_number":100,"context_line":"            return False"},{"line_number":101,"context_line":"    elif op \u003d\u003d \u0027!\u003d\u0027:"},{"line_number":102,"context_line":"        if val !\u003d os.environ[var]:"},{"line_number":103,"context_line":"            return False"},{"line_number":104,"context_line":"    else:"},{"line_number":105,"context_line":"        print(\"Malformed when op: %s\" % op)"},{"line_number":106,"context_line":"        sys.exit(1)"}],"source_content_type":"application/octet-stream","patch_set":10,"id":"3f79a3b5_a50de83f","line":103,"in_reply_to":"3f79a3b5_a5988818","updated":"2018-11-28 00:50:05.000000000","message":"agree; i\u0027ve got the test-cases around the wrong way","commit_id":"fd9027bfc246401686894c553e3b2dd72450fd48"},{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"cd56ad34f5669d385a3928b20fbd92527efb43ad","unresolved":false,"context_lines":[{"line_number":130,"context_line":"                                    dib_py_version \u003d\u003d dib_py_version_env)"},{"line_number":131,"context_line":""},{"line_number":132,"context_line":"        # True means install, false skip"},{"line_number":133,"context_line":"        if _when(params.get(\u0027when\u0027, None)) is False:"},{"line_number":134,"context_line":"            logger.debug(\"Skipped due to when: %s/%s\" %"},{"line_number":135,"context_line":"                         (element_name, pkg_name))"},{"line_number":136,"context_line":"            continue"}],"source_content_type":"application/octet-stream","patch_set":10,"id":"3f79a3b5_4583b4aa","line":133,"updated":"2018-11-28 00:39:00.000000000","message":"This check for False is why the above returns should be True.","commit_id":"fd9027bfc246401686894c553e3b2dd72450fd48"}],"diskimage_builder/elements/package-installs/tests/test_package_squash.py":[{"author":{"_account_id":4146,"name":"Clark Boylan","email":"cboylan@sapwetik.org","username":"cboylan"},"change_message_id":"cd56ad34f5669d385a3928b20fbd92527efb43ad","unresolved":false,"context_lines":[{"line_number":103,"context_line":"        \u0027\u0027\u0027Exercise the skip_when flag\u0027\u0027\u0027"},{"line_number":104,"context_line":"        objs \u003d {"},{"line_number":105,"context_line":"            \u0027skipped_package\u0027: {"},{"line_number":106,"context_line":"                \u0027when\u0027: \u0027DIB_FEATURE\u003d1\u0027"},{"line_number":107,"context_line":"            },"},{"line_number":108,"context_line":"            \u0027not_skipped_package\u0027: {"},{"line_number":109,"context_line":"                \u0027when\u0027: \u0027DIB_FEATURE\u003d0\u0027"}],"source_content_type":"text/x-python","patch_set":10,"id":"3f79a3b5_a5b16892","line":106,"range":{"start_line":106,"start_character":37,"end_line":106,"end_character":38},"updated":"2018-11-28 00:39:00.000000000","message":"This should be 0 then not skipped package below should be 1 to not skip it. And so on.","commit_id":"fd9027bfc246401686894c553e3b2dd72450fd48"}],"releasenotes/notes/skip-packages-env-c97e7b4820f9bfda.yaml":[{"author":{"_account_id":13252,"name":"Dr. Jens Harbott","display_name":"Jens Harbott (frickler)","email":"frickler@offenerstapel.de","username":"jrosenboom"},"change_message_id":"10337cf84841746179f3f8bf371cf73223d2d39d","unresolved":false,"context_lines":[{"line_number":1,"context_line":"---"},{"line_number":2,"context_line":"features:"},{"line_number":3,"context_line":"  - |"},{"line_number":4,"context_line":"    The `package-installs` element now supports skipping installation"},{"line_number":5,"context_line":"    of packages based on an environment variable specified in the"},{"line_number":6,"context_line":"    config file.  See the `package-installs` element documentation for"},{"line_number":7,"context_line":"    full details."}],"source_content_type":"text/x-yaml","patch_set":13,"id":"dfd5e7cf_160a9ed1","line":4,"updated":"2019-01-08 06:58:40.000000000","message":"Maybe s/skipping/conditional/ would fit better now.","commit_id":"c52c383f1bbbff137b5f8324ddbf62c2416c940f"}]}
