{"action":"created","issue":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5357","labels_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5357/labels{/name}","comments_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5357/comments","events_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5357/events","html_url":"https://github.com/travis-ci/travis-ci/issues/5357","id":123676555,"number":5357,"title":"Conditional package installs via APT add-on","user":{"login":"dregad","id":449891,"avatar_url":"https://avatars.githubusercontent.com/u/449891?v=3","gravatar_id":"","url":"https://api.github.com/users/dregad","html_url":"https://github.com/dregad","followers_url":"https://api.github.com/users/dregad/followers","following_url":"https://api.github.com/users/dregad/following{/other_user}","gists_url":"https://api.github.com/users/dregad/gists{/gist_id}","starred_url":"https://api.github.com/users/dregad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dregad/subscriptions","organizations_url":"https://api.github.com/users/dregad/orgs","repos_url":"https://api.github.com/users/dregad/repos","events_url":"https://api.github.com/users/dregad/events{/privacy}","received_events_url":"https://api.github.com/users/dregad/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-12-23T15:18:08Z","updated_at":"2015-12-23T15:55:04Z","closed_at":null,"body":"Greetings,\r\n\r\nI was playing with the new APT addon in .travis.yml as an alternative to sudo apt-get install which I've been using so far.\r\n\r\nI was wondering if there is (or will be) an option to conditionally install packages only when they will actually be needed (e.g. based on evaluation of environment variables).\r\n\r\nThe reason for my request is that we have different types of build depending on circumstances, some of them need specific packages that others do not. For example\r\n- our Documentation builds rely on *publican*, but it's only necessary to run it once, not for every PHP/database back-end combination\r\n- PHP 5.3 tests require a web server, so we currently install Apache, but that's not needed for PHP >= 5.4 as we can use the built-in one\r\n\r\nHere is our [.travis.yml file for reference](https://github.com/mantisbt/mantisbt/blob/master/.travis.yml).\r\n\r\nThanks in advance for your reply.\r\n"},"comment":{"url":"https://api.github.com/repos/travis-ci/travis-ci/issues/comments/166929872","html_url":"https://github.com/travis-ci/travis-ci/issues/5357#issuecomment-166929872","issue_url":"https://api.github.com/repos/travis-ci/travis-ci/issues/5357","id":166929872,"user":{"login":"dregad","id":449891,"avatar_url":"https://avatars.githubusercontent.com/u/449891?v=3","gravatar_id":"","url":"https://api.github.com/users/dregad","html_url":"https://github.com/dregad","followers_url":"https://api.github.com/users/dregad/followers","following_url":"https://api.github.com/users/dregad/following{/other_user}","gists_url":"https://api.github.com/users/dregad/gists{/gist_id}","starred_url":"https://api.github.com/users/dregad/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dregad/subscriptions","organizations_url":"https://api.github.com/users/dregad/orgs","repos_url":"https://api.github.com/users/dregad/repos","events_url":"https://api.github.com/users/dregad/events{/privacy}","received_events_url":"https://api.github.com/users/dregad/received_events","type":"User","site_admin":false},"created_at":"2015-12-23T15:55:03Z","updated_at":"2015-12-23T15:55:03Z","body":"For the record, I'm not using the container-based infra."}}