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.
Created attachment 59422 [details, diff] attr_copy_file-suppress-warning.patch
*** This bug has been marked as a duplicate of 93348 ***