[SCM] live-config branch, debian, updated. debian/2.0_a9-1-13-gaa3b50f

Daniel Baumann daniel at debian.org
Thu Jun 17 19:51:11 UTC 2010


The following commit has been merged in the debian branch:
commit 71bcffbac04b8eb0947a23193ad06b18e87510d2
Author: Daniel Baumann <daniel at debian.org>
Date:   Thu Jun 17 17:45:16 2010 +0200

    Automatically determine on which distribution the package is built through lsb_release and removing unecessary config scripts from the resulting package.

diff --git a/bin/update-live-config.sh b/bin/update-live-config.sh
new file mode 100755
index 0000000..75a4ee6
--- /dev/null
+++ b/bin/update-live-config.sh
@@ -0,0 +1,41 @@
+#!/bin/sh
+
+set -e
+
+DIRECTORY="${1:-/lib/live/config}"
+
+if [ ! -e "${DIRECTORY}" ]
+then
+	echo "E: ${DIRECTORY} - not found."
+	exit 1
+fi
+
+DISTRIBUTION="$(lsb_release -is | tr [A-Z] [a-z])"
+RELEASE="$(lsb_release -cs | tr [A-Z] [a-z])"
+
+echo "Removing unused scripts..."
+
+case "${DISTRIBUTION}" in
+	debian)
+		# Removing ubuntu scripts
+		rm -f "${DIRECTORY}"/*-apport
+
+		case "${RELEASE}" in
+		lenny)
+			# Removing squeeze and newer scripts
+			rm -f "${DIRECTORY}"/*-gdm3
+			rm -f "${DIRECTORY}"/*-kaboom
+			rm -f "${DIRECTORY}"/*-kde-services
+			rm -f "${DIRECTORY}"/*-keyboard-configuration
+			;;
+
+		*)
+			# Removing lenny legacy scripts
+			rm -f "${DIRECTORY}"/*-console-common
+			rm -f "${DIRECTORY}"/*-console-setup
+			rm -f "${DIRECTORY}"/*-gdm
+			rm -f "${DIRECTORY}"/*-kpersonalizer
+			;;
+		esac
+		;;
+esac
diff --git a/debian/control b/debian/control
index 67ba1a2..ac1913f 100644
--- a/debian/control
+++ b/debian/control
@@ -3,7 +3,7 @@ Section: misc
 Priority: optional
 Maintainer: Debian Live Project <debian-live at lists.debian.org>
 Uploaders: Daniel Baumann <daniel at debian.org>
-Build-Depends: debhelper (>= 7.0.50~)
+Build-Depends: debhelper (>= 7.0.50~), lsb-release
 Standards-Version: 3.8.4
 Homepage: http://live.debian.net/devel/live-config/
 Vcs-Browser: http://live.debian.net/gitweb/?p=live-config.git
diff --git a/debian/rules b/debian/rules
index 87eaa9d..98e032a 100755
--- a/debian/rules
+++ b/debian/rules
@@ -9,6 +9,10 @@ override_dh_auto_build:
 override_dh_auto_install:
 	$(MAKE) DESTDIR=$(CURDIR)/debian/live-config install
 
+	# Removing useless files
+	rm -f debian/live-config/usr/share/doc/live-config/COPYING
+	bin/update-live-config.sh debian/live-config/lib/live/config
+
 	# live-config-systemd
 	install -D -m 0644 debian/live-config-systemd.service debian/live-config-systemd/etc/systemd/system/live-config.service
 	mkdir -p debian/live-config-systemd/etc/systemd/system/runlevel1.target.wants
@@ -19,9 +23,6 @@ override_dh_auto_install:
 	mv debian/live-config/lib/live/config/*-sysvinit debian/live-config-sysvinit/lib/live/config
 	mv debian/live-config/lib/live/config/*-sysv-rc debian/live-config-sysvinit/lib/live/config
 
-	# Removing useless files
-	rm -f debian/live-config/usr/share/doc/live-config/COPYING
-
 override_dh_installinit:
 	dh_installinit -p live-config-upstart --no-restart-on-upgrade --no-start --name live-config
 	dh_installinit -p live-config-sysvinit --no-restart-on-upgrade --no-start --update-rcd-params='start 00 S .' --name live-config
diff --git a/docs/TODO b/docs/TODO
index f65e85f..39bd001 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -11,6 +11,7 @@ we continue to release pre-releases until:
   * boot parameters don't change anymore and we agreed on a common layout of
     everything.
 
+
 2. Regressions
 
 Everything that worked with live-initramfs works with live-boot/live-config,
@@ -23,11 +24,11 @@ except for the following things:
   * not exactely a regression, but some boot parameters did change, have a look
     at the manpage of live-config.
 
+
 3. Todo items
 
   * allow some scripts (most prominently locales) to be run even in persistent mode.
-  * use build-time distribution detection, remove dead code from build.
-  * use verbose/quiet/debug/interactive modes for scripts.
+  * use verbose/quiet/interactive modes for scripts.
   * use logfile.
   * enable display managers only if they are the selected one.
   * add option to specify the xsession.

-- 
live-config



More information about the debian-live-changes mailing list