xmonad-start: touch user's xmonad.hs if binary has broken shared libs for recompile

This should fix #806624 reported by Erik Streb.
Needed both for upgrades to f16 (dynlink) and to f17 (gmp).
This commit is contained in:
Jens Petersen 2012-05-24 15:55:00 +09:00
parent 0fbbe967f5
commit ab95445fff
2 changed files with 19 additions and 6 deletions

View File

@ -1,11 +1,13 @@
#!/bin/sh
XMONAD_DIR=$HOME/.xmonad
# if no user configuration
if [ ! -d ~/.xmonad ]; then
if [ ! -d $XMONAD_DIR ]; then
# add a desktop friendly config if possible
if [ -r /usr/share/xmonad/xmonad.hs ]; then
mkdir ~/.xmonad
cp -p /usr/share/xmonad/xmonad.hs ~/.xmonad
mkdir $XMONAD_DIR
cp -p /usr/share/xmonad/xmonad.hs $XMONAD_DIR
else
echo "xmonad-start: install xmonad-config to customize"
fi
@ -15,10 +17,17 @@ if [ ! -d ~/.xmonad ]; then
*) TERM_CMD="xterm -e" ;;
esac
(sleep 5; $TERM_CMD man xmonad) &
else
XMONAD_CUSTOM=$XMONAD_DIR/xmonad-$(arch)-linux
if [ -r $XMONAD_DIR/xmonad.hs -a -x $XMONAD_CUSTOM ]; then
if ldd $XMONAD_DIR/xmonad-$(arch)-linux | grep -q "not found"; then
touch $XMONAD_DIR/xmonad.hs
fi
fi
fi
if [ -r ~/.xmonad/session ]; then
sh ~/.xmonad/session
if [ -r $XMONAD_DIR/session ]; then
sh $XMONAD_DIR/session
fi
xmonad

View File

@ -18,7 +18,7 @@ on several screens.
Name: %{pkg_name}
Version: 0.10
Release: 6%{?dist}
Release: 7%{?dist}
Summary: A tiling window manager
Group: User Interface/X
@ -175,6 +175,10 @@ rm %{buildroot}%{_docdir}/%{name}-%{version}/LICENSE
%changelog
* Thu May 24 2012 Jens Petersen <petersen@redhat.com> - 0.10-7
- xmonad-start: if user's custom xmonad has missing shared lib dependencies
touch xmonad.hs so it gets recompiled (#806624 reported by Erik Streb)
* Fri Mar 23 2012 Jens Petersen <petersen@redhat.com> - 0.10-6
- try delaying manpage terminal startup 5s to avoid window resize
- add license to ghc_files