fcaps.eclass: don't assume D and ROOT end with a slash
authorMike Gilbert <floppym@gentoo.org>
Tue, 8 May 2018 14:38:31 +0000 (10:38 -0400)
committerMike Gilbert <floppym@gentoo.org>
Tue, 8 May 2018 14:38:31 +0000 (10:38 -0400)
Closes: https://bugs.gentoo.org/655244

eclass/fcaps.eclass

index 7b388849df60e5583933f8e29bb34edaeeea6ccf..467f955f5e9af5ee36479982fca7e05ab6196f88 100644 (file)
@@ -110,11 +110,12 @@ fcaps() {
                root=${EROOT:-${ROOT}}
                ;;
        esac
+       root=${root%/}
 
        # Process every file!
        local file
        for file ; do
-               [[ ${file} != /* ]] && file="${root}${file}"
+               [[ ${file} != /* ]] && file="${root}/${file}"
 
                if use filecaps ; then
                        # Try to set capabilities.  Ignore errors when the