-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use bash #5
base: default
Are you sure you want to change the base?
Use bash #5
Conversation
- apt-add-repository adds the binaries repository, and misses the sources entry - Add the -s flag to apt-add-repository to add the deb-src entry - Reduce the repetition of the same command.
- use jq for JSON processing - use bash-builtins for processing the output - retain the same logic as the Ruby script
Nice work. It looks like this will prevent the selecting a very different source repo like I encountered in travis-ci/apt-package-safelist/issues/4071 (clang-5.0 became a clang-3.5 request). Ref: its corresponding build https://travis-ci.org/travis-ci/apt-whitelist-checker/builds/219882514#L789 @BanzaiMan, willing to give this pull request a try? |
Happy to help. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry for the delay. If add_sources.rb
is being replaced with the bash equivalent, it is best to remove the file altogether.
@@ -4,15 +4,22 @@ source `dirname $0`/common.sh | |||
|
|||
PKG=$1 | |||
|
|||
fold_start ruby19 "Installing Ruby 1.9.1" |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
Just a heads-up: I saw another Ruby script doing something similar in another repo - https://github.com/travis-ci/apt-source-whitelist/blob/master/add_all.rb. |
The intent is to (help) address the issue travis-ci/apt-package-safelist#3946 I raised earlier among others. The message pointed to a missing source repository for the given package (mine was g++-6).
On further debugging, I found out that without the -s flag
apt-add-repository
adds thedeb-src
entry under /etc/apt/sources.list.d/,,, commented, unavailable for the subsequent apt commands.In this PR: