← Back to team overview

pkg-perl-maintainers team mailing list archive

[Bug 1519495] [NEW] rename (prename) ignores -n parameter in Xenial Daily

 

Public bug reported:

Xenial Daily with updates applied up to 2015-11-24 20:50 GMT

The perl rename function (aka prename) appears to rename files even when
the -n parameter is supplied. The -n parameter is supposed to make it
display possible changes, but not actually rename files (no action).

Unfortunately in the latest Xenial Daily it ignores the -n and goes
ahead and renames the files.

This also applies to the long option --no-act

Example:

touch oldname
rename "s/oldname/newname/" * -n
ls

What I expected to happen:
* The command should return "oldname renamed as newname"
* The listing should show the file "oldname"

What actually happens::
* The command returns nothing
* The listing shows the file "newname"

Also note that even without the -n parameter - i.e. when I deliberately
*want* to make the change - the command still does not return anything.
Normally it would return "oldname renamed as newname".

perl --version shows:
This is perl 5, version 20, subversion 2 (v5.20.2) built for x86_64-linux-gnu-thread-multi

rename -V shows:
/usr/bin/rename using File::Rename version 0.20

I am wondering whether this is some kind of clash between the rename
package and the perl package. Xenial seems to be very confused about
which version of rename it has installed.

Now try the test case using the exact spelling "prename". The test case
now works as expected. In previous LTS versions of Ubuntu, prename and
rename were one and the same program.

Try the following:
man rename
man prename

Note the differences in parameters (e.g. --nono vs. --no-act) Both of
these commands claim to be Perl rename.

In the the previous LTS version of Ubuntu, 14.04, doing man rename and
man prename gave identical results. My test case above worked as
expected under 14.04 .

Also note that despite the 16.04 man pages and 14.04 man pages stating
that the -n parameter has to be provided *before* the expression and
files, under 14.04 (and for as long as I can remember, possibly back to
6.06) it worked fine providing the -n parameter *after* the other
arguments.

(I only test LTS releases. This bug may or may not have been extant in
14.10,15.04,15.10 )

Thank-you for your time examining this bug. Having a stable LTS Ubuntu
is important to me; genuine thanks.

** Affects: rename (Ubuntu)
     Importance: Undecided
         Status: New

** Package changed: usb-creator (Ubuntu) => rename (Ubuntu)

-- 
You received this bug notification because you are a member of Debian
Perl Group, which is subscribed to rename in Ubuntu.
https://bugs.launchpad.net/bugs/1519495

Title:
  rename (prename) ignores -n parameter in Xenial Daily

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


Follow ups