aboutsummaryrefslogtreecommitdiffstats
path: root/main/augeas/fix-test.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2017-11-28 19:22:29 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2017-11-28 19:22:29 +0000
commit510677c4b1d3b766f8b640afac5ca779b905d1c5 (patch)
treeabb126a804f5372dc1217df7f0e6ff4a5cb716c4 /main/augeas/fix-test.patch
parent81301855c6684a0bb7b4bfce3088fb59feb761bb (diff)
downloadaports-510677c4b1d3b766f8b640afac5ca779b905d1c5.tar.bz2
aports-510677c4b1d3b766f8b640afac5ca779b905d1c5.tar.xz
main/augeas: fix test
problem with test/test-preserve.sh was that it compared the group column from out put of ls. If the group name was longer than 8 the test would fail because busybox' ls truncate the groupname. We solve this by using stat -c %G instead, which does not truncate the group name.
Diffstat (limited to 'main/augeas/fix-test.patch')
-rw-r--r--main/augeas/fix-test.patch13
1 files changed, 13 insertions, 0 deletions
diff --git a/main/augeas/fix-test.patch b/main/augeas/fix-test.patch
new file mode 100644
index 0000000000..540aeba513
--- /dev/null
+++ b/main/augeas/fix-test.patch
@@ -0,0 +1,13 @@
+diff --git a/tests/test-preserve.sh b/tests/test-preserve.sh
+index 40b8689..f3e9b87 100755
+--- a/tests/test-preserve.sh
++++ b/tests/test-preserve.sh
+@@ -40,7 +40,7 @@ if [ $? != 0 ] ; then
+ exit 1
+ fi
+
+-act_group=$(ls -l $hosts | sed -e 's/ */ /g' | cut -d ' ' -f 4)
++act_group=$(stat -c "%G" $hosts)
+ act_mode=$(ls -l $hosts | cut -b 1-10)
+ if [ $selinux = yes ] ; then
+ act_con=$(stat --format=%C $hosts | cut -d ':' -f 3)