Skip to contentSkip to conversation

archiver: Don't try to preserve all attributes when copying files

PATCH New Richard Purdie 1 participant 1 message Apr 1

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 archiver: Don't try to preserve all attributes when copying files

Similar to https://git.openembedded.org/bitbake/commit/?id=2f35dac0c821ab231459922ed98e1b2cc599ca9a
there is a problem in this code when copying from an NFS mount.

We currently use cp -p, which is a shortcut for --preserve=mode,ownership,timestamps. We shouldn't need to preserve mode/ownership, only timestamps. Update the code in the same way the bitbake fetcher was fixed for consistency.

This fixes build failures on OpenSUSE 16.0.

---
 meta/classes/archiver.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/classes/archiver.bbclass +1 -1
index d963d28f432..1f1ee45bd7a 100644
@@ -398,7 +398,7 @@ python do_ar_mirror() {
 
         # We now have an appropriate localpath
         bb.note('Copying source mirror')
-        cmd = 'cp -fpPRH %s %s' % (localpath, destdir)
+        cmd = 'cp --force --preserve=timestamps --no-dereference --recursive -H %s %s' % (localpath, destdir)
         subprocess.check_call(cmd, shell=True)
 }