Skip to content
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

Improve the Debian/Ubuntu instructions for adding the OBS repository #1189

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/views/download/package.erb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ pacman -Sy <%= repo_name %>/<%= @package %></pre>
<pre><%=
# don't use apt-add-repository wrapper for Ubuntu for now, because it adds source repo which we don't provide
# "apt-add-repository deb #{v[:repo]} /\napt-get update\napt-get install #{@package}"
"echo 'deb #{v[:repo].gsub(/(\w):(\w)/, '\1:/\2').gsub(/^https/, 'http')} /' | sudo tee /etc/apt/sources.list.d/#{@project}.list\ncurl -fsSL #{v[:repo]}Release.key | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/#{@project.gsub(':', '_')}.gpg > /dev/null\nsudo apt update\nsudo apt install #{@package}"
"echo 'deb [ signed-by=/usr/share/keychain/#{@project.gsub(':', '_')}.gpg ] #{v[:repo].gsub(/(\w):(\w)/, '\1:/\2').gsub(/^https/, 'http')} /' | sudo tee /etc/apt/sources.list.d/#{@project}.list\nwget #{v[:repo]}Release.key -O - | gpg --dearmor | sudo tee /usr/share/keychain/#{@project.gsub(':', '_')}.gpg > /dev/null\nsudo apt update\nsudo apt install #{@package}"
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
"echo 'deb [ signed-by=/usr/share/keychain/#{@project.gsub(':', '_')}.gpg ] #{v[:repo].gsub(/(\w):(\w)/, '\1:/\2').gsub(/^https/, 'http')} /' | sudo tee /etc/apt/sources.list.d/#{@project}.list\nwget #{v[:repo]}Release.key -O - | gpg --dearmor | sudo tee /usr/share/keychain/#{@project.gsub(':', '_')}.gpg > /dev/null\nsudo apt update\nsudo apt install #{@package}"
"echo 'deb [ signed-by=/usr/share/keychain/#{@project.gsub(':', '_')}.gpg ] #{v[:repo].gsub(/(\w):(\w)/, '\1:/\2').gsub(/^https/, 'http')} /' | sudo tee /etc/apt/sources.list.d/#{@project}.list\nwget #{v[:repo]}Release.key -O - | gpg --dearmor | sudo tee /usr/share/keyrings/#{@project.gsub(':', '_')}.gpg > /dev/null\nsudo apt update\nsudo apt install #{@package}"

If the MR moves forward

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The path appears twice and you only changed one. 😉

%></pre>
<% else %>
<h5><%= (_("For <strong>%s</strong> run the following as <strong>root</strong>:") % k.gsub('_', '&nbsp;').html_safe).html_safe %></h5>
Expand Down