{"action":"created","issue":{"url":"https://api.github.com/repos/openwrt/openwrt/issues/805","repository_url":"https://api.github.com/repos/openwrt/openwrt","labels_url":"https://api.github.com/repos/openwrt/openwrt/issues/805/labels{/name}","comments_url":"https://api.github.com/repos/openwrt/openwrt/issues/805/comments","events_url":"https://api.github.com/repos/openwrt/openwrt/issues/805/events","html_url":"https://github.com/openwrt/openwrt/pull/805","id":306118469,"number":805,"title":"base-files: fix UCI config parsing and callback handling","user":{"login":"guidosarducci","id":14342969,"avatar_url":"https://avatars0.githubusercontent.com/u/14342969?v=4","gravatar_id":"","url":"https://api.github.com/users/guidosarducci","html_url":"https://github.com/guidosarducci","followers_url":"https://api.github.com/users/guidosarducci/followers","following_url":"https://api.github.com/users/guidosarducci/following{/other_user}","gists_url":"https://api.github.com/users/guidosarducci/gists{/gist_id}","starred_url":"https://api.github.com/users/guidosarducci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidosarducci/subscriptions","organizations_url":"https://api.github.com/users/guidosarducci/orgs","repos_url":"https://api.github.com/users/guidosarducci/repos","events_url":"https://api.github.com/users/guidosarducci/events{/privacy}","received_events_url":"https://api.github.com/users/guidosarducci/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-03-17T01:46:24Z","updated_at":"2018-03-17T02:54:46Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/openwrt/openwrt/pulls/805","html_url":"https://github.com/openwrt/openwrt/pull/805","diff_url":"https://github.com/openwrt/openwrt/pull/805.diff","patch_url":"https://github.com/openwrt/openwrt/pull/805.patch"},"body":"There are several long-standing issues present in the UCI shell API as\r\ndocumented in https://wiki.openwrt.org/doc/devel/config-scripting. They\r\nrelate both to high-level, user-defined callback functions used to\r\nprocess UCI config files, and also to low-level functions used within\r\nscripts generally.\r\n\r\nThe related problems have been encountered now and in the past, e.g.\r\nhttps://forum.openwrt.org/viewtopic.php?id=54295, and include:\r\n\r\na) UCI parsing `option()` function and user-defined `option_cb()` callbacks\r\nbeing erroneously called during processing of \"list\" config file entries;\r\n\r\nb) normal usage of the low-level `config_set()` unexpectedy calling any\r\ndefined `option_cb()` if present; and\r\n\r\nc) handling of the `list_cb()` not respecting the `NO_CALLBACK` variable.\r\n\r\nRoot causes include a function stack \"inversion\", where the low-level\r\n`config_set()` function incorrectly calls the high-level `option()` function,\r\nintended only for processing the \"option\" keyword of UCI config files.\r\n\r\nThis change addresses the inversion and other issues, making the option\r\nhandling code more consistent and smaller, and simplifying developers'\r\nusage of UCI callbacks.\r\n\r\nSigned-off-by: Tony Ambardar <itugrok@yahoo.com>\r\n\r\nTested on LEDE 17.01.4 (ar71xx) as part of converting a package to use UCI callback processing."},"comment":{"url":"https://api.github.com/repos/openwrt/openwrt/issues/comments/373889307","html_url":"https://github.com/openwrt/openwrt/pull/805#issuecomment-373889307","issue_url":"https://api.github.com/repos/openwrt/openwrt/issues/805","id":373889307,"user":{"login":"guidosarducci","id":14342969,"avatar_url":"https://avatars0.githubusercontent.com/u/14342969?v=4","gravatar_id":"","url":"https://api.github.com/users/guidosarducci","html_url":"https://github.com/guidosarducci","followers_url":"https://api.github.com/users/guidosarducci/followers","following_url":"https://api.github.com/users/guidosarducci/following{/other_user}","gists_url":"https://api.github.com/users/guidosarducci/gists{/gist_id}","starred_url":"https://api.github.com/users/guidosarducci/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/guidosarducci/subscriptions","organizations_url":"https://api.github.com/users/guidosarducci/orgs","repos_url":"https://api.github.com/users/guidosarducci/repos","events_url":"https://api.github.com/users/guidosarducci/events{/privacy}","received_events_url":"https://api.github.com/users/guidosarducci/received_events","type":"User","site_admin":false},"created_at":"2018-03-17T02:54:46Z","updated_at":"2018-03-17T02:54:46Z","author_association":"CONTRIBUTOR","body":"@dedeckeh There seems to be an early build/check problem unrelated to my code, with the git drone unable to access the PR:\r\n```\r\n[info] Pulling image plugins/drone-git:latest\r\nDrone Git Plugin built from 43dcd64\r\n$ git init\r\nInitialized empty Git repository in /drone/src/github.com/openwrt/openwrt/.git/\r\n$ git remote add origin https://github.com/openwrt/openwrt.git\r\n$ git fetch --no-tags origin +refs/pull/805/merge:\r\nfatal: Couldn't find remote ref refs/pull/805/merge\r\n[info] build failed (exit code 1)\r\n```\r\nHoping you can help get to the bottom of things..."}}
{"actor":{"display_login":"guidosarducci"}}