[PATCH 3/8] Remove obsolete bits that we no longer need with module trees.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



---
 scripts/mk-images  |   21 +-----------
 utils/Makefile     |   11 +-----
 utils/moddeps.c    |   91 ----------------------------------------------------
 utils/trimmodalias |   23 -------------
 4 files changed, 4 insertions(+), 142 deletions(-)

diff --git a/scripts/mk-images b/scripts/mk-images
index 97b4c58..e85869e 100755
--- a/scripts/mk-images
+++ b/scripts/mk-images
@@ -62,8 +62,6 @@ INITRDMODS="$USBMODS $FIREWIREMODS $IDEMODS $SCSIMODS $FSMODS $LVMMODS $RAIDMODS
     INSTIMGTEMPLATE=$3
     IMGPATH=$4
     KERNELBASE=$TMPDIR/updboot.kernel.$$
-    MODDEPS=$KERNELBASE/moddeps
-    MODALIAS=$KERNELBASE/modules.alias
     BUILDARCH=$5
 
     KERNELNAME=vmlinuz
@@ -107,17 +105,14 @@ INITRDMODS="$USBMODS $FIREWIREMODS $IDEMODS $SCSIMODS $FSMODS $LVMMODS $RAIDMODS
     mkdir -p $INSTIMGPATH
 
 # Stuff that we need
-    TRIMMODALIAS=$IMGPATH/usr/lib/anaconda-runtime/trimmodalias
     TRIMPCIIDS=$IMGPATH/usr/lib/anaconda-runtime/trimpciids
     GETKEYMAPS=$IMGPATH/usr/lib/anaconda-runtime/getkeymaps
     GENINITRDSZ=$IMGPATH/usr/lib/anaconda-runtime/geninitrdsz
     GENMODINFO=$IMGPATH/usr/lib/anaconda-runtime/genmodinfo
     KEYMAPS=$TMPDIR/keymaps-$BUILDARCH.$$
     SCREENFONT=$IMGPATH/usr/lib/anaconda-runtime/screenfont-${BASEARCH}.gz
-    GETMODDEPS=$IMGPATH/usr/lib/anaconda-runtime/moddeps
     MODLIST=$IMGPATH/usr/lib/anaconda-runtime/modlist
     MODINFO=$TMPDIR/modinfo-$BUILDARCH.$$
-    FILTERMODDEPS=$IMGPATH/usr/lib/anaconda-runtime/filtermoddeps
     LOADERBINDIR=$IMGPATH/usr/lib/anaconda-runtime/loader
     BOOTDISKDIR=$IMGPATH/usr/lib/anaconda-runtime/boot
     LANGTABLE=$IMGPATH/usr/lib/anaconda/lang-table
@@ -129,8 +124,8 @@ INITRDMODS="$USBMODS $FIREWIREMODS $IDEMODS $SCSIMODS $FSMODS $LVMMODS $RAIDMODS
 
     touch $MODULESUSED
 
-    REQUIREMENTS="$TRIMMODALIAS $TRIMPCIIDS $PCIIDS $XDRIVERDESCS $GETMODDEPS $GENMODINFO
-		  $FILTERMODDEPS $LANGTABLE $GETKEYMAPS"
+    REQUIREMENTS="$TRIMPCIIDS $PCIIDS $XDRIVERDESCS $GENMODINFO
+		  $LANGTABLE $GETKEYMAPS"
 
     dieLater=
     for n in $REQUIREMENTS; do
@@ -213,18 +208,6 @@ expandModuleSet() {
         if [ $char = '=' ]; then
 	    NAME=$(echo $name | cut -c2-)
 	    SET="$SET $($MODLIST --modinfo-file $MODINFO $NAME)"
-	elif [ $char = '+' ]; then
-	    NAME=$(echo $name | cut -c2-)
-
-	    # all of the modules of this type
-	    $MODLIST --modinfo-file $MODINFO $NAME > $TMPDIR/emsAll.$$
-	    # the modules used that are of this type
-	    sort -u $MODULESUSED | cat - $TMPDIR/emsAll.$$ | sort | 
-		    uniq -d > $TMPDIR/emsUsed.$$
-	    # the modules that are of this type, but not used
-	    SET="$SET $(cat $TMPDIR/emsAll.$$ $TMPDIR/emsUsed.$$ | sort | uniq -u)"
-
-	    rm -f $TMPDIR/emsAll.$$ $TMPDIR/emsUsed.$$
 	else
 	    SET="$SET $name"
 	fi
diff --git a/utils/Makefile b/utils/Makefile
index 143c14e..cca4cbd 100644
--- a/utils/Makefile
+++ b/utils/Makefile
@@ -10,7 +10,7 @@ LOADLIBES =  -lpopt
 CFLAGS += -I.. -I$(LOADERDIR) -fno-strict-aliasing
 RPMCFLAGS = $(CFLAGS) -I/usr/include/rpm
 
-UTILS = modlist moddeps snarffont mapshdr readmap
+UTILS = modlist snarffont mapshdr readmap
 ifeq (s390, $(ARCH))
 UTILS += geninitrdsz
 endif
@@ -39,10 +39,6 @@ moduledeps.o: $(LOADERDIR)/moduledeps.c
 	cp $(LOADERDIR)/moduledeps.c ./
 	$(CC) $(CFLAGS) -c moduledeps.c
 
-moddeps: moddeps.o moduledeps.o
-	$(CC) $(LDFLAGS) -o moddeps moddeps.o moduledeps.o \
-            $(LOADLIBES) -lresolv -lpopt -lbz2
-
 md5.o: md5.c md5.h
 	gcc -c -O -g md5.c -D_FORTIFY_SOURCE=2
 
@@ -58,10 +54,7 @@ install: all
 	mkdir -p $(DESTDIR)/usr/bin
 	mkdir -p $(DESTDIR)/$(RUNTIMEDIR)
 	install -m755 genmodinfo $(DESTDIR)/$(RUNTIMEDIR)
-	install -m755 trimmodalias $(DESTDIR)/$(RUNTIMEDIR)
 	install -m755 trimpciids $(DESTDIR)/$(RUNTIMEDIR)
-	install -m755 moddeps $(DESTDIR)/$(RUNTIMEDIR)
-	install -m755 filtermoddeps $(DESTDIR)/$(RUNTIMEDIR)
 	install -m755 modlist $(DESTDIR)/$(RUNTIMEDIR)
 	install -m755 readmap $(DESTDIR)/$(RUNTIMEDIR)
 	install -m755 mapshdr $(DESTDIR)/$(RUNTIMEDIR)
@@ -70,7 +63,7 @@ install: all
 	fi
 
 clean:	
-	rm -f modlist moddeps snarffont mapshdr readmap geninitrdsz \
+	rm -f modlist snarffont mapshdr readmap geninitrdsz \
 	moduledeps.c moduleinfo.c .depend *.o
 
 depend:
diff --git a/utils/moddeps.c b/utils/moddeps.c
deleted file mode 100644
index 7905d93..0000000
--- a/utils/moddeps.c
+++ /dev/null
@@ -1,91 +0,0 @@
-#include <popt.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <sys/utsname.h>
-
-#include "../isys/isys.h"
-#include "modules.h"
-
-void setFloppyDevice(int flags) {
-}
-
-char *translateString(char *str) {
-	return NULL;
-}
-
-int extractModules(int location, char * modName) {
-    return 0;
-}
-
-void scsiWindow(const char * foo) {
-}
-
-void startNewt(int flags) {
-}
-
-void newtPopWindow(void) {
-}
-
-void newtWinChoice(void) {
-}
-
-void newtWinMessage(void) {
-}
-
-void eject(void) {
-}
-
-void winStatus(void) {
-}
-
-int main(int argc, char ** argv) {
-    poptContext optCon;
-    char * modDepsFile = NULL;
-    char * mod;
-    int rc;
-    char ** list, ** l;
-    struct utsname ut;
-    moduleDeps ml;
-    struct poptOption optionTable[] = {
-	    { "moddeps", 'm', POPT_ARG_STRING, &modDepsFile, 0 },
-	    POPT_AUTOHELP
-	    { 0, 0, 0, 0, 0 }
-    };
-
-    optCon = poptGetContext(NULL, argc, (const char **) argv, optionTable, 0);
-
-    if ((rc = poptGetNextOpt(optCon)) < -1) {
-	fprintf(stderr, "bad option %s: %s\n",
-		       poptBadOption(optCon, POPT_BADOPTION_NOALIAS), 
-		       poptStrerror(rc));
-	exit(1);
-    }
-
-    if (!modDepsFile) {
-        modDepsFile = malloc(100);
-	uname(&ut);
-	sprintf(modDepsFile, "/lib/modules/%s/modules.dep",
-		ut.release);
-    }
-
-    ml = mlNewDeps();
-    if (mlLoadDeps(&ml, modDepsFile)) {
-        fprintf(stderr, "Failed to read %s\n", modDepsFile);
-	exit(1);
-    }
-
-    while ((mod = (char *) poptGetArg(optCon))) {
-        list = mlGetDeps(ml, mod);
-	if (list) {
-	    for (l = list; *l; l++)
-	        printf("%s%s", l == list ? "" : " ", *l);
-	    printf("\n");
-	}
-    }
-
-    return 0;
-}
-
-void logMessage(const char * s, ...) {
-}
diff --git a/utils/trimmodalias b/utils/trimmodalias
deleted file mode 100755
index f8dad21..0000000
--- a/utils/trimmodalias
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/usr/bin/python
-
-import os
-import sys
-import string
-
-modules = []
-
-args = sys.argv[1:]
-
-for arg in args:
-    arg = os.path.basename(arg)
-    arg = arg.replace('.ko','')
-    modules.append(arg)
-
-f = sys.stdin.readline()
-
-while f:
-    f = f.strip()
-    for mod in modules:
-	if f.endswith(' %s' % (mod,)):
-	    print f
-    f = sys.stdin.readline()
-- 
1.5.3.7

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux