Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src Pull up following revision(s) (requested by christos in t...
details: https://anonhg.NetBSD.org/src/rev/8b90c1b847ac
branches: netbsd-6
changeset: 773765:8b90c1b847ac
user: riz <riz%NetBSD.org@localhost>
date: Fri Feb 17 00:08:37 2012 +0000
description:
Pull up following revision(s) (requested by christos in ticket #6):
distrib/sets/sets.subr: revision 1.136
share/mk/bsd.kmodule.mk: revision 1.34
sys/conf/osrelease.sh: revision 1.122
Add new -k (for kernel modules) flag to return MM.99.pp for current and MM.mm
for the release branch.
use osrelease -k to avoid that the path is 6.0_BETA
use osrelease.sh -k instead of hand-rolled logic.
diffstat:
distrib/sets/sets.subr | 12 ++++--------
share/mk/bsd.kmodule.mk | 4 ++--
sys/conf/osrelease.sh | 13 ++++++++++++-
3 files changed, 18 insertions(+), 11 deletions(-)
diffs (94 lines):
diff -r 009b60c5ea22 -r 8b90c1b847ac distrib/sets/sets.subr
--- a/distrib/sets/sets.subr Thu Feb 16 19:57:07 2012 +0000
+++ b/distrib/sets/sets.subr Fri Feb 17 00:08:37 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: sets.subr,v 1.135 2012/02/07 19:13:24 joerg Exp $
+# $NetBSD: sets.subr,v 1.135.2.1 2012/02/17 00:08:37 riz Exp $
#
#
@@ -159,11 +159,7 @@
xlists="xbase xcomp xetc xfont xserver"
extlists="extbase extcomp extetc"
-OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -n`
-# for release branches, use X.Y version, for -current use X.Y.Z
-if [ ! "${OSRELEASE%.99}" = "${OSRELEASE}" ]; then
- OSRELEASE=`${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh`
-fi
+OSRELEASE=$(${HOST_SH} ${NETBSDSRCDIR}/sys/conf/osrelease.sh -k)
MODULEDIR="stand/${MACHINE}/${OSRELEASE}/modules"
SUBST="s#@MODULEDIR@#${MODULEDIR}#g"
SUBST="${SUBST};s#@OSRELEASE@#${OSRELEASE}#g"
@@ -176,7 +172,7 @@
# In each file, a record consists of a path and a System Package name,
# separated by whitespace. E.g.,
#
-# # $NetBSD: sets.subr,v 1.135 2012/02/07 19:13:24 joerg Exp $
+# # $NetBSD: sets.subr,v 1.135.2.1 2012/02/17 00:08:37 riz Exp $
# . base-sys-root [keyword[,...]]
# ./altroot base-sys-root
# ./bin base-sys-root
@@ -500,7 +496,7 @@
print_set_lists()
{
for setname; do
- list=`list_set_lists $setname`
+ list=$(list_set_lists $setname)
for l in $list; do
echo $l
if $verbose; then
diff -r 009b60c5ea22 -r 8b90c1b847ac share/mk/bsd.kmodule.mk
--- a/share/mk/bsd.kmodule.mk Thu Feb 16 19:57:07 2012 +0000
+++ b/share/mk/bsd.kmodule.mk Fri Feb 17 00:08:37 2012 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: bsd.kmodule.mk,v 1.33 2011/09/11 18:38:03 mbalmer Exp $
+# $NetBSD: bsd.kmodule.mk,v 1.33.4.1 2012/02/17 00:08:37 riz Exp $
# We are not building this with PIE
MKPIE=no
@@ -85,7 +85,7 @@
##### Install rules
.if !target(kmodinstall)
.if !defined(KMODULEDIR)
-_OSRELEASE!= ${HOST_SH} $S/conf/osrelease.sh
+_OSRELEASE!= ${HOST_SH} $S/conf/osrelease.sh -k
# Ensure these are recorded properly in METALOG on unprived installes:
KMODULEARCHDIR?= ${MACHINE}
_INST_DIRS= ${DESTDIR}/stand/${KMODULEARCHDIR}
diff -r 009b60c5ea22 -r 8b90c1b847ac sys/conf/osrelease.sh
--- a/sys/conf/osrelease.sh Thu Feb 16 19:57:07 2012 +0000
+++ b/sys/conf/osrelease.sh Fri Feb 17 00:08:37 2012 +0000
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $NetBSD: osrelease.sh,v 1.120.18.1 2012/02/16 18:59:42 riz Exp $
+# $NetBSD: osrelease.sh,v 1.120.18.2 2012/02/17 00:08:38 riz Exp $
#
# Copyright (c) 1997 The NetBSD Foundation, Inc.
# All rights reserved.
@@ -54,6 +54,7 @@
# return the next major number (e.g. for 5.99.nn, return 6)
# -n: return MM.mm
# -s: return MMmmpp (no dots)
+# -k: return MM.mm on release branch, MM.mm.pp on current.
option="$1"
@@ -74,6 +75,16 @@
set -- $rel_MM ${rel_mm#0}$beta $*
case "$option" in
+-k)
+ if [ ${rel_mm#0} = 99 ]
+ then
+ IFS=.
+ echo "$*"
+ else
+ echo "${rel_MM}.${rel_mm#0}"
+ fi
+ ;;
+
-m)
echo "$(((${rel_MMmm}+1)/100))"
;;
Home |
Main Index |
Thread Index |
Old Index