Changeset 24128

Show
Ignore:
Timestamp:
10/25/09 12:52:45 (4 weeks ago)
Author:
broder
Message:

In gdm-config:

  • Don't configure /etc/gdm/gdm.conf{,-custom} on post-gdm-2.20 platforms.
    • Themes are no longer supported, so there's no point setting one
    • Xauthority files are now going into /var/run
Location:
trunk/debathena/config/gdm-config/debian
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/debathena/config/gdm-config/debian/changelog

    r24121 r24128  
     1debathena-gdm-config (1.17) unstable; urgency=low 
     2 
     3  * Don't configure /etc/gdm/gdm.conf{,-custom} on post-gdm-2.20 
     4    platforms. 
     5    - Themes are no longer supported, so there's no point setting one 
     6    - Xauthority files are now going into /var/run 
     7 
     8 -- Evan Broder <broder@mit.edu>  Sun, 25 Oct 2009 12:46:46 -0400 
     9 
    110debathena-gdm-config (1.16) unstable; urgency=low 
    211 
  • trunk/debathena/config/gdm-config/debian/debathena-gdm-config.postinst

    r24063 r24128  
    1919 
    2020 
     21package=debathena-gdm-config 
     22ours=.debathena 
     23theirs=.debathena-orig 
     24 
     25undivert_unlink_symlink() 
     26{ 
     27    file="$1" 
     28    ourfile="$2" 
     29    theirfile="$3" 
     30    if [ ! -L "$file" ] || \ 
     31        [ "$(readlink "$file")" != "$(basename "$ourfile")" -a \ 
     32          "$(readlink "$file")" != "$(basename "$theirfile")" ]; then 
     33        echo "*** OMINOUS WARNING ***: $file is not linked to either $(basename "$ourfile") or $(basename "$theirfile")" >&2 
     34    else 
     35        rm -f "$file" 
     36    fi 
     37} 
     38 
     39undivert_unlink_divert() 
     40{ 
     41    file="$1" 
     42    if [ ! -L "$file" ] && [ ! -e "$file" ]; then 
     43        dpkg-divert --remove --rename --package "$package" "$file" 
     44    else 
     45        echo "Not removing diversion of $file by $package" >&2 
     46    fi 
     47} 
     48 
     49undivert_unlink() 
     50{ 
     51    prefix=$1 
     52    suffix=$2 
     53 
     54    file=$prefix$suffix 
     55    ourfile=$prefix$ours$suffix 
     56    theirfile=$prefix$theirs$suffix 
     57 
     58    undivert_unlink_symlink "$file" "$ourfile" "$theirfile" 
     59    undivert_unlink_divert "$file" "$package" 
     60} 
     61 
     62cleanup_old_diversion() { 
     63    file="$1" 
     64    if dpkg-divert --list "${file}" | grep -Fxq "diversion of ${file} to ${file}${theirs} by ${package}"; then 
     65        undivert_unlink "$file" 
     66    fi 
     67} 
     68 
    2169case "$1" in 
    2270    configure) 
     71        gdm_version="$(dpkg-query -W -f '${Version}' gdm)" 
     72        if dpkg --compare-versions "$gdm_version" ge '2.25.2~'; then 
     73            cleanup_old_diversion /etc/gdm/gdm.conf 
     74            cleanup_old_diversion /etc/gdm/gdm.conf-custom 
     75        fi 
     76 
    2377        if test -f /var/run/gdm.pid ; then 
    2478            if hash invoke-rc.d 2>/dev/null; then 
  • trunk/debathena/config/gdm-config/debian/rules

    r24027 r24128  
    11#!/usr/bin/make -f 
     2 
     3GDM_VERSION = $(shell dpkg-query --showformat='$${Version}' --show gdm) 
     4NEW_GDM = $(shell dpkg --compare-versions $(GDM_VERSION) ge '2.25.2~' & echo y) 
    25 
    36ifneq ($(wildcard /etc/gdm/gdm.conf-custom),) 
     
    912 
    1013DEB_DIVERT_EXTENSION = .debathena 
    11 DEB_TRANSFORM_FILES_debathena-gdm-config += \ 
    12         ${GDM_CONFFILE} 
    1314DEB_TRANSFORM_SCRIPT_${GDM_CONFFILE} = debian/transform_gdm.conf.debathena 
    1415DEB_DIVERT_FILES_debathena-gdm-config += \ 
     
    1819DEB_REMOVE_FILES_debathena-gdm-config += \ 
    1920        /usr/share/xsessions/ssh.desktop 
     21 
     22ifneq ($(NEW_GDM),y) 
     23    DEB_TRANSFORM_FILES_debathena-gdm-config += \ 
     24        ${GDM_CONFFILE} 
     25endif 
     26 
    2027include /usr/share/cdbs/1/rules/debhelper.mk 
    2128include /usr/share/cdbs/1/rules/config-package.mk