commit: Fix reading xattrs from OstreeRepoFile:s

When doing commit --tree=ref=XXX while at the same time applying some
form of modifier, ostree dies trying to read the xattrs using the
raw syscalls. We fix this by falling back to ostree_repo_file_get_xattrs()
in this case.

Also adds a testcase for this.

Closes: #577
Approved by: cgwalters
This commit is contained in:
Alexander Larsson authored and Atomic Bot committed 2016-11-16 22:30:33 +00:00
1 parent 814aa96825
commit bd45e7ac19
2 files changed
+13 -2

No files matched your search

+4 -1
View File
@@ -19,7 +19,7 @@
set -euo pipefail
echo "1..58"
echo "1..59"
$OSTREE checkout test2 checkout-test2
echo "ok checkout"
@@ -178,6 +178,9 @@ echo "ok user checkout"
$OSTREE commit -b test2 -s "Another commit" --tree=ref=test2
echo "ok commit from ref"
$OSTREE commit -b test2 -s "Another commit with modifier" --tree=ref=test2 --owner-uid=`id -u`
echo "ok commit from ref with modifier"
$OSTREE commit -b trees/test2 -s 'ref with / in it' --tree=ref=test2
echo "ok commit ref with /"