Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > a16f3d3d398740fdc0a4dc7e3b234338 > files > 11

anaconda-11.1.2.168-1.SL.src.rpm

--- anaconda-11.1.2.168/scripts/upd-instroot	2008-12-18 04:21:19.000000000 -0600
+++ anaconda-11.1.2.113/scripts/upd-instroot	2009-01-29 09:14:05.851000000 -0600
@@ -46,18 +46,52 @@
 
 	PATTERN=""
 	PACKAGEFILES=""
+#CJS added code to look in PACKAGEPATH if did not find exact rpm in 
+# <site>/$SITERPMDIR .  Case is where something like rpm-* find something other
+# than what we are looking for such as rpm-analyzer, but rpm-4* is not in
+# <site>/SITERPMDIR .  The first find finds something but not what
+# we want,  before this code it would just go to next item, this code goes and
+# looks in <default>/RPMS if specific item is not found
 	for PKG in $PACKAGES; do
-	    PATTERN="${PATTERN:+${PATTERN}|}(^$PKG )"
-	    PACKAGEFILES="$PACKAGEFILES $(ls $PACKAGEPATH/$PKG*{$ARCH,noarch}.rpm 2>/dev/null)"
-	done
-
-	# gtk+, enough said
-	PATTERN=$(echo $PATTERN | sed 's,[\+\*],\\&,g')
-
-	PACKAGEFILES=$(ls $PACKAGEFILES | sort -u)
-
-	rpm --nodigest --nosignature --qf "%{NAME} $PACKAGEPATH/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n" \
-		-qp $PACKAGEFILES  | egrep "$PATTERN"  | sed 's/.* //' 
+            SITEPATH=`dirname $PACKAGEPATH`
+            if [  -d $SITEPATH/$SITERPMDIR/ ]; then 
+	        path=$SITEPATH/$SITERPMDIR/
+	        this=$(ls $path/${PKG}*{${ARCH},noarch}.rpm 2>/dev/null)
+#  	        this=$(ls $path/${PKG}[.-]*{${ARCH},noarch}.rpm 2>/dev/null)
+  	    fi
+	    myi=0
+           while [ $myi -lt 2 ]
+	   do
+  	    if [ -z "$this" ]; then
+	    	path=$PACKAGEPATH
+		this=$(ls $path/${PKG}[.-]*{${ARCH},noarch}.rpm 2>/dev/null)
+  	    fi
+	    if [ -z "$this" ]; then
+ 		MYRESULT=""
+		myi=2
+		continue
+#		echo "Did not find $PKG"
+	    else 
+	       # libstdc++, enough said
+	       PATTERN=$(echo $PKG | sed 's,[\+\*],\\&,g')
+	       if [ $PATTERN = "krb5-libs-1" ]; then
+		  PATTERN="krb5-libs"
+	       fi
+#	       PACKAGEFILES="$PACKAGEFILES $(rpm --nodigest --nosignature -qp $this --qf "%{NAME} $path/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n"  | egrep "(^$PATTERN )" | sed 's/.* //')"
+	       MYRESULT=`rpm --nodigest --nosignature -qp $this --qf "%{NAME} $path/%{NAME}-%{VERSION}-%{RELEASE}.%{ARCH}.rpm\n"  | egrep "(^$PATTERN )" | sed 's/.* //'`
+	       if [ -z "$MYRESULT" ]; then
+	         this="" 
+		 myi=`expr $myi + 1`
+	       else
+		 myi=2
+               fi
+	    fi
+	  done  # of while loop
+          PACKAGEFILES="$PACKAGEFILES $MYRESULT"
+  	done  # of for loop
+  
+	ls -1 $PACKAGEFILES |sort -u
+#CJS end of change
 }
 
 expandPackageSet() {
@@ -287,6 +321,7 @@
 etc/security/selinux/policy.*
 etc/security/selinux/file_contexts
 etc/yum/pluginconf.d/kmod.conf
+etc/yum/pluginconf.d/kernel-module.conf
 $LIBDIR/bdevid/*
 $LIBDIR/libaudit*.so*
 $LIBDIR/libc[-.]*
@@ -486,6 +521,7 @@
 usr/lib/yaboot/ofboot
 usr/lib/yaboot/yaboot
 usr/lib/yum-plugins/kmod.py*
+usr/lib/yum-plugins/kernel-module.py*
 usr/libexec/convertdb1
 usr/share/locale/*/LC_MESSAGES/anaconda.mo
 usr/share/locale/locale.alias
@@ -1120,6 +1156,12 @@
 directory = /mnt/sysimage/etc
 EOF
 
+echo "Creating kernel-module.conf"
+cat > $DEST/etc/yum/pluginconf.d/kernel-module.conf <<EOF
+[main]
+enabled = 1
+EOF
+
 echo "Creating multipath.conf"
 cat > $DEST/etc/multipath.conf <<EOF
 defaults {
@@ -1134,6 +1176,7 @@
 
 sed -i 's|\(installforallkernels\) = 0|\1 = 1|' $DEST/etc/yum/pluginconf.d/kmod.conf
 cp $DEST/etc/yum/pluginconf.d/kmod.conf $DESTGR/etc/yum/pluginconf.d/
+cp $DEST/etc/yum/pluginconf.d/kernel-module.conf $DESTGR/etc/yum/pluginconf.d/kernel-module.conf
 
 # fixup man.config to point into /mnt/sysimage for rescue
 if [ -n "$NEEDGR" ]; then