Ping?

On Thu, 2010-08-05 at 10:31 +0200, Palande Ameya (Nokia-MS/Helsinki)
wrote:
> Instead of reading kernel base version from config.sh, we can read it from
> kernel.spec and get rid of config.sh dependency.
> 
> Signed-off-by: Ameya Palande <[email protected]>
> ---
>  scripts/config.sh         |    5 -----
>  scripts/sequence-patch.sh |   41 ++++++++++++++++++++++-------------------
>  2 files changed, 22 insertions(+), 24 deletions(-)
>  delete mode 100644 scripts/config.sh
> 
> diff --git a/scripts/config.sh b/scripts/config.sh
> deleted file mode 100644
> index 6d06145..0000000
> --- a/scripts/config.sh
> +++ /dev/null
> @@ -1,5 +0,0 @@
> -# The version of the main tarball to use
> -SRCVERSION=2.6.34
> -
> -# sequence-patch.sh default args
> -# SEQUENCE_PATCH_DEF_ARGS=
> diff --git a/scripts/sequence-patch.sh b/scripts/sequence-patch.sh
> index d8cbfdf..0ff3f99 100755
> --- a/scripts/sequence-patch.sh
> +++ b/scripts/sequence-patch.sh
> @@ -1,5 +1,4 @@
>  #! /bin/bash
> -
>  #############################################################################
>  # Copyright (c) 2003-2005,2007-2009 Novell, Inc.
>  # All Rights Reserved.
> @@ -20,7 +19,6 @@
>  # you may find current contact information at www.novell.com
>  #############################################################################
>  
> -source $(dirname $0)/config.sh
>  source $(dirname $0)/wd-functions.sh
>  
>  fuzz="-F0"
> @@ -96,6 +94,23 @@ case $PATCH_VERSION in
>      ;;
>  esac
>  
> +# The rc patch
> +RC_PATCH=
> +SPEC_FILE=$(dirname $0)/../kernel.spec
> +SUBLEVEL=$(cat ${SPEC_FILE} | sed -e '/^%define base_sublevel/!d')
> +SUBLEVEL=${SUBLEVEL##* }
> +SRCVERSION=2.6.$SUBLEVEL
> +RELEASED=$(cat ${SPEC_FILE} | sed -e '/^%define released_kernel/!d')
> +RELEASED=${RELEASED##* }
> +if [ $RELEASED -eq 0 ]; then
> +    RCREV=$(cat ${SPEC_FILE} | sed -e '/^%define rcrev/!d')
> +    RCREV=${RCREV##* }
> +
> +    RC_PATCH=patch-2.6.$(expr $SUBLEVEL + 1)-rc${RCREV}.bz2
> +else
> +    RC_PATCH=
> +fi
> +
>  # Check SCRATCH_AREA.
>  if [ -z "$SCRATCH_AREA" ]; then
>      echo "SCRATCH_AREA not defined (defaulting to \"tmp\")"
> @@ -199,26 +214,14 @@ if ! [ -d $ORIG_DIR ]; then
>      find $ORIG_DIR -type f | xargs chmod a-w,a+r
>  fi
>  
> -# The rc patch
> -RC_PATCH=
> -SPEC_FILE=$(dirname $0)/../kernel.spec
> -RELEASED=$(cat ${SPEC_FILE} | sed -e '/^%define released_kernel/!d')
> -RELEASED=${RELEASED##* }
> -if [ $RELEASED -eq 0 ]; then
> -    SUBLEVEL=$(cat ${SPEC_FILE} | sed -e '/^%define base_sublevel/!d')
> -    SUBLEVEL=${SUBLEVEL##* }
> -
> -    RCREV=$(cat ${SPEC_FILE} | sed -e '/^%define rcrev/!d')
> -    RCREV=${RCREV##* }
> -
> -    RC_PATCH=patch-2.6.$(expr $SUBLEVEL + 1)-rc${RCREV}.bz2
> +if [ -z "$RC_PATCH" ]; then
> +    PATCHES=($(cat series | \
> +         sed -e '/^#/d' -e '/^$/d' -e 's/^/patches\//' | tr '\n' ' ') )
>  else
> -    RC_PATCH=
> +    PATCHES=( patches\/${RC_PATCH} $(cat series | \
> +         sed -e '/^#/d' -e '/^$/d' -e 's/^/patches\//' | tr '\n' ' ') )
>  fi
>  
> -PATCHES=( patches\/${RC_PATCH} \
> - $(cat series | sed -e '/^#/d' -e '/^$/d' -e 's/^/patches\//' | tr '\n' ' ') 
> )
> -
>  # Check if patch $LIMIT exists
>  if [ -n "$LIMIT" ]; then
>      for ((n=0; n<${#patch...@]}; n++)); do



_______________________________________________
MeeGo-dev mailing list
[email protected]
http://lists.meego.com/listinfo/meego-dev

Reply via email to