From 8ccf22f003e94c9c0c17ca210717317801a28d79 Mon Sep 17 00:00:00 2001 From: Stefan Fiedler Date: Mon, 9 Oct 2006 17:54:21 +0000 Subject: [PATCH] Stefan Fiedler: fix pkginstalled() for stage 0; the flist files are stored in a different location in this stage. Hardly any package will need this, still it's good to always return correct results. Note that since stage 0 uses a different root directory than all other stages, packages installed in stage 0 are not seen by pkginstalled() in later stages (unless installed again). AFAIK this is correct behaviour. [2006092515265132342] (https://www.rocklinux.net/submaster) git-svn-id: http://www.rocklinux.org/svn/rock-linux/trunk@7948 c5f82cb5-29bc-0310-9cd0-bff59a50e3bc --- scripts/functions | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/scripts/functions b/scripts/functions index 92872bf8e..d021fd135 100644 --- a/scripts/functions +++ b/scripts/functions @@ -513,9 +513,13 @@ dump_env() { # installed. # pkginstalled() { - local pattern="$1"; pattern="${pattern//+/\\+}" + local pattern="$1" ; pattern="${pattern//+/\\+}" - ls $root/var/adm/flists | egrep -q "^($pattern)$" + if [ $stagelevel = 0 ] ; then + ls "$base/build/$ROCKCFG_ID/ROCK/$toolsdir/var/adm/flists" + else + ls $root/var/adm/flists + fi | egrep -q "^($pattern)$" } # Register a window-manager