[diffoscope] 01/01: comparators/directory: add compatibily with FreeBSD's getfacl

Mattia Rizzolo mattia at debian.org
Tue Dec 13 17:39:08 CET 2016

This is an automated email from the git hooks/post-receive script.

mattia pushed a commit to branch master
in repository diffoscope.

commit 6812c22596d531df18fffe43bfb7c774f2d09307
Author: Baptiste Daroussin <bapt at gandi.net>
Date:   Wed Dec 2 17:27:58 2015 +0100

    comparators/directory: add compatibily with FreeBSD's getfacl
    getfacl has incomaptible option list between Linux and FreeBSD, so
    change the call depending on the OS.
    Signed-off-by: Mattia Rizzolo <mattia at debian.org>
 diffoscope/comparators/directory.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/diffoscope/comparators/directory.py b/diffoscope/comparators/directory.py
index 8e5d10b..4725b3c 100644
--- a/diffoscope/comparators/directory.py
+++ b/diffoscope/comparators/directory.py
@@ -81,7 +81,11 @@ def lsattr(path):
 class Getfacl(Command):
     def cmdline(self):
-        return ['getfacl', '-p', '-c', self.path]
+        osname = os.uname()[0]
+        if osname == 'FreeBSD':
+            return ['getfacl', '-q', '-h', self.path]
+        else:
+            return ['getfacl', '-p', '-c', self.path]
 def compare_meta(path1, path2):

Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/reproducible/diffoscope.git

More information about the diffoscope mailing list