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

Re: Please allow desktop-base 5.0.2 in lenny



On mer, 2008-10-29 at 22:43 +0100, Adeodato Simó wrote:
> So, I would suggest something similar to what you have:
> 
>   * modified files under /etc/splashy move (without changing name) to
>     a /etc/slpashy.bak directory (created by the maintainer script)
> 
>   * a note is left in README.Debian saying that modified files are to
> be
>     found there (I don't think this is worth of NEWS.Debian, given the
>     low chances of this happening).

Ok, it took some time, but I've prepared a 5.0.3 release which should
fix the problem.

Would you accept in Lenny 5.0.3 with the attached diff? (from 5.0.2, ask
if you prefer diff from 5.0.1)

Cheers,
-- 
Yves-Alexis
Reading package lists...
Building dependency tree...
Reading state information...
Need to get 5990kB of source archives.
Get:1 http://ftp.fr.debian.org sid/main desktop-base 5.0.2 (dsc) [1071B]
Get:2 http://ftp.fr.debian.org sid/main desktop-base 5.0.2 (tar) [5989kB]
dpkg-source: extracting desktop-base in desktop-base-5.0.2
dpkg-source: info: unpacking desktop-base_5.0.2.tar.gz
Fetched 5990kB in 10s (574kB/s)
Differences in desktop-base between 5.0.2 and 5.0.3
diff -Nru desktop-base-5.0.2/debian/changelog desktop-base-5.0.3/debian/changelog
--- desktop-base-5.0.2/debian/changelog	2008-10-24 00:23:57.000000000 +0200
+++ desktop-base-5.0.3/debian/changelog	2008-12-06 17:02:52.000000000 +0100
@@ -1,3 +1,16 @@
+desktop-base (5.0.3) UNRELEASED; urgency=low
+
+  * debian/preinst:
+    - handle upgrade in various cases: (/etc/splashy/themes symlink or not,
+      and changed or unchanged themes files)
+  * debian/README.Debian: announce the change.
+  * debian/postinst:
+    - make sure we can use /etc/splashy/config.xml.
+  * debian/source.lintian-overrides:
+    - add override for not adding ${misc:depends} to Depends: line.
+
+ -- Yves-Alexis Perez <corsac@debian.org>  Sat, 06 Dec 2008 17:02:28 +0100
+
 desktop-base (5.0.2) unstable; urgency=low
 
   * moreblue-orbit-wallpaper-widescreen.svg updated, fix a “transparent”
diff -Nru desktop-base-5.0.2/debian/postinst desktop-base-5.0.3/debian/postinst
--- desktop-base-5.0.2/debian/postinst	2008-10-23 23:56:04.000000000 +0200
+++ desktop-base-5.0.3/debian/postinst	2008-12-06 14:41:06.000000000 +0100
@@ -2,32 +2,6 @@
 
 #DEBHELPER#
 
-# Move a conffile without triggering a dpkg question
-mv_conffile() {
-    OLDCONFFILE="$1"
-    NEWCONFFILE="$2"
-    if [ -e "$OLDCONFFILE" ]; then
-        echo "Preserving user changes to $NEWCONFFILE ..."
-        mv -f "$NEWCONFFILE" "$NEWCONFFILE".dpkg-new
-        mv -f "$OLDCONFFILE" "$NEWCONFFILE"
-    fi
-}
-
-
-case "${1}" in
-install|upgrade)
-    # splashy theme is moved to /usr/share/splashy starting 5.0.2
-    if dpkg --compare-versions ${2} le 5.0.2; then
-        mv_conffile /etc/splashy/themes/moreblue-orbit/background-bw.png \
-        /usr/share/splashy/themes/moreblue-orbit/background-bw.png
-        mv_conffile /etc/splashy/themes/moreblue-orbit/background-color.png \
-        /usr/share/splashy/themes/moreblue-orbit/background-color.png
-        mv_conffile /etc/splashy/themes/moreblue-orbit/theme.xml \
-        /usr/share/splashy/themes/moreblue-orbit/theme.xml
-        mv_conffile /etc/splashy/themes/moreblue-orbit/VeraSans.ttf \
-        /usr/share/splashy/themes/moreblue-orbit/VeraSans.ttf
-    fi
-esac
 
 if [ "${1}" = "configure" ] && [ "$2" != "" ] ; then
 
@@ -117,7 +91,7 @@
         update-grub2
     fi
 
-    if [ -x /sbin/splashy_config ]; then
+    if [ -x /sbin/splashy_config ] && [ -w /etc/splashy/config.xml ]; then
         splashy_config --set-theme moreblue-orbit
     fi
 
diff -Nru desktop-base-5.0.2/debian/preinst desktop-base-5.0.3/debian/preinst
--- desktop-base-5.0.2/debian/preinst	2008-10-24 00:01:59.000000000 +0200
+++ desktop-base-5.0.3/debian/preinst	2008-12-06 15:15:14.000000000 +0100
@@ -17,25 +17,55 @@
     fi
 fi
 
-# prepare to move splashy themes, moved to /usr/share in 5.0.2
-prep_mv_conffile() {
-    PKGNAME="$1"
-    CONFFILE="$2"
-    if [ -e "$CONFFILE" ]; then
-        md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
-        old_md5sum="`dpkg-query -W -f='${Conffiles}' $PKGNAME | sed -n -e \"\\\\' $CONFFILE '{s/ obsolete$//;s/.* //p}\"`"
-        if [ "$md5sum" = "$old_md5sum" ]; then
-            rm -f "$CONFFILE"
-        fi
-    fi
+same_conffile() {
+  CONFFILE="$1"
+  if [ -e "$CONFFILE" ]; then
+    md5sum="`md5sum \"$CONFFILE\" | sed -e \"s/ .*//\"`"
+    old_md5sum="`dpkg-query -W -f='${Conffiles}' desktop-base | sed -n -e \"\\\\' $CONFFILE '{s/ obsolete$//;s/.* //p}\"`"
+    [ "$md5sum" = "$old_md5sum" ]
+    return
+  fi
+  return 1
 }
+
 case "$1" in
-install|upgrade)
-    if dpkg --compare-versions "$2" le "5.0.2"; then
-        prep_mv_conffile desktop-base "/etc/splashy/themes/moreblue-orbit/background-bw.png"
-        prep_mv_conffile desktop-base "/etc/splashy/themes/moreblue-orbit/background-color.png"
-        prep_mv_conffile desktop-base "/etc/splashy/themes/moreblue-orbit/VeraSans.ttf"
-        prep_mv_conffile desktop-base "/etc/splashy/themes/moreblue-orbit/theme.xml"
+  install|upgrade)
+    if dpkg --compare-versions "$2" lt "5.0.2"; then
+      # if the folder is a symlink (installed by splashy), modified files
+      # need to be copied (from /usr/share/splashy/themes) before beeing 
+      # replaced. If it's not, they need to be moved (from
+      # /etc/splashy/themes)
+      # not modified files need to be removed if no symlink, and not
+      # touched in case of a symlink
+      THEME_FOLDER="/etc/splashy/themes/moreblue-orbit"
+      THEME_FOLDER_BAK="/etc/splashy.dpkg-old/themes/moreblue-orbit"
+      FILES="background-bw.png background-color.png VeraSans.ttf theme.xml"
+
+      if [ -h /etc/splashy/themes ]; then
+      # symlink
+        for FILE in ${FILES}; do
+          [ -f ${THEME_FOLDER}/${FILE} ] || break
+          if ! same_conffile "${THEME_FOLDER}/${FILE}"; then
+          # symlink and changed file, copy it in a safe place
+            [ -d $THEME_FOLDER_BAK ] || mkdir -p $THEME_FOLDER_BAK
+            cp ${THEME_FOLDER}/${FILE} ${THEME_FOLDER_BAK}/
+          fi
+        done
+      else
+      # real folder
+        for FILE in ${FILES}; do
+          [ -f ${THEME_FOLDER}/${FILE} ] || break
+          if ! same_conffile "${THEME_FOLDER}/${FILE}"; then
+          # real folder and changed file, move it in a safe place
+            [ -d $THEME_FOLDER_BAK ] || mkdir -p $THEME_FOLDER_BAK
+            mv ${THEME_FOLDER}/${FILE} ${THEME_FOLDER_BAK}/
+          else
+          # real folder but unchanged file, just remove it
+            rm ${THEME_FOLDER}/${FILE}
+          fi
+        done
+      fi
     fi
+  ;;
 esac
 
diff -Nru desktop-base-5.0.2/debian/README.Debian desktop-base-5.0.3/debian/README.Debian
--- desktop-base-5.0.2/debian/README.Debian	2008-08-22 23:49:07.000000000 +0200
+++ desktop-base-5.0.3/debian/README.Debian	2008-12-01 14:45:33.000000000 +0100
@@ -5,7 +5,7 @@
    1.1. Emblems
    1.2. Pixmaps
    1.3. Splash and Wallpapers
-   1.4. GDM Theme
+   1.4. Boot splash
 2. Desktop files
 3. Changing desktop-base images
 4. Window Managers
@@ -37,9 +37,13 @@
 /usr/share/images/desktop-base/splash/gnome-debian-etch-splash.png
 /usr/share/images/desktop-base/wallpapers/gnome-debian-etch-wp.png
 
-1.4. GDM Theme
+1.4. Boot splash
 
-desktop-base GDM theme will be built as soon as possible.
+desktop-base provides a theme for splashy, in
+/usr/share/splashy/themes/moreblue-orbit. Previously the theme was in
+/etc/splashy but since splashy people move the themes to /usr/share and
+replaced the folder by a symlink, we had to follow. If you modified the
+theme before, you should be able to find it in /etc/splashy.dpkg-old.
 
 2. Desktop files
 /usr/share/desktop-base/debian-homepage.desktop
diff -Nru desktop-base-5.0.2/debian/source.lintian-overrides desktop-base-5.0.3/debian/source.lintian-overrides
--- desktop-base-5.0.2/debian/source.lintian-overrides	1970-01-01 01:00:00.000000000 +0100
+++ desktop-base-5.0.3/debian/source.lintian-overrides	2008-12-06 17:06:13.000000000 +0100
@@ -0,0 +1,2 @@
+# we ignore ${Misc:Depends} because it would bring gconf
+desktop-base source: debhelper-but-no-misc-depends desktop-base

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: