[gnome-shell] [build] Use dpkg-checkbuilddeps to check for installed packages
- From: Frederic Peters <fpeters src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] [build] Use dpkg-checkbuilddeps to check for installed packages
- Date: Tue, 20 Jul 2010 14:31:11 +0000 (UTC)
commit 6259513b0f32ebcee5e3e8ad840e7962554f4c1c
Author: Frédéric Péters <fpeters 0d be>
Date: Sun Jul 11 20:40:23 2010 +0200
[build] Use dpkg-checkbuilddeps to check for installed packages
This is required to handle Provides header, as used by lib*-dev packages
(for example libtiff5-dev provides libtiff-dev), this allows the build
setup script to specify the "generic" package names.
https://bugzilla.gnome.org/show_bug.cgi?id=624009
tools/build/gnome-shell-build-setup.sh | 21 ++++++---------------
1 files changed, 6 insertions(+), 15 deletions(-)
---
diff --git a/tools/build/gnome-shell-build-setup.sh b/tools/build/gnome-shell-build-setup.sh
index ed7ca52..a43b7f9 100755
--- a/tools/build/gnome-shell-build-setup.sh
+++ b/tools/build/gnome-shell-build-setup.sh
@@ -69,22 +69,13 @@ fi
#
# (*) only needed for --xephyr
-# Can this be simplified? Obvious ways don't handle handle packages
-# that have been installed then removed. ('purged' status, e.g.)
-dpkg_is_installed() {
- status=`dpkg-query --show --showformat='${Status}' $1 2>/dev/null`
- if [ $? = 0 ] ; then
- set $status
- if [ "$3" = installed ] ; then
- return 0
- fi
- fi
-
- return 1
-}
-
if test x$system = xUbuntu -o x$system = xDebian -o x$system = xLinuxMint ; then
reqd=""
+ if [ ! -x /usr/bin/dpkg-checkbuilddeps ]; then
+ echo "Please run 'sudo apt-get install dpkg-dev' and try again."
+ echo
+ exit 1
+ fi
for pkg in \
build-essential curl \
automake bison flex gettext git-core gnome-common gtk-doc-tools gvfs gvfs-backends \
@@ -94,7 +85,7 @@ if test x$system = xUbuntu -o x$system = xDebian -o x$system = xLinuxMint ; then
python-dev python-gconf python-gobject xulrunner-dev xserver-xephyr gnome-terminal \
libcroco3-dev libgstreamer0.10-dev gstreamer0.10-plugins-base gstreamer0.10-plugins-good \
; do
- if ! dpkg_is_installed $pkg; then
+ if ! dpkg-checkbuilddeps -d $pkg /dev/null 2> /dev/null; then
reqd="$pkg $reqd"
fi
done
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]