summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mylchreest <johnm@gentoo.org>2005-06-30 17:27:02 +0000
committerJohn Mylchreest <johnm@gentoo.org>2005-06-30 17:27:02 +0000
commitde44eac517a2c6307ab1bcb9debe2d582a920f19 (patch)
tree8c3bc4f771366c534ef43e79c1c3ae0da85bded0 /sys-kernel/module-rebuild
parentFix use invocation (diff)
downloadgentoo-2-de44eac517a2c6307ab1bcb9debe2d582a920f19.tar.gz
gentoo-2-de44eac517a2c6307ab1bcb9debe2d582a920f19.tar.bz2
gentoo-2-de44eac517a2c6307ab1bcb9debe2d582a920f19.zip
Moving root check. Fixing bug #94424 - thanks mostly to Timothy Kilbourn.
(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.3 (renamed from sys-kernel/module-rebuild/files/digest-module-rebuild-0.2)0
-rwxr-xr-xsys-kernel/module-rebuild/files/module-rebuild-0.3 (renamed from sys-kernel/module-rebuild/files/module-rebuild-0.2)38
-rw-r--r--sys-kernel/module-rebuild/module-rebuild-0.3.ebuild (renamed from sys-kernel/module-rebuild/module-rebuild-0.2.ebuild)2
4 files changed, 30 insertions, 19 deletions
diff --git a/sys-kernel/module-rebuild/ChangeLog b/sys-kernel/module-rebuild/ChangeLog
index 1c7799fdaf11..b4acaf5a9548 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.3 2005/05/19 17:40:00 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/module-rebuild/ChangeLog,v 1.4 2005/06/30 17:27:02 johnm Exp $
+
+*module-rebuild-0.3 (30 Jun 2005)
+
+ 30 Jun 2005; John Mylchreest <johnm@gentoo.org> -files/module-rebuild-0.2,
+ +files/module-rebuild-0.3, -module-rebuild-0.2.ebuild,
+ +module-rebuild-0.3.ebuild:
+ Moving root check. Fixing bug #94424 - thanks mostly to Timothy Kilbourn.
19 May 2005; <dang@gentoo.org> module-rebuild-0.2.ebuild:
Added ~amd64
diff --git a/sys-kernel/module-rebuild/files/digest-module-rebuild-0.2 b/sys-kernel/module-rebuild/files/digest-module-rebuild-0.3
index e69de29bb2d1..e69de29bb2d1 100644
--- a/sys-kernel/module-rebuild/files/digest-module-rebuild-0.2
+++ b/sys-kernel/module-rebuild/files/digest-module-rebuild-0.3
diff --git a/sys-kernel/module-rebuild/files/module-rebuild-0.2 b/sys-kernel/module-rebuild/files/module-rebuild-0.3
index 42bdc7c035c1..d70d29966e1c 100755
--- a/sys-kernel/module-rebuild/files/module-rebuild-0.2
+++ b/sys-kernel/module-rebuild/files/module-rebuild-0.3
@@ -7,7 +7,12 @@
# Written by John Mylchreest (johnm@gentoo.org)
# Copyright Gentoo Linux
-R_VERSION="0.2"
+if [[ `id -u` != 0 ]]; then
+ echo "This application must be ran as root."
+ exit 1
+fi
+
+R_VERSION="0.3"
R_MODULES="${ROOT}/usr/share/module-rebuild/moduledb"
R_PORTAGEQ="`which portageq 2>/dev/null`"
if [[ -z ${R_PORTAGEQ} ]]; then
@@ -31,13 +36,13 @@ 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() {
local package=${1}
- package=${package//-[0-9]*}
+ package=${package%-[0-9]*}
if $(${R_PORTAGEQ} has_version / ${package}); then
return 0
else
@@ -128,16 +133,20 @@ db_module_list() {
echo -e "${C_BOLD}${C_RED}** There are no known modules. Quitting.${C_NORM}"
exit 1
fi
-
- echo -e "${C_BOLD}${C_GREEN}** Packages which I will emerge are:${C_NORM}"
- for pkg in ${tomerge[@]}; do
- echo -e "\t${pkg}"
- done
- echo -e "${C_BOLD}${C_GREEN}** Packages which I will ignore are:${C_NORM}"
- for pkg in ${toignore[@]}; do
- echo -e "\t${pkg}"
- done
+ if [[ -n ${tomerge[@]} ]]; then
+ echo -e "${C_BOLD}${C_GREEN}** Packages which I will emerge are:${C_NORM}"
+ for pkg in ${tomerge[@]}; do
+ echo -e "\t${pkg}"
+ done
+ fi
+
+ if [[ -n ${toignore[@]} ]]; then
+ echo -e "${C_BOLD}${C_GREEN}** Packages which I will ignore are:${C_NORM}"
+ for pkg in ${toignore[@]}; do
+ echo -e "\t${pkg}"
+ done
+ fi
}
db_module_populate() {
@@ -209,11 +218,6 @@ EOF
}
-if [[ `id -u` != 0 ]]; then
- echo "This application must be ran as root."
- exit 1
-fi
-
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
diff --git a/sys-kernel/module-rebuild/module-rebuild-0.2.ebuild b/sys-kernel/module-rebuild/module-rebuild-0.3.ebuild
index 0d662f291f63..c0d0d56c39c4 100644
--- a/sys-kernel/module-rebuild/module-rebuild-0.2.ebuild
+++ b/sys-kernel/module-rebuild/module-rebuild-0.3.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.2.ebuild,v 1.2 2005/05/19 17:40:00 dang Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-kernel/module-rebuild/module-rebuild-0.3.ebuild,v 1.1 2005/06/30 17:27:02 johnm Exp $
DESCRIPTION="A utility to rebuild any kernel modules which you have installed."
HOMEPAGE="http://www.gentoo.org/"