diff options
author | Aron Griffis <agriffis@gentoo.org> | 2006-11-22 17:33:51 +0000 |
---|---|---|
committer | Aron Griffis <agriffis@gentoo.org> | 2006-11-22 17:33:51 +0000 |
commit | 1f725eda4188246601925a3dd4ffc199d0fc1d10 (patch) | |
tree | d2ebdab59c52307475ae7fdc9da08474d150195e /sys-kernel/genkernel | |
parent | ppc stable, bug #155654 (diff) | |
download | gentoo-2-1f725eda4188246601925a3dd4ffc199d0fc1d10.tar.gz gentoo-2-1f725eda4188246601925a3dd4ffc199d0fc1d10.tar.bz2 gentoo-2-1f725eda4188246601925a3dd4ffc199d0fc1d10.zip |
Add bash-completion #72845
(Portage version: 2.1.2_pre3-r1)
Diffstat (limited to 'sys-kernel/genkernel')
-rw-r--r-- | sys-kernel/genkernel/ChangeLog | 8 | ||||
-rw-r--r-- | sys-kernel/genkernel/files/digest-genkernel-3.4.5-r1 | 21 | ||||
-rw-r--r-- | sys-kernel/genkernel/files/genkernel.bash | 73 | ||||
-rw-r--r-- | sys-kernel/genkernel/genkernel-3.4.5-r1.ebuild | 92 |
4 files changed, 193 insertions, 1 deletions
diff --git a/sys-kernel/genkernel/ChangeLog b/sys-kernel/genkernel/ChangeLog index e2d835b2daf0..d641724ca018 100644 --- a/sys-kernel/genkernel/ChangeLog +++ b/sys-kernel/genkernel/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for sys-kernel/genkernel # Copyright 2000-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/ChangeLog,v 1.157 2006/11/14 17:51:19 wolf31o2 Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/ChangeLog,v 1.158 2006/11/22 17:33:51 agriffis Exp $ + +*genkernel-3.4.5-r1 (22 Nov 2006) + + 22 Nov 2006; Aron Griffis <agriffis@gentoo.org> +files/genkernel.bash, + +genkernel-3.4.5-r1.ebuild: + Add bash-completion #72845 *genkernel-3.4.5 (14 Nov 2006) diff --git a/sys-kernel/genkernel/files/digest-genkernel-3.4.5-r1 b/sys-kernel/genkernel/files/digest-genkernel-3.4.5-r1 new file mode 100644 index 000000000000..982c3b3a546b --- /dev/null +++ b/sys-kernel/genkernel/files/digest-genkernel-3.4.5-r1 @@ -0,0 +1,21 @@ +MD5 87d8615a655b9a6c1a0e234eab2485bf LVM2.2.02.05.tgz 473621 +RMD160 7295f14e64dc25035d46e3512db6cae1b2be5f9b LVM2.2.02.05.tgz 473621 +SHA256 707c596c7a2f11cc08d3b1099995be2a4a3859a5454ed5af1a6c5361a821a402 LVM2.2.02.05.tgz 473621 +MD5 460cc211b03af4048ec90c0de2ecd8f7 device-mapper.1.02.07.tgz 923923 +RMD160 517dd7bde6935235f8c22149ef6e0cb80e6c925b device-mapper.1.02.07.tgz 923923 +SHA256 1e9c16e8f7bcf87bec03103dda63c0d11cdc739f432488b026b4614fd3cabf40 device-mapper.1.02.07.tgz 923923 +MD5 a2a8948de7717e2e76a1291fc1daf9d1 dmraid-1.0.0.rc13.tar.bz2 170497 +RMD160 9b95d68c2177c3bb7c74227c375780d3b4936ef7 dmraid-1.0.0.rc13.tar.bz2 170497 +SHA256 8497196528d50203053de0f733917b1d85aae416d2136c695a07aee5632b12b9 dmraid-1.0.0.rc13.tar.bz2 170497 +MD5 d774d4412bfb80d12cf3a4fdfd59de5a e2fsprogs-1.38.tar.gz 3621193 +RMD160 492071c29e9a0adc1bed0762e795efb6b29a692c e2fsprogs-1.38.tar.gz 3621193 +SHA256 c4e482687d0cff240d02a70fcf423cc14296b6a7869cd8dd42d5404d098e0bb7 e2fsprogs-1.38.tar.gz 3621193 +MD5 2cc4f6f0807b9031b7438d86bd4f384d genkernel-3.4.5.tar.bz2 164968 +RMD160 0d0bbb4a6aea100d526c86f5fe3db80d8eb5c4e7 genkernel-3.4.5.tar.bz2 164968 +SHA256 8d0e10a07e8edd143f35a40e73a594061d5d67761ac0fa9c46c21943a8b50108 genkernel-3.4.5.tar.bz2 164968 +MD5 2fa8384b099d53f878a1f8ef49214493 genkernel-pkg-3.4.tar.bz2 1848904 +RMD160 09e1baed7e3703b2f6c304656a81a12ba4594083 genkernel-pkg-3.4.tar.bz2 1848904 +SHA256 2345a16a3b377e3ffde2f0cca7e82cf3566e03e8bb2098db69210f505a989af3 genkernel-pkg-3.4.tar.bz2 1848904 +MD5 38ed4d9e41c20cf398018928d2c62700 unionfs-1.4.tar.gz 164696 +RMD160 5a19ccfd6edf25f55c48ba1b820347572353c7ba unionfs-1.4.tar.gz 164696 +SHA256 3ff105782aba722b1f263e408fac638245d302a9c8d0f37ac09e5a80caf0126b unionfs-1.4.tar.gz 164696 diff --git a/sys-kernel/genkernel/files/genkernel.bash b/sys-kernel/genkernel/files/genkernel.bash new file mode 100644 index 000000000000..bb326c87d3a9 --- /dev/null +++ b/sys-kernel/genkernel/files/genkernel.bash @@ -0,0 +1,73 @@ +# genkernel (8) completion +# Copyright 2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# Written by Aron Griffis <agriffis@gentoo.org> + +_genkernel() +{ + declare cur prev genkernel_help actions params + COMPREPLY=() + cur=${COMP_WORDS[COMP_CWORD]} + prev=${COMP_WORDS[COMP_CWORD-1]} + + # extract initial list of params/actions from genkernel --help + genkernel_help=$(command genkernel --help) + actions=( $(<<<"$genkernel_help" sed -n \ + '/^Available Actions:/,/^$/s/^[[:space:]]\+\([^[:space:]]\+\).*/\1/p') ) + params=( $(<<<"$genkernel_help" egrep -oe '--[^[:space:]]{2,}') ) + + # attempt to complete the current parameter based on the list + COMPREPLY=($(compgen -W "${params[*]/=*/=} ${actions[*]}" -- "$cur")) + + # if we don't have a rhs to complete + if [[ ${#COMPREPLY[@]} -gt 1 ]]; then + return + elif [[ ${#COMPREPLY[@]} -eq 0 && $cur != --*=* ]]; then + return + elif [[ ${#COMPREPLY[@]} -eq 1 && $COMPREPLY != --*= ]]; then + # using nospace completion, add an explicit space + COMPREPLY="${COMPREPLY} " + return + fi + + # we have a unique lhs and need to complete the rhs + declare args lhs rhs + if [[ ${#COMPREPLY[@]} -eq 1 ]]; then + lhs=$COMPREPLY + else + lhs=${cur%%=*}= + rhs=${cur#*=} + fi + + # genkernel's help gives clues as to what belongs on the rhs. + # extract the clue for the current parameter + args=" ${params[*]} " + args="${args##* $lhs}" + args="${args%% *}" + + # generate a list of completions for the argument; this replaces args with + # an array of results + args=( $(case $args in + ('<0-5>') compgen -W "$(echo {1..5})" -- "$rhs" ;; + ('<outfile>'|'<file>') compgen -A file -o plusdirs -- "$rhs" ;; + ('<dir>') compgen -A directory -S / -- "$rhs" ;; + ('<tbz2>') compgen -G '*.tbz2' -G '*.tar.bz2' -o plusdirs -- "$rhs" ;; + (*) compgen -o bashdefault -- "$rhs" ;; # punt + esac) ) + + # we're using nospace completion to prevent spaces after paths that aren't + # "done" yet. So do some hacking to the args to add spaces after + # non-directories. + declare slash=/ + args=( "${args[@]/%/ }" ) # add space to all + args=( "${args[@]/%$slash /$slash}" ) # remove space from dirs + + # recreate COMPREPLY + if [[ $cur == "$lhs"* ]]; then + COMPREPLY=( "${args[@]}" ) + else + COMPREPLY=( "${args[@]/#/$lhs}" ) + fi +} + +complete -o nospace -F _genkernel genkernel diff --git a/sys-kernel/genkernel/genkernel-3.4.5-r1.ebuild b/sys-kernel/genkernel/genkernel-3.4.5-r1.ebuild new file mode 100644 index 000000000000..ec0ded5a5d7e --- /dev/null +++ b/sys-kernel/genkernel/genkernel-3.4.5-r1.ebuild @@ -0,0 +1,92 @@ +# Copyright 1999-2006 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/sys-kernel/genkernel/genkernel-3.4.5-r1.ebuild,v 1.1 2006/11/22 17:33:51 agriffis Exp $ + +inherit bash-completion eutils + +VERSION_DMAP='1.02.07' +VERSION_DMRAID='1.0.0.rc13' +VERSION_E2FSPROGS='1.38' +VERSION_LVM2='2.02.05' +VERSION_PKG='3.4' +VERSION_UNIONFS='1.4' + +DESCRIPTION="Gentoo autokernel script" +HOMEPAGE="http://www.gentoo.org" +SRC_URI="http://dev.gentoo.org/~wolf31o2/sources/genkernel/${P}.tar.bz2 + http://dev.gentoo.org/~wolf31o2/sources/genkernel/genkernel-pkg-${VERSION_PKG}.tar.bz2 + http://people.redhat.com/~heinzm/sw/dmraid/src/dmraid-${VERSION_DMRAID}.tar.bz2 + ftp://sources.redhat.com/pub/lvm2/old/LVM2.${VERSION_LVM2}.tgz + ftp://sources.redhat.com/pub/dm/old/device-mapper.${VERSION_DMAP}.tgz + ftp://ftp.fsl.cs.sunysb.edu/pub/unionfs/unionfs-${VERSION_UNIONFS}.tar.gz + mirror://sourceforge/e2fsprogs/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~arm ~hppa ~ia64 ~mips ~ppc ~ppc64 ~s390 ~sparc ~x86" +#KEYWORDS="alpha amd64 arm hppa ia64 mips ppc ppc64 s390 sparc x86" +IUSE="ibm" + +DEPEND="sys-fs/e2fsprogs" +RDEPEND="${DEPEND} app-arch/cpio" + +src_unpack() { + unpack ${P}.tar.bz2 + cd "${S}" + unpack ${PN}-pkg-${VERSION_PKG}.tar.bz2 +} + +src_install() { + dodir /etc + cp "${S}"/genkernel.conf ${D}/etc + # This block updates genkernel.conf + sed -i -e "s:VERSION_DMAP:$VERSION_DMAP:" \ + -e "s:VERSION_DMRAID:$VERSION_DMRAID:" \ + -e "s:VERSION_E2FSPROGS:$VERSION_E2FSPROGS:" \ + -e "s:VERSION_LVM2:$VERSION_LVM2:" \ + -e "s:VERSION_UNIONFS:$VERSION_UNIONFS:" \ + ${D}/etc/genkernel.conf || die "Could not adjust versions" + + dodir /usr/share/genkernel + use ibm && cp "${S}"/ppc64/kernel-2.6-pSeries "${S}"/ppc64/kernel-2.6 || \ + cp "${S}"/ppc64/kernel-2.6.g5 "${S}"/ppc64/kernel-2.6 + cp -Rp "${S}"/* ${D}/usr/share/genkernel + + dodir /usr/bin + dosym /usr/share/genkernel/genkernel /usr/bin/genkernel + + rm ${D}/usr/share/genkernel/genkernel.conf + dodoc README + + doman genkernel.8 + rm genkernel.8 + + cp "${DISTDIR}"/dmraid-${VERSION_DMRAID}.tar.bz2 \ + "${DISTDIR}"/LVM2.${VERSION_LVM2}.tgz \ + "${DISTDIR}"/device-mapper.${VERSION_DMAP}.tgz \ + "${DISTDIR}"/unionfs-${VERSION_UNIONFS}.tar.gz \ + "${DISTDIR}"/e2fsprogs-${VERSION_E2FSPROGS}.tar.gz \ + ${D}/usr/share/genkernel/pkg + + dobashcompletion ${FILESDIR}/genkernel.bash +} + +pkg_postinst() { + echo + elog 'Documentation is available in the genkernel manual page' + elog 'as well as the following URL:' + echo + elog 'http://www.gentoo.org/doc/en/genkernel.xml' + echo + ewarn "This package is known to not work with reiser4. If you are running" + ewarn "reiser4 and have a problem, do not file a bug. We know it does not" + ewarn "work and we don't plan on fixing it since reiser4 is the one that is" + ewarn "broken in this regard. Try using a sane filesystem like ext3 or" + ewarn "even reiser3." + echo + ewarn "The LUKS support has changed from versions prior to 3.4.4. Now," + ewarn "you use crypt_root=/dev/blah instead of real_root=luks:/dev/blah." + echo + + bash-completion_pkg_postinst +} |