sys-user.eclass: fix the "user taken" test.
authorMichael Orlitzky <michael@orlitzky.com>
Tue, 29 Aug 2017 18:48:39 +0000 (14:48 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Tue, 29 Aug 2017 18:48:39 +0000 (14:48 -0400)
eclass/sys-user.eclass

index 37c4d8719ac82cce8bec5a42b3f830c9ed5ba682..8a4c426e3e0dcc36801d63079d427e8891d34241 100644 (file)
@@ -178,7 +178,8 @@ sys-user_src_configure() {
        fi
 
        local current_name=$(sys-user_getname "${SYS_USER_UID}")
-       if [[ "${current_name}" != "${SYS_USER_NAME}" ]]; then
+       if [[ -n "${current_name}" ]] && \
+                  [[ "${current_name}" != "${SYS_USER_NAME}" ]]; then
                # This UID is already taken by another user, but this
                # specific UID was not important (we checked in
                # pkg_pretend), so fall back to an arbitrary one.