summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-02-08 22:16:41 -0600
committerRichard Purdie <rpurdie@linux.intel.com>2011-02-09 22:46:30 +0000
commitd3d236b2bf2784d7454dcb7fce595b6aac6967cd (patch)
tree0c8f5f7a6b8ce9e6a3b20650bc2bd8f739d51da9 /meta
parent3e6d91ece0556fa1c9c84bef60678d8148b789f4 (diff)
downloadpoky-d3d236b2bf2784d7454dcb7fce595b6aac6967cd.tar.gz
Misc hard link fixes
I searched the various classes and looked for copies that should attempt to preserve hardlinks. This fixes the majority of this copies by switching to using tar as the copy method. It also has the side effect of preserving sparse files. Signed-off-by: Mark Hatle <mark.hatle@windriver.com>
Diffstat (limited to 'meta')
-rw-r--r--meta/classes/libc-package.bbclass12
-rw-r--r--meta/classes/populate_sdk_deb.bbclass2
-rw-r--r--meta/classes/sourcepkg.bbclass2
-rw-r--r--meta/classes/staging.bbclass2
4 files changed, 9 insertions, 9 deletions
diff --git a/meta/classes/libc-package.bbclass b/meta/classes/libc-package.bbclass
index 733f26b85e..c9d81f0638 100644
--- a/meta/classes/libc-package.bbclass
+++ b/meta/classes/libc-package.bbclass
@@ -104,24 +104,24 @@ TMP_LOCALE="/tmp/locale${libdir}/locale"
104do_prep_locale_tree() { 104do_prep_locale_tree() {
105 treedir=${WORKDIR}/locale-tree 105 treedir=${WORKDIR}/locale-tree
106 rm -rf $treedir 106 rm -rf $treedir
107 mkdir -p $treedir/bin $treedir/lib $treedir/${datadir} $treedir/${libdir}/locale 107 mkdir -p $treedir/${base_bindir} $treedir/${base_libdir} $treedir/${datadir} $treedir/${libdir}/locale
108 cp -pPR ${PKGD}${datadir}/i18n $treedir/${datadir}/i18n 108 tar -cf - -C ${PKGD}${datadir} -ps i18n | tar -xf - -C $treedir/${datadir}
109 # unzip to avoid parsing errors 109 # unzip to avoid parsing errors
110 for i in $treedir/${datadir}/i18n/charmaps/*gz; do 110 for i in $treedir/${datadir}/i18n/charmaps/*gz; do
111 gunzip $i 111 gunzip $i
112 done 112 done
113 cp -pPR ${PKGD}${base_libdir}/* $treedir/lib 113 tar -cf - -C ${PKGD}${base_libdir} -ps . | tar -xf - -C $treedir/${base_libdir}
114 if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.* ]; then 114 if [ -f ${STAGING_DIR_NATIVE}${prefix_native}/lib/libgcc_s.* ]; then
115 cp -pPR ${STAGING_DIR_NATIVE}/${prefix_native}/lib/libgcc_s.* $treedir/lib 115 tar -cf - -C ${STAGING_DIR_NATIVE}/${prefix_native}/${base_libdir} -ps libgcc_s.* | tar -xf - -C $treedir/${base_libdir}
116 fi 116 fi
117 install -m 0755 ${PKGD}${bindir}/localedef $treedir/bin 117 install -m 0755 ${PKGD}${bindir}/localedef $treedir/${base_bindir}
118} 118}
119 119
120do_collect_bins_from_locale_tree() { 120do_collect_bins_from_locale_tree() {
121 treedir=${WORKDIR}/locale-tree 121 treedir=${WORKDIR}/locale-tree
122 122
123 mkdir -p ${PKGD}${libdir} 123 mkdir -p ${PKGD}${libdir}
124 cp -pPR $treedir/${libdir}/locale ${PKGD}${libdir} 124 tar -cf - -C $treedir/${libdir} -ps locale | tar -xf - -C ${PKGD}${libdir}
125} 125}
126 126
127inherit qemu 127inherit qemu
diff --git a/meta/classes/populate_sdk_deb.bbclass b/meta/classes/populate_sdk_deb.bbclass
index d563c28674..a5b6384f7e 100644
--- a/meta/classes/populate_sdk_deb.bbclass
+++ b/meta/classes/populate_sdk_deb.bbclass
@@ -6,7 +6,7 @@ populate_sdk_post_deb () {
6 6
7 local target_rootfs=$1 7 local target_rootfs=$1
8 8
9 cp -r ${STAGING_ETCDIR_NATIVE}/apt ${target_rootfs}/etc 9 tar -cf -C ${STAGING_ETCDIR_NATIVE} -ps apt | tar -xf - -C ${target_rootfs}/etc
10} 10}
11 11
12fakeroot populate_sdk_deb () { 12fakeroot populate_sdk_deb () {
diff --git a/meta/classes/sourcepkg.bbclass b/meta/classes/sourcepkg.bbclass
index f738553039..f12a1955d4 100644
--- a/meta/classes/sourcepkg.bbclass
+++ b/meta/classes/sourcepkg.bbclass
@@ -41,7 +41,7 @@ sourcepkg_do_create_orig_tgz(){
41 echo $src_tree 41 echo $src_tree
42 oenote "Creating .orig.tar.gz in ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz" 42 oenote "Creating .orig.tar.gz in ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz"
43 tar cvzf ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz --exclude-from temp/exclude-from-file $src_tree 43 tar cvzf ${DEPLOY_DIR_SRC}/${P}.orig.tar.gz --exclude-from temp/exclude-from-file $src_tree
44 cp -pPR $src_tree $src_tree.orig 44 tar -cf - -C $src_tree -ps . | tar -xf - -C $src_tree.orig
45} 45}
46 46
47sourcepkg_do_archive_bb() { 47sourcepkg_do_archive_bb() {
diff --git a/meta/classes/staging.bbclass b/meta/classes/staging.bbclass
index a713734c3f..fef6457398 100644
--- a/meta/classes/staging.bbclass
+++ b/meta/classes/staging.bbclass
@@ -17,7 +17,7 @@ sysroot_stage_dir() {
17 # However we always want to stage a $src itself, even if it's empty 17 # However we always want to stage a $src itself, even if it's empty
18 mkdir -p "$dest" 18 mkdir -p "$dest"
19 if [ -d "$src" ]; then 19 if [ -d "$src" ]; then
20 cp -fpPR "$src"/* "$dest" 20 tar -cf - -C "$src" -ps . | tar -xf - -C "$dest"
21 fi 21 fi
22} 22}
23 23