summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mylchreest <johnm@gentoo.org>2005-07-05 11:31:12 +0000
committerJohn Mylchreest <johnm@gentoo.org>2005-07-05 11:31:12 +0000
commit1b48b87eb691cb28fbbd39a2ea2a6c04b556b11a (patch)
tree1b4f03ac3d468d80a43d6952653733076a4d4847 /sys-kernel/module-rebuild
parentStable on sparc. (diff)
downloadgentoo-2-1b48b87eb691cb28fbbd39a2ea2a6c04b556b11a.tar.gz
gentoo-2-1b48b87eb691cb28fbbd39a2ea2a6c04b556b11a.tar.bz2
gentoo-2-1b48b87eb691cb28fbbd39a2ea2a6c04b556b11a.zip
Fixes bugs #97765 & #97796
(Portage version: 2.0.51.22-r1)
Diffstat (limited to 'sys-kernel/module-rebuild')
-rw-r--r--sys-kernel/module-rebuild/ChangeLog9
-rw-r--r--sys-kernel/module-rebuild/files/digest-module-rebuild-0.5 (renamed from sys-kernel/module-rebuild/files/digest-module-rebuild-0.4)0
-rw-r--r--sys-kernel/module-rebuild/files/module-rebuild-0.5 (renamed from sys-kernel/module-rebuild/files/module-rebuild-0.4)26
-rw-r--r--sys-kernel/module-rebuild/module-rebuild-0.5.ebuild (renamed from sys-kernel/module-rebuild/module-rebuild-0.4.ebuild)4
4 files changed, 27 insertions, 12 deletions
diff --git a/sys-kernel/module-rebuild/ChangeLog b/sys-kernel/module-rebuild/ChangeLog
index f98534b67667..9857095bfb1a 100644
--- a/sys-kernel/module-rebuild/ChangeLog
+++ b/sys-kernel/module-rebuild/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-kernel/module-rebuild
# Copyright 1999-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/module-rebuild/ChangeLog,v 1.6 2005/07/01 09:59:39 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/module-rebuild/ChangeLog,v 1.7 2005/07/05 11:31:12 johnm Exp $
+
+*module-rebuild-0.5 (05 Jul 2005)
+
+ 05 Jul 2005; John Mylchreest <johnm@gentoo.org> -files/module-rebuild-0.4,
+ +files/module-rebuild-0.5, -module-rebuild-0.4.ebuild,
+ +module-rebuild-0.5.ebuild:
+ Fixes bugs #97765 & #97796
01 Jul 2005; David Holm <dholm@gentoo.org> module-rebuild-0.4.ebuild:
Added to ~ppc.
diff --git a/sys-kernel/module-rebuild/files/digest-module-rebuild-0.4 b/sys-kernel/module-rebuild/files/digest-module-rebuild-0.5
index e69de29bb2d1..e69de29bb2d1 100644
--- a/sys-kernel/module-rebuild/files/digest-module-rebuild-0.4
+++ b/sys-kernel/module-rebuild/files/digest-module-rebuild-0.5
diff --git a/sys-kernel/module-rebuild/files/module-rebuild-0.4 b/sys-kernel/module-rebuild/files/module-rebuild-0.5
index 3977adf69188..8dd1679f470c 100644
--- a/sys-kernel/module-rebuild/files/module-rebuild-0.4
+++ b/sys-kernel/module-rebuild/files/module-rebuild-0.5
@@ -12,8 +12,8 @@ if [[ `id -u` != 0 ]]; then
exit 1
fi
-R_VERSION="0.4"
-R_MODULES="${ROOT}/usr/share/module-rebuild/moduledb"
+R_VERSION="0.5"
+R_MODULES="${ROOT}/var/lib/module-rebuild/moduledb"
R_PORTAGEQ="`which portageq 2>/dev/null`"
if [[ -z ${R_PORTAGEQ} ]]; then
echo "** FATAL: Unable to find portageq."
@@ -32,7 +32,7 @@ package_valid() {
package_valid_strict() {
local package=${1}
- package_valid ${package} && [[ -z ${package%-[0-9]*} ]] && return 0 || return 1
+ package_valid ${package} && [[ -z ${package%%*-[0-9]*} ]] && return 0 || return 1
}
package_exists() {
@@ -113,7 +113,7 @@ db_module_list() {
pkg=${line#*:}
auto=${pkg/:*}
pkg=${pkg/*:}
-
+
if [[ ${R_OPTION_X} == 1 ]]; then
pkg=${pkg%-[0-9]*}
package_valid ${pkg}
@@ -225,11 +225,6 @@ EOF
}
-if [[ ! -f ${ROOT}/usr/share/module-rebuild/moduledb ]]; then
- [[ ! -d ${ROOT}/usr/share/module-rebuild/ ]] && mkdir ${ROOT}/usr/share/module-rebuild/
- touch ${ROOT}/usr/share/module-rebuild/moduledb
-fi
-
check_validity() {
local package=${1} strict=${2:-0} ret=1
@@ -272,6 +267,19 @@ for i in ${@:${OPTIND}}; do
done
unset i x
+# If the moduledb doesnt exist, lets populate it automatically.
+if [[ ! -f ${R_MODULES} ]]; then
+ echo -e "${C_BOLD}${C_RED}No moduledb found...${C_NORM}"
+
+ [[ ! -d ${ROOT}/var/lib/module-rebuild/ ]] && \
+ echo -e "${C_BOLD}Creating moduledb state directory.${C_NORM}"; \
+ mkdir -p ${ROOT}/var/lib/module-rebuild/
+
+ echo -e "${C_BOLD}Populating moduledb...${C_NORM}"
+ touch ${R_MODULES}
+ R_PARAMS[0]=populate
+fi
+
case ${R_PARAMS[0]} in
add) check_validity ${R_PARAMS[1]} 1; db_module_add ${R_PARAMS[1]};;
del) check_validity ${R_PARAMS[1]}; db_module_del ${R_PARAMS[1]};;
diff --git a/sys-kernel/module-rebuild/module-rebuild-0.4.ebuild b/sys-kernel/module-rebuild/module-rebuild-0.5.ebuild
index ef5ca64ababf..3e584c76be37 100644
--- a/sys-kernel/module-rebuild/module-rebuild-0.4.ebuild
+++ b/sys-kernel/module-rebuild/module-rebuild-0.5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2005 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-kernel/module-rebuild/module-rebuild-0.4.ebuild,v 1.2 2005/07/01 09:59:39 dholm Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/module-rebuild/module-rebuild-0.5.ebuild,v 1.1 2005/07/05 11:31:12 johnm Exp $
DESCRIPTION="A utility to rebuild any kernel modules which you have installed."
HOMEPAGE="http://www.gentoo.org/"
@@ -8,7 +8,7 @@ SRC_URI=""
LICENSE="GPL-2"
SLOT="0"
-KEYWORDS="~amd64 ~ppc ~x86"
+KEYWORDS="~x86 ~amd64 ~ppc"
IUSE=""
DEPEND=""