From: Masahiro Yamada <yamada.m@jp.panasonic.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 2/3] scripts: refetch scripts/setlocalversion from Linux 3.16
Date: Fri, 22 Aug 2014 19:42:28 +0900 [thread overview]
Message-ID: <1408704149-14704-3-git-send-email-yamada.m@jp.panasonic.com> (raw)
In-Reply-To: <1408704149-14704-1-git-send-email-yamada.m@jp.panasonic.com>
Now we have CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO
in Kconfig so we can use scripts/setlocalversion without
any adjustment. Copy it from Linux 3.16 as is.
Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
---
scripts/setlocalversion | 31 ++++++++++++++-----------------
1 file changed, 14 insertions(+), 17 deletions(-)
diff --git a/scripts/setlocalversion b/scripts/setlocalversion
index f551b4c..63d91e2 100755
--- a/scripts/setlocalversion
+++ b/scripts/setlocalversion
@@ -3,8 +3,10 @@
# This scripts adds local version information from the version
# control systems git, mercurial (hg) and subversion (svn).
#
-# It was originally copied from the Linux kernel v3.2.0-rc4 and modified
-# to support the U-Boot build-system.
+# If something goes wrong, send a mail the kernel build mailinglist
+# (see MAINTAINERS) and CC Nico Schottelius
+# <nico-linuxsetlocalversion -at- schottelius.org>.
+#
#
usage() {
@@ -41,7 +43,8 @@ scm_version()
fi
# Check for git and a git repo.
- if test -e .git && head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
+ if test -z "$(git rev-parse --show-cdup 2>/dev/null)" &&
+ head=`git rev-parse --verify --short HEAD 2>/dev/null`; then
# If we are at a tagged commit (like "v2.6.30-rc6"), we ignore
# it, because this version is defined in the top level Makefile.
@@ -69,12 +72,8 @@ scm_version()
printf -- '-svn%s' "`git svn find-rev $head`"
fi
- # Update index only on r/w media
- [ -w . ] && git update-index --refresh --unmerged > /dev/null
-
# Check for uncommitted changes
- if git diff-index --name-only HEAD | grep -v "^scripts/package" \
- | read dummy; then
+ if git diff-index --name-only HEAD | grep -qv "^scripts/package"; then
printf '%s' -dirty
fi
@@ -107,7 +106,7 @@ scm_version()
fi
# Check for svn and a svn repo.
- if rev=`svn info 2>/dev/null | grep '^Last Changed Rev'`; then
+ if rev=`LANG= LC_ALL= LC_MESSAGES=C svn info 2>/dev/null | grep '^Last Changed Rev'`; then
rev=`echo $rev | awk '{print $NF}'`
printf -- '-svn%s' "$rev"
@@ -141,14 +140,12 @@ if $scm_only; then
exit
fi
-#if test -e include/config/auto.conf; then
-# . include/config/auto.conf
-#else
-# echo "Error: kernelrelease not valid - run 'make prepare' to update it"
-# exit 1
-#fi
-CONFIG_LOCALVERSION=
-CONFIG_LOCALVERSION_AUTO=y
+if test -e include/config/auto.conf; then
+ . include/config/auto.conf
+else
+ echo "Error: kernelrelease not valid - run 'make prepare' to update it"
+ exit 1
+fi
# localversion* files in the build and source directory
res="$(collect_files localversion*)"
--
1.9.1
next prev parent reply other threads:[~2014-08-22 10:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-22 10:42 [U-Boot] [PATCH 0/3] Kconfig: import some options related to general setup Masahiro Yamada
2014-08-22 10:42 ` [U-Boot] [PATCH 1/3] kconfig: add CONFIG_LOCALVERSION and CONFIG_LOCALVERSION_AUTO Masahiro Yamada
2014-08-29 14:41 ` [U-Boot] [U-Boot, " Tom Rini
2014-08-22 10:42 ` Masahiro Yamada [this message]
2014-08-29 14:41 ` [U-Boot] [U-Boot, 2/3] scripts: refetch scripts/setlocalversion from Linux 3.16 Tom Rini
2014-08-22 10:42 ` [U-Boot] [PATCH 3/3] kconfig: add CONFIG_CC_OPTIMIZE_FOR_SIZE Masahiro Yamada
2014-08-29 14:41 ` [U-Boot] [U-Boot,3/3] " Tom Rini
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1408704149-14704-3-git-send-email-yamada.m@jp.panasonic.com \
--to=yamada.m@jp.panasonic.com \
--cc=u-boot@lists.denx.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox