Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 295654 - =sys-apps/coreutils-8.1 has broken rm with stupid options
Summary: =sys-apps/coreutils-8.1 has broken rm with stupid options
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High critical (vote)
Assignee: Gentoo's Team for Core System packages
URL: http://lists.gnu.org/archive/html/bug...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-12-04 13:06 UTC by Tomáš Chvátal (RETIRED)
Modified: 2009-12-11 20:22 UTC (History)
5 users (show)

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 Tomáš Chvátal (RETIRED) gentoo-dev 2009-12-04 13:06:06 UTC
Steps to reproduce:

Old coreutils: result =  files removed
touch a b c; rm a b "" c; ls
rm: cannot remove `': No such file or directory

New coreutils: result = files still around
touch a b c; rm a b "" c; ls
rm: invalid argument: `'

This breaks up quite few build scripts, so i am going to mask it for now.
(for test examples try to build something from x11)
The reason for removing empty string is that we pass various variables and they might be empty

Please consider applying patch from the URL field and adding new revision with it.

Cheers
Comment 1 SpanKY gentoo-dev 2009-12-04 18:51:49 UTC
i doubt it's causing that many issues.  i'm not going to bother fixing 8.1 because 8.2 is due out shortly.
Comment 2 Matt Whitlock 2009-12-07 04:57:37 UTC
(In reply to comment #0)
> The reason for removing empty string is that we pass various variables and they
> might be empty

The proper way to pass such variables is:

rm a b c ${FOO:+"${FOO}"}

Then if FOO is undefined or empty, no corresponding argument is provided to 'rm' at all.
Comment 3 SpanKY gentoo-dev 2009-12-11 20:22:16 UTC
8.2 is in the tree