Bug 56097 - rpm --rebuild fails with fileutils 4.1.1
rpm --rebuild fails with fileutils 4.1.1
Status: CLOSED RAWHIDE
Product: Red Hat Raw Hide
Classification: Retired
Component: fileutils (Show other bugs)
1.0
i386 Linux
medium Severity medium
: ---
: ---
Assigned To: Bernhard Rosenkraenzer
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2001-11-12 14:58 EST by Bernhard Rosenkraenzer
Modified: 2008-05-01 11:38 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-11-19 15:30:30 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Bernhard Rosenkraenzer 2001-11-12 14:58:20 EST
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 12:11:14 EST
And what issue would that be?
Comment 2 Bernhard Rosenkraenzer 2001-11-14 12:14:27 EST
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 12:16:49 EST
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 12:26:53 EST
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 12:30:23 EST
Is stdin really a tty when using rpm to build a package?
Comment 6 Jeff Johnson 2001-11-14 12:39:47 EST
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 12:55:26 EST
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 12:31:19 EST
So this is a fileutils bug? It certainly looks like one...
Comment 9 Trond Eivind Glomsrxd 2001-11-15 12:34:34 EST
Reassigning component.
Comment 10 Bernhard Rosenkraenzer 2001-11-27 11:49:39 EST
Fixed in 4.1.2-2.

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