Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichal Marek <mmarek@suse.cz>2011-07-22 21:29:25 +0200
committerMichal Marek <mmarek@suse.cz>2011-07-22 21:29:25 +0200
commitbbe1cb6d929f3fbb97bc22ff6be162dcbe99037c (patch)
treeab9be321bcd74429db530f0801d747c89b153565
parent50c05d7eb5e0501404efb06060fa56fbe5981340 (diff)
parentaecea14d07e72a88b2926bed0f5ca276a4988b66 (diff)
Merge branch 'scripts'
-rwxr-xr-xscripts/osc_wrapper2
-rwxr-xr-xscripts/run_oldconfig.sh64
-rwxr-xr-xscripts/sequence-patch.sh2
-rwxr-xr-xscripts/series2git6
4 files changed, 69 insertions, 5 deletions
diff --git a/scripts/osc_wrapper b/scripts/osc_wrapper
index cb996a6454..94b4440d33 100755
--- a/scripts/osc_wrapper
+++ b/scripts/osc_wrapper
@@ -111,7 +111,7 @@ create_project()
local project=$1
local archs=$(printf '<arch>%s</arch>' $ARCHS)
- local repository="<repository name=\"${PROJECT//:/_}\"><path repository=\"$REPOSITORY\" project=\"$PROJECT\"/>$archs</repository>"
+ local repository="<repository name=\"standard\"><path repository=\"$REPOSITORY\" project=\"$PROJECT\"/>$archs</repository>"
local title="<title>Kernel Builds for $(sed -n 's/^GIT Branch: //p' *source-timestamp)</title>"
local meta="<project name=\"$project\">$title<description/>$repository</project>"
echo "Creating project $project"
diff --git a/scripts/run_oldconfig.sh b/scripts/run_oldconfig.sh
index c601de7781..871a31887b 100755
--- a/scripts/run_oldconfig.sh
+++ b/scripts/run_oldconfig.sh
@@ -240,7 +240,60 @@ ${prefix}scripts/guards $EXTRA_SYMBOLS < ${prefix}series.conf \
EXTRA_SYMBOLS="$(echo $EXTRA_SYMBOLS | sed -e 's# *[Rr][Tt] *##g')"
-last_arch=
+mkdir $TMPDIR/reuse
+
+ask_reuse_config()
+{
+ local old=$1 new=$2
+
+ # if the user either asked to never reuse the config or if this config
+ # already reused something, do nothing
+ for f in $TMPDIR/reuse/{never,all,$cpu_arch-all,all-$flavor}; do
+ if test -e "$f"; then
+ return
+ fi
+ done
+ diff $old $new | awk >$TMPDIR/reuse/diff '
+ /< .*CONFIG_/ { x[substr($0, 3)]--; }
+ /> .*CONFIG_/ { x[substr($0, 3)]++; }
+ END {
+ for (l in x)
+ if (x[l] > 0)
+ print l;
+ }'
+
+ if test ! -s $TMPDIR/reuse/diff; then
+ return
+ fi
+ while :; do
+ echo
+ cat $TMPDIR/reuse/diff | sed 's/^/ /'
+ echo
+ echo "Use these settings for other configurations?"
+ read -p "[Y]es/for [A]rch $cpu_arch/for [F]lavor $flavor/[N]o/[E]dit/ne[V]er "
+ case "$REPLY" in
+ [Yy] | "")
+ mv $TMPDIR/reuse/diff $TMPDIR/reuse/all
+ break ;;
+ [Aa])
+ mv $TMPDIR/reuse/diff $TMPDIR/reuse/$cpu_arch-all
+ break ;;
+ [Ff])
+ mv $TMPDIR/reuse/diff $TMPDIR/reuse/all-$flavor
+ break ;;
+ [Ee])
+ ${VISUAL:-${EDITOR:-vi}} $TMPDIR/reuse/diff
+ ;;
+ [Nn])
+ rm $TMPDIR/reuse/diff
+ break ;;
+ [Vv])
+ rm $TMPDIR/reuse/diff
+ touch $TMPDIR/reuse/never
+ break ;;
+ esac
+ done
+}
for config in $config_files; do
cpu_arch=${config%/*}
@@ -288,6 +341,12 @@ for config in $config_files; do
fi \
| bash ${prefix}rpm/config-subst CONFIG_SUSE_KERNEL y \
> .config
+ for f in $TMPDIR/reuse/{all,$cpu_arch-all,all-$flavor}; do
+ if test -e "$f"; then
+ echo "Reusing choice for ${f##*/}"
+ cat "$f" >>.config
+ fi
+ done
export KCONFIG_NOTIMESTAMP=1
case "$mode" in
menuconfig)
@@ -296,17 +355,20 @@ for config in $config_files; do
yes)
_region_msg_ "working on $config"
yes '' | make $MAKE_ARGS oldconfig
+ touch $TMPDIR/reuse/never
;;
allmodconfig)
_region_msg_ "working on $config"
cp .config config-old
KCONFIG_ALLCONFIG=config-old make $MAKE_ARGS allmodconfig
rm config-old
+ touch $TMPDIR/reuse/never
;;
*)
_region_msg_ "working on $config"
make $MAKE_ARGS oldconfig
esac
+ ask_reuse_config $config .config
if ! diff -U0 $config .config; then
sed '/^# Linux kernel version:/d' < .config > $config
fi
diff --git a/scripts/sequence-patch.sh b/scripts/sequence-patch.sh
index 9b4099d07e..20c1c5b6a5 100755
--- a/scripts/sequence-patch.sh
+++ b/scripts/sequence-patch.sh
@@ -298,7 +298,7 @@ if ! [ -d $ORIG_DIR ]; then
fi
if $VANILLA; then
-PATCHES=( $(scripts/guards $SYMBOLS < series.conf | egrep kernel.org\|rpmify ) )
+PATCHES=( $(scripts/guards $SYMBOLS < series.conf | egrep '^patches\.(kernel\.org|rpmify)/') )
else
PATCHES=( $(scripts/guards $SYMBOLS < series.conf) )
fi
diff --git a/scripts/series2git b/scripts/series2git
index 1fcab08774..7e8d025d5c 100755
--- a/scripts/series2git
+++ b/scripts/series2git
@@ -190,9 +190,11 @@ apply_patch()
;;
esac
local subject=$(ex_hdr Subject "$patch")
- GIT_AUTHOR_DATE=$(ex_hdr Date "$patch" 2>/dev/null)
+ GIT_AUTHOR_DATE=$(ex_hdr Date "$patch")
+ GIT_AUTHOR_DATE=$(ex_hdr Date "$patch" \
+ | perl -p -e 's/(\d\d:\d\d:\d\d) (\d{4})/$2 $1/;s/:$//')
if test -n "$GIT_AUTHOR_DATE"; then
- GIT_AUTHOR_DATE=$(date -R -d"$GIT_AUTHOR_DATE")
+ GIT_AUTHOR_DATE=$(date -R -d"$GIT_AUTHOR_DATE" 2>/dev/null)
fi
export GIT_AUTHOR_NAME GIT_AUTHOR_EMAIL GIT_AUTHOR_DATE
(