* 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/control:
  - add ${misc:Depends} in Depends: line in case debhelper has something
    to put there.
This commit is contained in:
Yves-Alexis Perez
2008-12-01 15:05:50 +00:00
parent 8a83d84530
commit c7deeb7d50
5 changed files with 65 additions and 47 deletions

10
debian/README.Debian vendored
View File

@@ -5,7 +5,7 @@ README for desktop-base
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 @@ point to this pair:
/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

12
debian/changelog vendored
View File

@@ -1,3 +1,15 @@
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/control:
- add ${misc:Depends} in Depends: line in case debhelper has something
to put there.
-- Yves-Alexis Perez <corsac@debian.org> Mon, 01 Dec 2008 14:44:30 +0100
desktop-base (5.0.2) unstable; urgency=low
* moreblue-orbit-wallpaper-widescreen.svg updated, fix a “transparent”

2
debian/control vendored
View File

@@ -14,7 +14,7 @@ Vcs-Svn: svn://svn.debian.org/debian-desktop/packages/trunk/desktop-base
Package: desktop-base
Architecture: all
Depends: librsvg2-common
Depends: librsvg2-common, ${misc:Depends}
Suggests: gnome | kde | xfce4 | wmaker
Description: common files for the Debian Desktop
This package contains various miscellaneous files which are used by

26
debian/postinst vendored
View File

@@ -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

62
debian/preinst vendored
View File

@@ -17,25 +17,53 @@ if [ "${1}" = "upgrade" ]; then
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
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
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