rpms/kernel/F-12/scripts sort-config,1.4,1.5
Chuck Ebbert
cebbert at fedoraproject.org
Wed Sep 16 23:25:23 UTC 2009
Author: cebbert
Update of /cvs/pkgs/rpms/kernel/F-12/scripts
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv8567
Modified Files:
sort-config
Log Message:
hack an option to find impossible config vars
Index: sort-config
===================================================================
RCS file: /cvs/pkgs/rpms/kernel/F-12/scripts/sort-config,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -p -r1.4 -r1.5
--- sort-config 19 Aug 2009 12:24:33 -0000 1.4
+++ sort-config 16 Sep 2009 23:25:11 -0000 1.5
@@ -8,32 +8,30 @@ TGT1=(${TGT[*]#kernel-*/linux-*.noarch/c
if [ $# -lt 2 ] ; then
echo -e "Usage:\n $(basename $0) [-dfcn] input target\n"
echo -e " Sort input config file into the same order as the target\n"
+ echo -e " -c: insert comments about non-matching items"
echo -e " -d: show raw unsorted output with extra debug text"
echo -e " -f: force output to match what is in the target config"
- echo -e " -c: insert comments about non-matching items"
+ echo -e " -i: find impossible config items"
echo -e " -n: do not sort output\n"
echo -e " input: source config file" ' [' "${SRC[*]#config-}" ']\n'
echo -e " target: output arch name" ' [' "${TGT1[*]%.config}" ']\n'
exit 1
fi
-while getopts "dfcn" OPTION ; do
+while getopts "cdfin" OPTION ; do
case $OPTION in
+c)
+ ADDCOMMENT=1 ;;
d)
- DEBUG=1
-;;
+ DEBUG=1 ;;
f)
- FORCE=1
-;;
-c)
- ADDCOMMENT=1
-;;
+ FORCE=1 ;;
+i)
+ FIND_IMPOSS=1 ;;
n)
- NOSORT=1
-;;
+ NOSORT=1 ;;
\?)
- exit 2
-;;
+ exit 2 ;;
esac
done
@@ -44,12 +42,12 @@ fi
shift $((OPTIND-1))
-if [ -f xx00 -o -f xx01 -o -f xx99 ] ; then
+if [ -f xx00 -o -f xx01 -o -f xx99 -o -f xx98 ] ; then
echo "WARNING! Output files named xx?? already exist." >&2
read -p "Press <Enter> to erase files, or Ctrl-C to exit..."
echo >&2
fi
-rm -f xx00 xx01 xx99
+rm -f xx00 xx01 xx99 xx98
SRCFILE=config-$1
[ ! -f $SRCFILE ] && echo "Input file" $SRCFILE "missing" && exit 2
@@ -57,6 +55,12 @@ SRCFILE=config-$1
TGTFILE=kernel-*/linux-*.noarch/configs/kernel-2.6.*-$2.config
[ ! -f $TGTFILE ] && echo "No target file matching" $TGTFILE "exists" && exit 2
+[ "$FIND_IMPOSS" ] && \
+ find kernel-*/*.noarch -name Kconfig\* -type f \
+ | xargs grep -s -h '^config ' \
+ | sed 's/^config /CONFIG_/' \
+ | sort | uniq >xx98
+
IX=0
IN=0
declare -a SAVECOMMENT
@@ -104,6 +108,10 @@ cat ${SRCFILE} | while read TEXT ; do
fi
fi
done
+ if [ -z "$LINE" -a -z "$COMMENT" -a "$FIND_IMPOSS" ] ; then
+ IMPOSS=$(grep -n "$OPTNAME" xx98)
+ [ -z "$IMPOSS" ] && COMMENT="# -- Next option is impossible --"
+ fi
fi
fi
@@ -165,4 +173,4 @@ else
fi
-rm -f xx00 xx01 xx99
+rm -f xx00 xx01 xx99 xx98
More information about the fedora-extras-commits
mailing list