diff options
author | jsbronder <jsbronder@32389bae-6d03-0410-99cf-db05cde120eb> | 2008-03-27 01:23:37 +0000 |
---|---|---|
committer | jsbronder <jsbronder@32389bae-6d03-0410-99cf-db05cde120eb> | 2008-03-27 01:23:37 +0000 |
commit | d3166b7c90a9689d78f2ee301b66d4e628d3fd3e (patch) | |
tree | e3ffe8b6e88db0738716f0bd531d76d1df0e79c0 /sys-cluster/empi | |
parent | visual-4_beta26 (diff) | |
download | sci-d3166b7c90a9689d78f2ee301b66d4e628d3fd3e.tar.gz sci-d3166b7c90a9689d78f2ee301b66d4e628d3fd3e.tar.bz2 sci-d3166b7c90a9689d78f2ee301b66d4e628d3fd3e.zip |
bump empi-0.3. See ChangeLog for details.
git-svn-id: http://overlays.gentoo.org/svn/proj/science/overlay@990 32389bae-6d03-0410-99cf-db05cde120eb
Diffstat (limited to 'sys-cluster/empi')
-rw-r--r-- | sys-cluster/empi/ChangeLog | 5 | ||||
-rw-r--r-- | sys-cluster/empi/Manifest | 2 | ||||
-rw-r--r-- | sys-cluster/empi/empi-0.3.ebuild | 27 | ||||
-rw-r--r-- | sys-cluster/empi/files/empi-0.3.patch | 223 |
4 files changed, 257 insertions, 0 deletions
diff --git a/sys-cluster/empi/ChangeLog b/sys-cluster/empi/ChangeLog index 21c63131e..530667a10 100644 --- a/sys-cluster/empi/ChangeLog +++ b/sys-cluster/empi/ChangeLog @@ -2,6 +2,11 @@ # Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2 # $Header: $ + 27 Mar 2008; Justin Bronder <jsbronder@gentoo.org> ChangeLog: + Only use -u in default emerge options. Add the --noemerge option. Fix + deletion when an implementation hasn't been fully emerged. Thanks to + Alexander Piavka for testing! This is empi-0.3. + 29 Feb 2008; Justin Bronder <jsbronder@gentoo.org> ChangeLog: Initial import diff --git a/sys-cluster/empi/Manifest b/sys-cluster/empi/Manifest index 2fe171df5..0006f8f4f 100644 --- a/sys-cluster/empi/Manifest +++ b/sys-cluster/empi/Manifest @@ -1,6 +1,8 @@ AUX README.txt 2780 RMD160 18c9057b4a536716ae19d41f153df17021e2c4bf SHA1 29814c97d88d695b1aa3027790a3763806821443 SHA256 693a10fa9eb7ab0ec74f83fdbf326a320e69be979b13ca00b5416a539145073a AUX empi 10260 RMD160 696101bbbcf318d152fe10e690af86fd49bbe139 SHA1 d21d0ab2338c3adfbfdd6f4ad059b81018d15051 SHA256 3c344cde5daa717e3cd779cb2792a58e99d098b9da81b6e00604e70528672569 AUX empi-0.2.patch 4089 RMD160 265c6a4c887c3006294b430bc7c3aa2891e612a4 SHA1 42d90cc6a6aa4b5cfc544a7a98cf55c5f48dffc8 SHA256 4bd20fb11e0fdc4661836b5cf346224875ce7803b43b32fde2e425b3679c27b8 +AUX empi-0.3.patch 7947 RMD160 46f5c6afa9956eda4bda1e9b3d62c125c1bd4922 SHA1 d2c58978a4500d1132af25913ea75e8a6c2b6e3b SHA256 9199a19f5099d567d6bf636c0df45aca765653129540d42fe644c93ef8d70246 EBUILD empi-0.1.ebuild 356 RMD160 da691cd5e6d0efa60610e924afdf9f575d0c0af7 SHA1 82158037d357ab1995115606fc6e65ab644846ce SHA256 2e2f296e101e79207e02c55834ee38eb2eb8d375306bce5dc5bef0b8044a9242 EBUILD empi-0.2.ebuild 467 RMD160 c67402c1eeba84f93319648605a0720184c19cb5 SHA1 1565fa234b6d7beb193df96400264586a792eaa1 SHA256 48c53593c8859beefc475c9f4c6ebe113972a54efe33f6983351c8cd8d8f3f93 +EBUILD empi-0.3.ebuild 467 RMD160 c67402c1eeba84f93319648605a0720184c19cb5 SHA1 1565fa234b6d7beb193df96400264586a792eaa1 SHA256 48c53593c8859beefc475c9f4c6ebe113972a54efe33f6983351c8cd8d8f3f93 MISC ChangeLog 199 RMD160 d19235676502c09e9970dcade1e6953561bb0de0 SHA1 3a3b206b2e37e8299fca13c4e1b4d7029df9654e SHA256 3e5879a45cb8cf45883aae0fa0a39eae2a3d7b4a82f77ec03bcc264a75d23d27 diff --git a/sys-cluster/empi/empi-0.3.ebuild b/sys-cluster/empi/empi-0.3.ebuild new file mode 100644 index 000000000..a17388a0a --- /dev/null +++ b/sys-cluster/empi/empi-0.3.ebuild @@ -0,0 +1,27 @@ +# Copyright 1999-2008 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +inherit eutils + +DESCRIPTION="empi" +HOMEPAGE="http://dev.gentoo.org/~jsbronder" +SRC_URI="" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="amd64" +IUSE="" +RDEPEND="app-admin/eselect-mpi" + +src_unpack() { + mkdir -p "${S}" + cp "${FILESDIR}"/empi "${S}" + cd "${S}" + epatch "${FILESDIR}"/${P}.patch +} + +src_install() { + dobin empi + dodoc "${FILESDIR}"/README.txt +} diff --git a/sys-cluster/empi/files/empi-0.3.patch b/sys-cluster/empi/files/empi-0.3.patch new file mode 100644 index 000000000..ab2f61261 --- /dev/null +++ b/sys-cluster/empi/files/empi-0.3.patch @@ -0,0 +1,223 @@ +diff -urN a/empi b/empi +--- a/empi 2008-03-26 20:24:05.000000000 -0400 ++++ b/empi 2008-03-26 21:08:10.000000000 -0400 +@@ -1,16 +1,8 @@ + #!/bin/bash ++VERSION=0.3 + + source /etc/init.d/functions.sh +-#[ -f /etc/empi.conf ] && source /etc/empi.conf +-MPI_IMPS="openmpi lam-mpi" +-MPI_ALL_IMPS="mpich mpich2 openmpi lam-mpi" +-VERBOSE=0 +- +-[[ -z ${MPI_PORTDIR} ]] \ +- && MPI_PORTDIR="$(portageq portdir_overlay)" \ +- && MPI_PORTDIR="${MPI_PORTDIR%% *}" \ + +-[[ -z ${COMPILER} ]] && COMPILER=gcc + # imp (category) Implementation we're installing for. mpi-* + # targets Packages to run action on. When creating, the implementation to use. + # action create, add, update, remove. +@@ -26,20 +18,33 @@ + local rc=${1:-0} + shift + cat <<-EOF +-Usage: ${HILITE}empi${NORMAL} ${GOOD}[options]${NORMAL} ${BRACKET}--implementation IMPLEMENTATION pkgspec${NORMAL} ++empi-${VERSION} ++Usage: ${HILITE}empi${NORMAL} ${GOOD}[actions]${NORMAL} ${BRACKET}[options]${NORMAL} + +-Options: +- ${GOOD}-c, --create${NORMAL} (Re)Initialize setup for implementation. ++Actions: ++ ${GOOD}-c, --create${NORMAL} pkgspec (Re)Initialize setup for implementation. + ${GOOD}-a, --add${NORMAL} pkgspec(s) Add packages using specified implementation. +- ${GOOD}-i, --implementation${NORMAL} imp Implementation to use. +- ${GOOD}-l, --list${NORMAL} List installed implementations. +- ${GOOD}-t, --tree${NORMAL} path Path to portage tree to use ebuilds from. + ${GOOD}-d, --delete${NORMAL} imp Remove everything related to specified implementation. + +-pkgspec is specified by a package string. Without a version, the best_visible is used. +- openmpi, sys-cluster/openmpi, =sys-cluster/openmpi-1.2.5 +-implementation (-i) is user defined but must be prefixed with "mpi-" ++Options: ++ ${GOOD}-i, --implementation${NORMAL} imp Implementation to use. ++ ${GOOD}-t, --tree${NORMAL} path Path to portage tree to use ebuilds from. ++ ${GOOD}-o, --overlaydir${NORMAL} path Directory to use for the empi portage overlay. ++ ${GOOD} --noemerge${NORMAL} Do not call emerge, only preform overlay setup. + ++Notes: ++ ${HILITE}-${NORMAL} pkgspec is specified by a package string. Without a version, the ++ portageq best_visible is used. For example, all of the following ++ are valid: openmpi, sys-cluster/openmpi, =sys-cluster/openmpi-1.2.5. ++ ${HILITE}-${NORMAL} implementation (-i) is user defined but must be prefixed with "mpi-" ++ ++Examples: ++${BRACKET}Create a new implementation based on openmpi.${NORMAL} ++ empi --create sys-cluster/openmpi --implementation mpi-ompi ++${BRACKET}Rebuild the above.${NORMAL} ++ emerge mpi-ompi/openmpi ++${BRACKET}Add hpl to mpi-ompi${NORMAL} ++ empi --implementation mpi-ompi --add sys-cluster/hpl + EOF + [[ -n $* ]] && echo && eerror "Error: $*" + exit ${rc} +@@ -101,7 +106,7 @@ + fi + + if ! grep "[>=<]*${imp}/${atom[1]}" ${gfiles} &>/dev/null; then +- grep "[>=<]*${atom[0]}/${atom[1]}" ${gfiles} \ ++ grep "[>=<]*${atom[0]}/${atom[1]}" ${gfiles} 2>/dev/null \ + | sed "s,${atom[0]},${imp}," \ + | while read line; do + echo "${line}" >> ${f} +@@ -150,19 +155,14 @@ + grep 'inherit .*mpi' "${1}/${2##*/}.ebuild" &>/dev/null + } + +-setup_portage_vars() { +- export PORTDIR_OVERLAY="${MPI_PORTDIR} $(portageq portdir_overlay)" +- export PKGDIR="$(portageq envvar PKGDIR)/mpi/${imp}" +-} +- + link_ebuild_dir() { + ln -snf "${ebuild_dir}" "${MPI_PORTDIR}"/${imp}/${ebuild_dir##*/} \ + || die "Failed to link ${ebuild_dir} to ${MPI_PORTDIR}/${imp}/${ebuild_dir##*/}" + } + + do_emerge() { ++ [[ ${DO_EMERGE} -eq 0 ]] && return 0 + ebegin "Emerging $*" +- setup_portage_vars + emerge ${emerge_opts} $* || die "emerge failed!" + eend + } +@@ -172,7 +172,11 @@ + local mpi_imp_pkg d mpi_imp_pn + + [[ ${#targets[@]} -ne 1 ]] && die "Can only create one implementation at a time." +- ++ ++ for d in $(eselect mpi list -p); do ++ [ "${d}" == "${imp}" ] && die "${imp} has already been created." ++ done ++ + # Prevent laziness + [[ ${targets[0]} == ${targets[0]##*/} ]] \ + && targets[0]="sys-cluster/${targets[0]}" +@@ -187,7 +191,7 @@ + # Refuse to break systems. If there is already an implementation + # installed in that directory, we're not going to add another one as + # the eclass doesn't fix one problem just to introduce a bigger one. +- for d in $(find ${MPI_PORTDIR}/${imp} -maxdepth 1 -mindepth 1 -type l);do ++ for d in $(find ${MPI_PORTDIR}/${imp} -maxdepth 1 -mindepth 1 -type l 2>/dev/null);do + d=${d##*/} + [[ ${d} == ${mpi_imp_pn} ]] && continue + for i in ${MPI_ALL_IMPS}; do +@@ -197,7 +201,7 @@ + done + + if [[ -d "${MPI_PORTDIR}"/${imp} ]]; then +- [[ ${VERBOSE} -ne 0 ]] && ewarn "${imp} has already been created." ++ [[ ${VERBOSE} -ne 0 ]] && ewarn "Overlay for ${imp} has already been created." + else + mkdir -p ${MPI_PORTDIR}/${imp} + link_ebuild_dir +@@ -258,40 +262,56 @@ + + + delete_implementation() { +- local pkgs=( $(ls /var/db/pkg/${imp}/) ) +- local ext d i ++ local pkgs=( $(ls /var/db/pkg/${imp}/ 2>/dev/null) ) ++ local ext d i rc + [[ -d "${MPI_PORTDIR}"/${imp} ]] || die "Implementation ${imp} has not been created yet." ++ rc=0 + + for (( i=0; i<${#pkgs[@]}; i++)); do + pkgs[i]="=${imp}/${pkgs[i]}" + done + +- if ! emerge -C ${emerge_opts/-u/} ${pkgs[@]}; then ++ if [[ ${#pkgs[@]} -gt 0 ]] && ! emerge -C ${emerge_opts/-u/} ${pkgs[@]}; then + die "Failed to unmerge ${pkgs[@]}" + fi + + for ext in "keywords" "use"; do + if [ -d /etc/portage/package.${ext} ]; then + rm /etc/portage/package.${ext}/${imp} &>/dev/null +- else ++ rc=$((rc+$?)) ++ elif [ -f /etc/portage/package.${ext} ]; then + sed -i -e "/${imp}\//d" /etc/portage/package.${ext} ++ rc=$((rc+$?)) + fi + done +- sed -i -e "/^${imp}$/d" /etc/portage/categories + +- for d in $(ls "${MPI_PORTDIR}"/${imp}/); do ++ [ ! -f /etc/portage/categories ] || sed -i -e "/^${imp}$/d" /etc/portage/categories ++ rc=$((rc+$?)) ++ ++ for d in $(ls "${MPI_PORTDIR}"/${imp}/ 2>/dev/null); do + rm "${MPI_PORTDIR}"/${imp}/${d} ++ rc=$((rc+$?)) ++ done ++ ++ for d in "${MPI_PORTDIR}/${imp}" /var/db/pkg/${imp}; do ++ [ ! -d "${d}" ] || rmdir "${d}" ++ rc=$((rc+$?)) + done +- rmdir "${MPI_PORTDIR}"/${imp} +- rmdir /var/db/pkg/${imp} ++ ++ [[ ${rc} -ne 0 ]] \ ++ && ewarn "Errors were encountered during delete_implementation()" ++ return ${rc} + } + + + [[ ${UID} -ne 0 ]] && die "You must be root." ++DO_EMERGE=1 ++VERBOSE=0 + targets="" +-emerge_opts="-u -a -v" ++emerge_opts="-u" # Packages can be recompiled by hand if necessary. + portage_tree="" + action="" ++ + while [[ $# -gt 0 ]]; do + case $1 in + -h|--help) +@@ -307,8 +327,12 @@ + shift; imp=${1};; + -t|--tree) + shift; portage_tree=${1};; ++ -o|--overlaydir) ++ shift; MPI_PORTDIR=${1};; + -v|--verbose) + VERBOSE=1;; ++ --noemerge) ++ DO_EMERGE=0;; + -*) + emerge_opts="${emerge_opts} ${1}";; + *) +@@ -317,6 +341,18 @@ + shift + done + ++if [ -z "${MPI_PORTDIR}" ]; then ++ MPI_PORTDIR="$(portageq portdir_overlay)" ++ MPI_PORTDIR="${MPI_PORTDIR%% *}" ++fi ++ ++if [ ! -d "${MPI_PORTDIR}" ]; then ++ mkdir -p "${MPI_PORTDIR}" || die "Failed to mkdir ${MPI_PORTDIR}" ++fi ++ ++export PORTDIR_OVERLAY="${MPI_PORTDIR} $(portageq portdir_overlay)" ++export PKGDIR="$(portageq envvar PKGDIR)/mpi/${imp}" ++ + [[ -z ${action} ]] && usage 1 "No action defined." + [[ -z ${imp} ]] && usage 1 "No implementation defined." + imp_is_valid |