summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2014-05-26 22:15:16 -0400
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-06-24 11:05:31 +0100
commit05f172c745799a34aa8c530ac88b25c0081c15d8 (patch)
treef046c9d46c4951dbe369a4625acdc8167d22e4ea
parent47afe5bcfabff3acc6502f9ec502d18e652d033a (diff)
downloadpoky-05f172c745799a34aa8c530ac88b25c0081c15d8.tar.gz
populate-extfs.sh: keep file timestamps
Fix populate-extfs.sh to keep file timestamps while generating the ext file systems. [YOCTO #6348] (From OE-Core rev: f8c0359edc2ce740e13e874ea189770ff99d1525) Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh10
1 files changed, 9 insertions, 1 deletions
diff --git a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh
index 23d97d39b6..26a8d89143 100644
--- a/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh
+++ b/meta/recipes-devtools/e2fsprogs/e2fsprogs-1.42.8/populate-extfs.sh
@@ -36,7 +36,7 @@ DEBUGFS="debugfs"
36 fi 36 fi
37 37
38 # Only stat once since stat is a time consuming command 38 # Only stat once since stat is a time consuming command
39 STAT=$(stat -c "TYPE=\"%F\";DEVNO=\"0x%t 0x%T\";MODE=\"%f\";U=\"%u\";G=\"%g\"" "$FILE") 39 STAT=$(stat -c "TYPE=\"%F\";DEVNO=\"0x%t 0x%T\";MODE=\"%f\";U=\"%u\";G=\"%g\";AT=\"%x\";MT=\"%y\";CT=\"%z\"" "$FILE")
40 eval $STAT 40 eval $STAT
41 41
42 case $TYPE in 42 case $TYPE in
@@ -70,6 +70,14 @@ DEBUGFS="debugfs"
70 # Set uid and gid 70 # Set uid and gid
71 echo "sif \"$TGT\" uid $U" 71 echo "sif \"$TGT\" uid $U"
72 echo "sif \"$TGT\" gid $G" 72 echo "sif \"$TGT\" gid $G"
73
74 # Set atime, mtime and ctime
75 AT=`echo $AT | cut -d'.' -f1 | sed -e 's#[- :]##g'`
76 MT=`echo $MT | cut -d'.' -f1 | sed -e 's#[- :]##g'`
77 CT=`echo $CT | cut -d'.' -f1 | sed -e 's#[- :]##g'`
78 echo "sif \"$TGT\" atime $AT"
79 echo "sif \"$TGT\" mtime $MT"
80 echo "sif \"$TGT\" ctime $CT"
73 done 81 done
74 82
75 # Handle the hard links. 83 # Handle the hard links.