@pmatilai commented on this pull request.


> @@ -0,0 +1,137 @@
+#!/bin/bash -e
+
+rpmhome=$(rpm --eval "%{xdg:config}/rpm")
+macros="macros"
+# if oldstyle config exists, then use that instead
+if [[ ! -d "${rpmhome}" && ( -f ~/.rpmmacros || -f ~/.rpmrc) ]]; then
+    rpmhome="${HOME}"
+    macros=".rpmmacros"
+fi
+mkdir -p "${rpmhome}"
+
+email="rpmbuild-${USER}@$(uname -n)"
+keypath="${rpmhome}/${email}.asc"

Having a file with that name in your homedir seems extremely unlikely, but then 
it IS the users homedir and we need to be careful. I guess we could always 
mktemp it if it already exists, hmm, but actually the most likely scenario for 
that file existing is that the user already ran this script. So perhaps 
detecting it and erroring out early is the thing to do.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/rpm-software-management/rpm/pull/3665#discussion_r2020910859
You are receiving this because you are subscribed to this thread.

Message ID: <rpm-software-management/rpm/pull/3665/review/[email protected]>
_______________________________________________
Rpm-maint mailing list
[email protected]
https://lists.rpm.org/mailman/listinfo/rpm-maint

Reply via email to