Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 150224 - sys-apps/coreutils-6.{2,3} - misbehaviour of "mkdir -pv"
Summary: sys-apps/coreutils-6.{2,3} - misbehaviour of "mkdir -pv"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-10-05 19:00 UTC by Lars Wendler (Polynomial-C) (RETIRED)
Modified: 2006-10-06 16:11 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2006-10-05 19:00:50 UTC
Hi,

since coreutils-6.2 mkdir behaves imho not correct when using the -pv switch. Just let me explain it with an example:

with mkdir of <coreutils-6.2 when creating a directory-tree you get the following output when using the -v switch:
gamemaster:~ # mkdir -pv foo/bar/foobar/barfoo
mkdir: created directory `foo'
mkdir: created directory `foo/bar'
mkdir: created directory `foo/bar/foobar'
mkdir: created directory `foo/bar/foobar/barfoo'
gamemaster:~ # 

but with mkdir of >=coreutils-6.2 the -v switch omits leadings directories except for the last leaf in the tree:
gamemaster:~ # mkdir -pv foo/bar/foobar/barfoo
mkdir: created directory `foo'
mkdir: created directory `bar'
mkdir: created directory `foobar'
mkdir: created directory `foo/bar/foobar/barfoo'
gamemaster:~ # 

I don't know if this is a bug or a wanted behaviour. For me it looks like a bug because if mkdir tells me that it created bar and not foo/bar I assume bar was created in ${PWD} and not in ${PWD}/foo as I told mkdir.

Cheers
Poly-C
Comment 1 SpanKY gentoo-dev 2006-10-06 11:37:28 UTC
this is because they rewrote mkdir to fork children when creating directories ...

ive e-mailed upstream about it to see what they think
Comment 2 SpanKY gentoo-dev 2006-10-06 14:11:49 UTC
ok, upstream has fixed this up ... it'll be in the next release

i wont bother backporting the fix since the behavior change is so trivial ;)
Comment 3 Lars Wendler (Polynomial-C) (RETIRED) gentoo-dev 2006-10-06 16:11:57 UTC
No problem. Thanks for your work anyway :)

Cheers
Poly-C