[pacman-dev] [PATCH] Provide a better guess about who the packager is.
Kieran Colford
kieran at kcolford.com
Tue Jan 31 22:10:55 UTC 2017
The system usually has enough information in various places to guess
the name and email of the person running the makepkg script. Use these
instead of defaulting to "Unknown Packager" to minimize configuration
necessary by the user. This particular implemenation should provide
relatively good guess that's compatible with other programs
(i.e. git).
Signed-off-by: Kieran Colford <kieran at kcolford.com>
---
scripts/makepkg.sh.in | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/scripts/makepkg.sh.in b/scripts/makepkg.sh.in
index 29408929..65114862 100644
--- a/scripts/makepkg.sh.in
+++ b/scripts/makepkg.sh.in
@@ -618,7 +618,7 @@ write_pkginfo() {
if [[ -n $PACKAGER ]]; then
local packager="$PACKAGER"
else
- local packager="Unknown Packager"
+ local packager="${NAME:-$(getent passwd ${USER:-$(whoami)} | cut -d : -f 5 | cut -d , -f 1)} <${EMAIL:-${USER:-$(whoami)}@$(hostname --fqdn)}>"
fi
local size="$(@DUPATH@ @DUFLAGS@)"
--
2.11.0
More information about the pacman-dev
mailing list