Bug 56097 - rpm --rebuild fails with fileutils 4.1.1
Summary: rpm --rebuild fails with fileutils 4.1.1
Alias: None
Product: Red Hat Raw Hide
Classification: Retired
Component: fileutils
Version: 1.0
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Bernhard Rosenkraenzer
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-11-12 19:58 UTC by Bernhard Rosenkraenzer
Modified: 2008-05-01 15:38 UTC (History)
2 users (show)

Clone Of:
Last Closed: 2001-11-19 20:30:30 UTC

Attachments (Terms of Use)

Description Bernhard Rosenkraenzer 2001-11-12 19:58:20 UTC
Ends in a number of errors:
mv: will not overwrite just-created [file] with [file].

I haven't had the time to debug this completely; it might be a bug in the 
new cp, but I believe it's caused by another intentional 
(POSIX-compliance induced) madness.

Comment 1 Trond Eivind Glomsrxd 2001-11-14 17:11:14 UTC
And what issue would that be?

Comment 2 Bernhard Rosenkraenzer 2001-11-14 17:14:27 UTC
Loads of
mv: will not overwrite just-created [file] with [file].
errors during make install (basically one for every file).

Try upgrading fileutils to the version in the rawhide tree and rebuilding mx 
to see for yourself.

Might still be a fileutils issue; I'll debug this once the S390 stuff is done, 
unless you beat me to it.

Comment 3 Trond Eivind Glomsrxd 2001-11-14 17:16:49 UTC
I was thinking of what the POSIX compliance issue would be... I've never seen
Posix demand "don't do what the user say" before.

Comment 4 Bernhard Rosenkraenzer 2001-11-14 17:26:53 UTC
Suspicious items from the changelog:

* mv now prompts before overwriting an existing, unwritable destination file
    when stdin is a tty, unless --force (-f) is specified, as per POSIX.
    [doesn't state what it does when stdin isn't a tty]
* cp's -P option now means the same as --no-dereference, per POSIX.
    Use --parents to get the old meaning.

Comment 5 Trond Eivind Glomsrxd 2001-11-14 17:30:23 UTC
Is stdin really a tty when using rpm to build a package?

Comment 6 Jeff Johnson 2001-11-14 17:39:47 UTC
rpm does not change stdin, only dup's fd #0 for running scripts. So stdin
is whatever it is/was when rpm is/was invoked.

Comment 7 Bernhard Rosenkraenzer 2001-11-14 17:55:26 UTC
The error seems genuine; just looked through the cp code causing the message:

              /* Don't let the user destroy their data, even if they try hard:
                 This mv command must fail (likewise for cp):
                   rm -rf a b c; mkdir a b c; touch a/f b/f; mv a/f b/f c
                 Otherwise, the contents of b/f would be lost.
                 In the case of `cp', b/f would be lost if the user simulated
                 a move using cp and rm.
                 Note that it works fine if you use --backup=numbered.  */
              if (command_line_arg
                  && x->backup_type != numbered
                  && seen_dest (dst_path, dst_sb))
                  error (0, 0,
                         _("will not overwrite just-created %s with %s"),
                         quote_n (0, dst_path), quote_n (1, src_path));
                  return 1;

Comment 8 Trond Eivind Glomsrxd 2001-11-15 17:31:19 UTC
So this is a fileutils bug? It certainly looks like one...

Comment 9 Trond Eivind Glomsrxd 2001-11-15 17:34:34 UTC
Reassigning component.

Comment 10 Bernhard Rosenkraenzer 2001-11-27 16:49:39 UTC
Fixed in 4.1.2-2.

Note You need to log in before you can comment on or make changes to this bug.