** Description changed:

+ [ Impact ]
+ 
+ One of ranger's most useful facilities (bulkrename) fails to operate
+ entirely.
+ 
+ [ Test Plan ]
+ 
+ For the affected $series:
+ 
+ * lxc launch ubuntu:$series renametest
+ * lxc shell renametest
+ * apt update && apt install ranger
+ * touch foo bar baz
+ * ranger
+ * Select "bar" and "baz" files with space
+ * :bulkrename (start bulk-rename operation)
+ * Edit "bar" and "baz" to something else, e.g. "far" and "faz"
+ * Exit the editor
+ * Observe failure with error message "endwin() returned ERR" on the bottom 
line
+ * q (exit ranger)
+ 
+ Upgrade to proposed version and re-test:
+ 
+ * apt install -t $[series}-proposed ranger
+ * ranger
+ * Select "bar" and "baz" files with space
+ * :bulkrename
+ * Edit "bar" and "baz" to something else, e.g. "far" and "faz"
+ * Exit the editor
+ * Editor appears showing proposed "mv" operations
+ * Exit the editor
+ * Observe files are renamed
+ 
+ Test open_with command too:
+ 
+ * Select "bar" file with space
+ * :open_with vim
+ * Ensure editor opens successfully
+ * :q
+ * Ensure ranger re-appears successfully
+ 
+ [ Regression Potential ]
+ 
+ The patch is proposed (but not yet applied) as a PR upstream. It is
+ minimal, affecting a single curses call, and suppressing an error
+ condition newly introduced in recent versions of the library. The test
+ plan covers ensuring that the failure is manifest, and fixed by the
+ proposed change.
+ 
+ To the best of my knowledge, the bulkrename command is the only one in
+ ranger that calls execute_file (part of the affected path) *twice* in
+ its operation and, thus, is the only affected command. However, the plan
+ includes testing another command using this path (open_with) to ensure
+ commands calling this *once* are unaffected.
+ 
+ The package has no reverse dependencies.
+ 
+ [ Original Description ]
+ 
  As noted in [1]  the ncurses version in Ubuntu noble (and presumably
  oracular, though I haven't checked this yet) breaks the (extremely
  useful) bulkrename command. The proposed fix in [2] works, but reading
  the associated thread [3] indicates it's possible that ranger is
  incorrectly calling curses.endwin() multiple times.
  
  That said, having read through the code I can't see where ranger *is*
  calling endwin() multiple times [4], and the purpose of the function
  that's failing (ui.suspend) is clearly to disable curses while an
  external application that wants the display (e.g. vim) is executed, so
  there's no harm in simply ignoring an error from curses.endwin().
  
  [1]: https://github.com/ranger/ranger/issues/2934
  
  [2]: https://github.com/ranger/ranger/pull/2935
  
  [3]: https://www.mail-archive.com/debian-bugs-
  d...@lists.debian.org/msg1944374.html
  
  [4]: bulkrename executes the external editor twice and it's the *second*
  invocation that leads to the failure, which is presumably where endwin
  is being called twice, but ui.initialize (which sets up curses all over
  again) *is* being called between the two invocations ... which should be
  valid?

** Changed in: ranger (Ubuntu)
       Status: New => Triaged

** Changed in: ranger (Ubuntu Noble)
       Status: New => Triaged

** Changed in: ranger (Ubuntu Oracular)
       Status: New => Triaged

** Changed in: ranger (Ubuntu)
     Assignee: (unassigned) => Dave Jones (waveform)

** Changed in: ranger (Ubuntu Noble)
     Assignee: (unassigned) => Dave Jones (waveform)

** Changed in: ranger (Ubuntu Oracular)
     Assignee: (unassigned) => Dave Jones (waveform)

** Changed in: ranger (Ubuntu)
   Importance: Undecided => Medium

** Changed in: ranger (Ubuntu Noble)
   Importance: Undecided => Medium

** Changed in: ranger (Ubuntu Oracular)
   Importance: Undecided => Medium

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2086744

Title:
  [SRU] bulkrename fails with newer curses

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/ranger/+bug/2086744/+subscriptions


-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to