This disables messages like this when trying to install a gem:

  A new release of RubyGems is available: 3.4.1 - 3.4.2!
  Run `gem update --system 3.4.2` to update your installation.

I'll be committing this in a couple days unless I hear objections.

Thanks,
Jeremy

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/ruby/3.2/Makefile,v
retrieving revision 1.1.1.1
diff -u -p -r1.1.1.1 Makefile
--- Makefile    26 Dec 2022 03:03:57 -0000      1.1.1.1
+++ Makefile    5 Jan 2023 00:20:54 -0000
@@ -3,6 +3,7 @@ DISTNAME =              ruby-${VERSION}
 SHARED_LIBS =          ruby32  0.0
 NEXTVER =              3.3
 PKGSPEC-main ?=         ruby->=3.2.0,<${NEXTVER}
+REVISION-main =                0
 
 PSEUDO_FLAVORS=                no_ri_docs bootstrap
 # Do not build the RI docs on slow arches
Index: patches/patch-lib_rubygems_update_suggestion_rb
===================================================================
RCS file: patches/patch-lib_rubygems_update_suggestion_rb
diff -N patches/patch-lib_rubygems_update_suggestion_rb
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-lib_rubygems_update_suggestion_rb     5 Jan 2023 00:20:54 
-0000
@@ -0,0 +1,22 @@
+Avoid printing of nagging update message:
+
+  A new release of RubyGems is available: 3.4.1 - 3.4.2!
+  Run `gem update --system 3.4.2` to update your installation.
+
+When using the OpenBSD port, important updates to rubygems will
+be distributed via normal updates to the related ruby ports.
+
+return false while true is used instead of plain return false to
+avoid the statement not reached verbose mode warning.
+
+Index: lib/rubygems/update_suggestion.rb
+--- lib/rubygems/update_suggestion.rb.orig
++++ lib/rubygems/update_suggestion.rb
+@@ -31,6 +31,7 @@ Run `gem update --system #{Gem.latest_rubygems_version
+   # Determines if current environment is eglible for update suggestion.
+ 
+   def eglible_for_update?
++    return false while true
+     # explicit opt-out
+     return false if Gem.configuration[:prevent_update_suggestion]
+     return false if ENV["RUBYGEMS_PREVENT_UPDATE_SUGGESTION"]

Reply via email to