Bug 1215637

Summary: EditUserDialog: undefined method `exists?' for Dir:Class
Product: [openSUSE] openSUSE Tumbleweed Reporter: Christopher Yeleighton <giecrilj>
Component: YaST2Assignee: E-mail List <yast2-maintainers>
Status: RESOLVED FIXED QA Contact: Jiri Srain <jsrain>
Severity: Normal    
Priority: P5 - None    
Version: Current   
Target Milestone: ---   
Hardware: x86-64   
OS: openSUSE Tumbleweed   
Whiteboard:
Found By: Community User Services Priority:
Business Priority: Blocker: ---
Marketing QA Status: --- IT Deployment: ---

Description Christopher Yeleighton 2023-09-23 20:12:44 UTC
> Internal error. Please report a bug report with logs.
> Run save_y2logs to get complete logs.
> 
> Caller: /usr/share/YaST2/include/users/dialogs.rb:1329:in `EditUserDialog'
> 
> Details: undefined method `exists?' for Dir:Class

This is what happens when I tell user editor to open the chooser for the home directory.
Note that choosing SAMBA shares does not crash.
Comment 1 Stefan Hundhammer 2023-09-25 07:34:27 UTC
IIRC there was a change in recent Ruby versions where 'Dir.exists?' was deprecated and now possibly removed. Ruby insists on their slightly broken English with 'xy.exist?', and now they removed that compatibility version IIRC.

Samba shares might be different in that they might not be mounted at that time (relying on the automounter).

I'll have a look.
Comment 2 Stefan Hundhammer 2023-09-25 12:26:05 UTC
https://rubyreferences.github.io/rubychanges/3.2.html#removals

"Removals

Methods:

Dir.exists?, File.exists? 
(deprecated since 2.1 as a general rule of having 
“bare verb” as a method name)"
Comment 3 Stefan Hundhammer 2023-09-25 12:32:36 UTC
Confirmed on TW which now uses Ruby 3.2.2.
Comment 4 Stefan Hundhammer 2023-09-25 12:45:51 UTC
Fix:

https://github.com/yast/yast-users/pull/391

This will arrive in Factory / TW as yast2-users-5.0.1.
Comment 5 OBSbugzilla Bot 2023-09-26 10:35:20 UTC
This is an autogenerated message for OBS integration:
This bug (1215637) was mentioned in
https://build.opensuse.org/request/show/1113640 Factory / yast2-users