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

Add Gem.disable_system_update_message to disable gem update --system if needed. #3720

Merged
merged 2 commits into from
Jun 15, 2020

Conversation

simi
Copy link
Member

@simi simi commented Jun 13, 2020

This is initial take on possibility to disable gem update --system useful for distribution maintainers.

For Debian, this can be set at https://salsa.debian.org/ruby-team/rubygems-integration/-/blob/39d3a082f568ec0b6c9acd10e54a4a31a08bd8b5/lib/rubygems/defaults/operating_system.rb#L56. End-users can disable this by providing DEBIAN_DISABLE_RUBYGEMS_INTEGRATION as they can do that already for the rest of integration patches.

For Fedora, this can be set at https://src.fedoraproject.org/rpms/rubygems/blob/master/f/operating_system.rb. Not sure if any env variable is needed to make users able to disable this.

@terceiro (Debian ruby maintainer) @voxik (Fedora ruby maintainer), would this be useful for you ❓

example

# operating_system.rb
if Gem.respond_to?(:disable_system_update_message=)
  Gem.disable_system_update_message = 'RubyGems is updated by system package manager. Please use "abc update rubygems" instead.'
end
[retro@retro  rubygems (disable-update *%=)]❤ gem update --system
ERROR:  RubyGems is updated by system package manager. Please use "abc update rubygems" instead.

@terceiro
Copy link
Contributor

would this be useful for you ?

yes

@voxik
Copy link
Contributor

voxik commented Jun 14, 2020

LGTM

@simi simi marked this pull request as ready for review June 15, 2020 08:35
Copy link
Member

@deivid-rodriguez deivid-rodriguez left a comment

Choose a reason for hiding this comment

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

Neat stuff!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants