Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 01 Mar 2024 07:45:18 +0000
From:      bugzilla-noreply@freebsd.org
To:        ports-bugs@FreeBSD.org
Subject:   [Bug 277410] After upgrading ruby31 to ruby32, portupgrade broke.
Message-ID:  <bug-277410-7788-XBbSCdDO8L@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-277410-7788@https.bugs.freebsd.org/bugzilla/>
References:  <bug-277410-7788@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D277410

Stanislav Sedov <stas@FreeBSD.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |stas@FreeBSD.org

--- Comment #3 from Stanislav Sedov <stas@FreeBSD.org> ---
It looks like File::exists? method got deprecated.

Wonder if you can try the following patch to see if that works for you?


You can patch the installed files in /usr/local/bin/portsclean and
/usr/local/lib/ruby/site_ruby/3.2/pkgtools/pkgtools.rb if that's easier.

---------------------------------------------------------------------------

diff --git a/bin/portsclean b/bin/portsclean
index 322fdb9..dbf2c11 100755
--- a/bin/portsclean
+++ b/bin/portsclean
@@ -282,7 +282,7 @@ def ldconfig_m(*dirs)
   msg =3D " --> Running ldconfig -m"

   dirs.each do |d|
-    dirs.delete(d) if ! (File.exists?(d) && File.stat(d).directory?)
+    dirs.delete(d) if ! (File.exist?(d) && File.stat(d).directory?)
   end

   case dirs.size
diff --git a/lib/pkgtools/pkgtools.rb b/lib/pkgtools/pkgtools.rb
index 97e156b..8300e6a 100644
--- a/lib/pkgtools/pkgtools.rb
+++ b/lib/pkgtools/pkgtools.rb
@@ -524,7 +524,7 @@ def script_path
   # If a fixed/custom script(1) is installed by the port, use that version.
   # See #8
   custom_script =3D "#{PREFIX}/libexec/pkgtools/script"
-  if File.exists?(custom_script)
+  if File.exist?(custom_script)
     $script_path =3D custom_script
   else
     $script_path =3D '/usr/bin/script'

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-277410-7788-XBbSCdDO8L>