rename.ul refuses to rename links that don't resolve (regression)
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Debian) |
Fix Released
|
Unknown
|
|||
util-linux (Ubuntu) |
Fix Released
|
Medium
|
Seyeong Kim | ||
Focal |
Fix Released
|
Medium
|
Seyeong Kim | ||
Groovy |
Fix Released
|
Medium
|
Seyeong Kim |
Bug Description
[Impact]
rename.ul refuses to rename links that don't resolve.
bionic rename.ul renames links whether or not they resolve (util-linux 2.31.1-
focal rename.ul refuses to rename links that don't resolve (regression) (util-linux 2.34-0.1ubuntu9).
Eoan is EOL, so removed.
[Test case]
Commit has good test case. I paste it here
Before:
$ touch file-found
$ ln -s file-found symlink-1
$ ./rename sym symbolic- symlink-1 # XPASS.
$ echo $?
0
$ ln -s file-not-found symlink-2
$ ./rename sym symbolic- symlink-2 # FAIL! REGRESSION.
rename: symlink-2: not accessible: No such file or directory
$ echo $?
1
$ ./rename sym symbolic- symlink-3 # XFAIL.
rename: symlink-3: not accessible: No such file or directory
$ echo $?
1
$ touch file-found
$ ./rename found existing file-found # XPASS.
$ echo $?
0
$ ./rename found existing file-not-found # XFAIL.
rename: file-not-found: not accessible: No such file or directory
$ echo $?
1
After:
$ touch file-found
$ ln -s file-found symlink-1
$ ./rename sym symbolic- symlink-1 # XPASS.
$ echo $?
0
$ ln -s file-not-found symlink-2
$ ./rename sym symbolic- symlink-2 # PASS! REGRESSION FIXED.
$ echo $?
0
$ ./rename sym symbolic- symlink-3 # XFAIL.
rename: symlink-3: not accessible: No such file or directory
$ echo $?
1
$ touch file-found
$ ./rename found existing file-found # XPASS.
$ echo $?
0
$ ./rename found existing file-not-found # XFAIL.
rename: file-not-found: not accessible: No such file or directory
$ echo $?
1
[Regression Potential]
This commit changes code that checking accessibility to file or sym link.
If this fails, rename command will not work properly.it could be crashed or causes failure of rename.
[Original Description]
rename.ul refuses to rename links that don't resolve.
bionic rename.ul renames links whether or not they resolve (util-linux 2.31.1-
focal rename.ul refuses to rename links that don't resolve (regression) (util-linux 2.34-0.1ubuntu9).
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: util-linux 2.34-0.1ubuntu9
ProcVersionSign
Uname: Linux 5.4.0-21-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
CasperMD5CheckR
Date: Sat Jul 4 20:38:06 2020
InstallationDate: Installed on 2020-04-05 (90 days ago)
InstallationMedia: Ubuntu 20.04 LTS "Focal Fossa" - Beta amd64 (20200331)
ProcEnviron:
LC_TIME=en_DK.utf8
TERM=screen
PATH=(custom, no user)
LANG=en_US.utf8
SHELL=/bin/bash
SourcePackage: util-linux
UpgradeStatus: No upgrade log present (probably fresh install)
Changed in util-linux (Ubuntu Eoan): | |
assignee: | nobody → Seyeong Kim (seyeongkim) |
Changed in util-linux (Ubuntu Focal): | |
assignee: | nobody → Seyeong Kim (seyeongkim) |
no longer affects: | util-linux (Ubuntu Eoan) |
description: | updated |
Changed in util-linux (Ubuntu Groovy): | |
status: | Confirmed → Fix Committed |
Changed in util-linux (Ubuntu Focal): | |
status: | Confirmed → In Progress |
Changed in util-linux (Debian): | |
status: | Unknown → Fix Released |
tags: | removed: sts-sponsor-mfo |
Hi @gregrwm,
Thanks for reporting this bug/regression.
Patch just submitted upstream to fix it [1].
Let's see how it goes.
cheers,
Mauricio
[1] https:/ /github. com/karelzak/ util-linux/ pull/1095