| 1 | # Copyright 1999-2006 Gentoo Foundation |
1 | # Copyright 1999-2006 Gentoo Foundation |
| 2 | # Distributed under the terms of the GNU General Public License v2 |
2 | # Distributed under the terms of the GNU General Public License v2 |
| 3 | # $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.72 2009/09/13 20:44:11 robbat2 Exp $ |
3 | # $Header: /var/cvsroot/gentoo-x86/eclass/linux-info.eclass,v 1.73 2009/10/11 11:48:33 maekke Exp $ |
| 4 | # |
4 | # |
| 5 | # Original author: John Mylchreest <johnm@gentoo.org> |
5 | # Original author: John Mylchreest <johnm@gentoo.org> |
| 6 | # Maintainer: kernel-misc@gentoo.org |
6 | # Maintainer: kernel-misc@gentoo.org |
| 7 | # |
7 | # |
| 8 | # Please direct your bugs to the current eclass maintainer :) |
8 | # Please direct your bugs to the current eclass maintainer :) |
| … | |
… | |
| 380 | 3) for((y=0; y<$((3 - ${#KV_PATCH})); y++)); do test="${test}0"; done; |
380 | 3) for((y=0; y<$((3 - ${#KV_PATCH})); y++)); do test="${test}0"; done; |
| 381 | test="${test}${KV_PATCH}";; |
381 | test="${test}${KV_PATCH}";; |
| 382 | *) die "Error in kernel-2_kernel_is(): Too many parameters.";; |
382 | *) die "Error in kernel-2_kernel_is(): Too many parameters.";; |
| 383 | esac |
383 | esac |
| 384 | done |
384 | done |
| 385 | |
385 | |
| 386 | [ ${test} ${operator} ${value} ] && return 0 || return 1 |
386 | [ ${test} ${operator} ${value} ] && return 0 || return 1 |
| 387 | } |
387 | } |
| 388 | |
388 | |
| 389 | get_localversion() { |
389 | get_localversion() { |
| 390 | local lv_list i x |
390 | local lv_list i x |
| … | |
… | |
| 564 | # @FUNCTION: linux-info_get_any_version |
564 | # @FUNCTION: linux-info_get_any_version |
| 565 | # @DESCRIPTION: |
565 | # @DESCRIPTION: |
| 566 | # This attempts to find the version of the sources, and otherwise falls back to |
566 | # This attempts to find the version of the sources, and otherwise falls back to |
| 567 | # the version of the running kernel. |
567 | # the version of the running kernel. |
| 568 | linux-info_get_any_version() { |
568 | linux-info_get_any_version() { |
| 569 | get_version |
569 | get_version |
| 570 | if [[ $? -ne 0 ]]; then |
570 | if [[ $? -ne 0 ]]; then |
| 571 | ewarn "Unable to calculate Linux Kernel version for build, attempting to use running version" |
571 | ewarn "Unable to calculate Linux Kernel version for build, attempting to use running version" |
| 572 | get_running_version |
572 | get_running_version |
| 573 | fi |
573 | fi |
| 574 | } |
574 | } |
| 575 | |
575 | |
| 576 | |
576 | |
| 577 | # ebuild check functions |
577 | # ebuild check functions |