{"action":"created","issue":{"url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/40","repository_url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux","labels_url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/40/labels{/name}","comments_url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/40/comments","events_url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/40/events","html_url":"https://github.com/Microsoft/OMS-Agent-for-Linux/pull/40","id":139407980,"number":40,"title":"Fix createbundle to work with multiple packages present","user":{"login":"niroyb","id":1450009,"avatar_url":"https://avatars.githubusercontent.com/u/1450009?v=3","gravatar_id":"","url":"https://api.github.com/users/niroyb","html_url":"https://github.com/niroyb","followers_url":"https://api.github.com/users/niroyb/followers","following_url":"https://api.github.com/users/niroyb/following{/other_user}","gists_url":"https://api.github.com/users/niroyb/gists{/gist_id}","starred_url":"https://api.github.com/users/niroyb/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/niroyb/subscriptions","organizations_url":"https://api.github.com/users/niroyb/orgs","repos_url":"https://api.github.com/users/niroyb/repos","events_url":"https://api.github.com/users/niroyb/events{/privacy}","received_events_url":"https://api.github.com/users/niroyb/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-03-08T22:10:05Z","updated_at":"2016-03-08T22:22:45Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/pulls/40","html_url":"https://github.com/Microsoft/OMS-Agent-for-Linux/pull/40","diff_url":"https://github.com/Microsoft/OMS-Agent-for-Linux/pull/40.diff","patch_url":"https://github.com/Microsoft/OMS-Agent-for-Linux/pull/40.patch"},"body":"The sed commands fails otherwise because they are invalid when we expand a variable with a multiline string. `sed: -e expression #1, char 59: unterminated 's' command`\r\n`ls` sorts the names alphabetically so `tail -1` will use the latest kit present.\r\n\r\nDiagnostic : There are multiple versions of the same package in the same directory.\r\n```\r\n✔ ~/git/bld-omsagent/omsagent/build [master|✔]\r\n$ find ../ -name *.rpm\r\n../intermediate/Linux_ULINUX_1.0_x64_64_Release/098/omsconfig-1.1.1-114.x64.rpm\r\n../intermediate/Linux_ULINUX_1.0_x64_64_Release/098/omi-1.0.8-4.universal.x64.rpm\r\n../intermediate/Linux_ULINUX_1.0_x64_64_Release/098/omsagent-1.1.0-77.universal.x64.rpm\r\n../intermediate/Linux_ULINUX_1.0_x64_64_Release/098/scx-cimprov-1.6.2-218.universal.x64.rpm\r\n../intermediate/Linux_ULINUX_1.0_x64_64_Release/098/omsagent-1.1.0-80.universal.x64.rpm\r\n../intermediate/Linux_ULINUX_1.0_x64_64_Release/100/omsconfig-1.1.1-114.x64.rpm\r\n../intermediate/Linux_ULINUX_1.0_x64_64_Release/100/omi-1.0.8-4.universal.x64.rpm\r\n../intermediate/Linux_ULINUX_1.0_x64_64_Release/100/omsagent-1.1.0-77.universal.x64.rpm\r\n../intermediate/Linux_ULINUX_1.0_x64_64_Release/100/scx-cimprov-1.6.2-218.universal.x64.rpm\r\n../intermediate/Linux_ULINUX_1.0_x64_64_Release/100/omsagent-1.1.0-80.universal.x64.rpm\r\n```\r\n\r\nManual fix : Remove the old versions.\r\n```\r\nrm ../intermediate/Linux_ULINUX_1.0_x64_64_Release/098/omsagent-1.1.0-77.universal.x64.rpm\r\nrm ../intermediate/Linux_ULINUX_1.0_x64_64_Release/100/omsagent-1.1.0-77.universal.x64.rpm\r\n```\r\n\r\n@Microsoft/omsagent-devs "},"comment":{"url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/comments/193996045","html_url":"https://github.com/Microsoft/OMS-Agent-for-Linux/pull/40#issuecomment-193996045","issue_url":"https://api.github.com/repos/Microsoft/OMS-Agent-for-Linux/issues/40","id":193996045,"user":{"login":"jeffaco","id":13700943,"avatar_url":"https://avatars.githubusercontent.com/u/13700943?v=3","gravatar_id":"","url":"https://api.github.com/users/jeffaco","html_url":"https://github.com/jeffaco","followers_url":"https://api.github.com/users/jeffaco/followers","following_url":"https://api.github.com/users/jeffaco/following{/other_user}","gists_url":"https://api.github.com/users/jeffaco/gists{/gist_id}","starred_url":"https://api.github.com/users/jeffaco/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeffaco/subscriptions","organizations_url":"https://api.github.com/users/jeffaco/orgs","repos_url":"https://api.github.com/users/jeffaco/repos","events_url":"https://api.github.com/users/jeffaco/events{/privacy}","received_events_url":"https://api.github.com/users/jeffaco/received_events","type":"User","site_admin":false},"created_at":"2016-03-08T22:22:45Z","updated_at":"2016-03-08T22:22:45Z","body":"Yeah, I didn't test this case. Usually I don't update the version until I've checked in, at which point I do a full build, which cleanses temporary files.\r\n\r\nSigned off."}}