emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] master 211d41a: Don’t require chown/chgrp for game instal


From: Paul Eggert
Subject: [Emacs-diffs] master 211d41a: Don’t require chown/chgrp for game installation
Date: Fri, 24 Mar 2017 11:09:59 -0400 (EDT)

branch: master
commit 211d41a6fe23fefef0e29d036d8599716e484657
Author: Paul Eggert <address@hidden>
Commit: Paul Eggert <address@hidden>

    Don’t require chown/chgrp for game installation
    
    Problem reported by Joseph Mingrone in:
    http://lists.gnu.org/archive/html/emacs-devel/2017-03/msg00622.html
    * lib-src/Makefile.in (exp_archlibdir): Don’t fail if chown or
    chgrp fails with update-game-score and the game directory.
    Instead, expect the installer to fix this up afterwards.
---
 lib-src/Makefile.in | 24 +++++++++++++++---------
 1 file changed, 15 insertions(+), 9 deletions(-)

diff --git a/lib-src/Makefile.in b/lib-src/Makefile.in
index b2cd66c..086d0dc 100644
--- a/lib-src/Makefile.in
+++ b/lib-src/Makefile.in
@@ -266,7 +266,9 @@ need-blessmail: blessmail
 maybe-blessmail: $(BLESSMAIL_TARGET)
 
 ## Install the internal utilities.  Until they are installed, we can
-## just run them directly from lib-src.
+## just run them directly from lib-src.  When installing, do not give
+## up if chown or chgrp fails, as the package responsible for
+## installing Emacs can fix this problem later.
 $(DESTDIR)${archlibdir}: all
        @echo
        @echo "Installing utilities run internally by Emacs."
@@ -283,15 +285,19 @@ $(DESTDIR)${archlibdir}: all
        touch "$(DESTDIR)${gamedir}/snake-scores" \
              "$(DESTDIR)${gamedir}/tetris-scores"
     ifneq (,$(gameuser))
-       chown ${gameuser} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"
-       chmod u+s,go-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"
-       chown ${gameuser} "$(DESTDIR)${gamedir}"
-       chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}"
+       -chown ${gameuser} \
+          "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" \
+          "$(DESTDIR)${gamedir}" && \
+        chmod u+s,go-r \
+          "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \
+        chmod u=rwx,g=rx,o=rx "$(DESTDIR)${gamedir}"
     else
-       chgrp ${gamegroup} "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"
-       chmod g+s,o-r "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}"
-       chgrp ${gamegroup} "$(DESTDIR)${gamedir}"
-       chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}"
+       -chgrp ${gamegroup} \
+          "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \
+          "$(DESTDIR)${gamedir}" && \
+        chmod g+s,o-r \
+          "$(DESTDIR)${archlibdir}/update-game-score${EXEEXT}" && \
+        chmod u=rwx,g=rwx,o=rx "$(DESTDIR)${gamedir}"
     endif
   endif
        exp_archlibdir=`cd "$(DESTDIR)${archlibdir}" && /bin/pwd` && \



reply via email to

[Prev in Thread] Current Thread [Next in Thread]