Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
For bugs related to Red Hat Enterprise Linux 5 product line. The current stable release is 5.10. For Red Hat Enterprise Linux 6 and above, please visit Red Hat JIRA https://issues.redhat.com/secure/CreateIssue!default.jspa?pid=12332745 to report new issues.

Bug 515499

Summary: Incorrect output of ls -1U with more than one argument
Product: Red Hat Enterprise Linux 5 Reporter: Ondrej Vasik <ovasik>
Component: coreutilsAssignee: Ondrej Vasik <ovasik>
Status: CLOSED ERRATA QA Contact: qe-baseos-daemons
Severity: medium Docs Contact:
Priority: medium    
Version: 5.3CC: asersen, azelinka, kdudka, rvokal
Target Milestone: rcKeywords: Regression
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: coreutils-5.97-28.el5 Doc Type: Bug Fix
Doc Text:
Previously, when the "ls -1U" command was called with two or more arguments and with at least one non-empty directory as an argument, directory entry names were printed before the name of their parent directories. This bug has been fixed and now the entries are printed in correct order.
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-07-21 10:35:24 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Ondrej Vasik 2009-08-04 15:01:08 UTC
Description of problem:
Due to the fix of #441807, ls -1U (with two or more arguments, at least one a nonempty directory) would print entry names *before* the name of the containing directory. It affects also incorrect output of ls -1RU and ls -1sU.

Version-Release number of selected component (if applicable):
coreutils-5.97-15.el5 and later

How reproducible:
always

Steps to Reproduce:
1. have two dirs with files (e.g. foo and bar)
2. ls -1U foo bar

  
Actual results:
Entries are printed before the name of the directory.

Expected results:
Name is printed before the entries.

Additional info:
Although it is regression, impact is quite low. Anyway it could cause issues in some scripts, so it's worth to fix it.

Comment 3 Kamil Dudka 2009-08-05 08:12:07 UTC
Corresponding test-case written by Jim Meyering:
http://git.savannah.gnu.org/cgit/coreutils.git/commit/?id=5874a8215deb28918a049ba24c4335f7a7fb74e1

Comment 11 Tomas Capek 2011-07-13 12:10:38 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
Previously, when the "ls -1U" command was called with two or more arguments and with at least one non-empty directory as an argument, directory entry names were printed before the name   of their parent directories. This bug has been fixed and now the entries are printed in correct order.

Comment 12 errata-xmlrpc 2011-07-21 10:35:24 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1074.html

Comment 13 errata-xmlrpc 2011-07-21 12:10:43 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1074.html