From 538e103d4db083cc50ec95793470567a289f1feb Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Fri, 29 Sep 2006 08:09:11 +0000 Subject: [PATCH] Stefan Fiedler: scripts/functions: fix the pkginstalled function to give reasonable results even for Crystal+AddOn targets. Without this fix, e.g. dbus-glib fails in Crystal builds if doxygen is an add-on package because doxygen is built only in stage 9 but dbus-glib tries to use it in stage 5. Furthermore I don't see any reason for pkginstalled() to have different meanings in stages < 9 and stage = 9. [2006091320575529756] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7928 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/functions | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/scripts/functions b/scripts/functions index ab721aba8..92872bf8e 100644 --- a/scripts/functions +++ b/scripts/functions @@ -507,16 +507,15 @@ dump_env() { # Check if a package is already installed # -# It does check the build-list if not in the rebuild stage - and -# the really installed package data for rebuilds (and so manual builds). +# Always checks the really installed package data. Checking the package list +# doesn't work in Crystal+addon targets, where some packages are only built +# in stage 9. The package data however is always there if the package has been +# installed. # pkginstalled() { local pattern="$1"; pattern="${pattern//+/\\+}" - if [ "$stagelevel" -le 8 ] ; then - egrep -q "^X.* ($pattern) " $base/config/$config/packages - else - ls $root/var/adm/flists | egrep -q "^($pattern)$" - fi + + ls $root/var/adm/flists | egrep -q "^($pattern)$" } # Register a window-manager