Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 93389

Summary: [patch] coreutils and user_attr
Product: Gentoo Linux Reporter: Federico Ferri (RETIRED) <mescalinum>
Component: [OLD] Core systemAssignee: Gentoo Linux bug wranglers <bug-wranglers>
Status: RESOLVED DUPLICATE    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: attr_copy_file-suppress-warning.patch

Description Federico Ferri (RETIRED) gentoo-dev 2005-05-20 17:58:53 UTC
when using user_attr, and copying files from a filesystem with xattrs to a
filesystem without xattrs, cp gererates errors.

Reproducible: Always
Steps to Reproduce:
1.x is on a fs with extended attributes
2./var/tmp doesn't have extended attributes
3.$ cp x /var/tmp

Actual Results:  
        $ cp x /var/tmp
        cp: setting attribute `user.Beagle.Uid' for `/var/tmp/x':
        Operation not supported
        cp: setting attribute `user.Beagle.MTime' for `/var/tmp/x':
        Operation not supported
        cp: setting attribute `user.Beagle.IndexTime' for `/var/tmp/x':
        Operation not supported
        cp: setting attribute `user.Beagle.Fingerprint' for
        `/var/tmp/x': Operation not supported

Expected Results:  
        $ cp x /var/tmp
        cp: Metadata will be lost, setting attributes for `/var/tmp/x':
        Operation not supported

From: Robert Love <rml@novell.com>
Subject: cp metadata error fix.
To: Nat Friedman <nat@novell.com>
In-Reply-To: <1116568394.15160.14.camel@linux.site>

On Fri, 2005-05-20 at 01:53 -0400, Nat Friedman wrote:

> It's a pretty scary set of warnings.  It would be much nicer if cp said
> 
>         Warning: /media/USB_DISK does not support extended attributes;
>         metadata will be lost.
>         
> instead of printing one warning per EA.  We should follow up with the
> fileutils people.

s/fileutils/coreutils, these days.

Anyhow, I looked into it.  The error is actually generated in the
libattr function attr_copy_file().

I fixed it.  We now have

        $ cp x /var/tmp
        cp: Metadata will be lost, setting attributes for `/var/tmp/x':
        Operation not supported

Instead of

        $ cp x /var/tmp
        cp: setting attribute `user.Beagle.Uid' for `/var/tmp/x':
        Operation not supported
        cp: setting attribute `user.Beagle.MTime' for `/var/tmp/x':
        Operation not supported
        cp: setting attribute `user.Beagle.IndexTime' for `/var/tmp/x':
        Operation not supported
        cp: setting attribute `user.Beagle.Fingerprint' for
        `/var/tmp/x': Operation not supported

Find a patch to libattr attached.
Comment 1 Federico Ferri (RETIRED) gentoo-dev 2005-05-20 17:59:36 UTC
Created attachment 59422 [details, diff]
attr_copy_file-suppress-warning.patch
Comment 2 SpanKY gentoo-dev 2005-05-20 18:11:30 UTC

*** This bug has been marked as a duplicate of 93348 ***