moved __package_gentoo to gentoo branch
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
		
					parent
					
						
							
								88e48c391e
							
						
					
				
			
			
				commit
				
					
						42c87edad1
					
				
			
		
					 5 changed files with 0 additions and 139 deletions
				
			
		| 
						 | 
				
			
			@ -1,43 +0,0 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
#
 | 
			
		||||
# 2011 Steven Armstrong (steven-cdist at armstrong.cc)
 | 
			
		||||
#
 | 
			
		||||
# This file is part of cdist.
 | 
			
		||||
#
 | 
			
		||||
# cdist is free software: you can redistribute it and/or modify
 | 
			
		||||
# it under the terms of the GNU General Public License as published by
 | 
			
		||||
# the Free Software Foundation, either version 3 of the License, or
 | 
			
		||||
# (at your option) any later version.
 | 
			
		||||
#
 | 
			
		||||
# cdist is distributed in the hope that it will be useful,
 | 
			
		||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
# GNU General Public License for more details.
 | 
			
		||||
#
 | 
			
		||||
# You should have received a copy of the GNU General Public License
 | 
			
		||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
# Manage packages on gentoo.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
if [ -f "$__object/parameter/name" ]; then
 | 
			
		||||
   name="$(cat "$__object/parameter/name")"
 | 
			
		||||
else
 | 
			
		||||
   name="$__object_id"
 | 
			
		||||
fi
 | 
			
		||||
 | 
			
		||||
state="$(cat "$__object/parameter/state")"
 | 
			
		||||
 | 
			
		||||
case "$state" in
 | 
			
		||||
   installed)
 | 
			
		||||
      # FIXME: only install if not already installed
 | 
			
		||||
      echo "emerge -q \"$name\""
 | 
			
		||||
   ;;
 | 
			
		||||
   uninstalled)
 | 
			
		||||
      # FIXME: only uninstall if currently installed
 | 
			
		||||
      echo "emerge -q -C \"$name\""
 | 
			
		||||
   ;;
 | 
			
		||||
esac
 | 
			
		||||
 | 
			
		||||
exit 0
 | 
			
		||||
| 
						 | 
				
			
			@ -1,58 +0,0 @@
 | 
			
		|||
cdist-type__user(7)
 | 
			
		||||
===================
 | 
			
		||||
Steven Armstrong <steven-cdist--@--armstrong.cc>
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
NAME
 | 
			
		||||
----
 | 
			
		||||
cdist-type__package_emerge - Manage packages on Gentoo Linux
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
DESCRIPTION
 | 
			
		||||
-----------
 | 
			
		||||
This cdist type allows you to install or uninstall packages on a Gentoo Linux
 | 
			
		||||
target.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
REQUIRED PARAMETERS
 | 
			
		||||
-------------------
 | 
			
		||||
state::
 | 
			
		||||
   The state the package should be in, either "installed" or "uninstalled"
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
OPTIONAL PARAMETERS
 | 
			
		||||
-------------------
 | 
			
		||||
name::
 | 
			
		||||
   The name of the package to install. Default is to use the object_id as the
 | 
			
		||||
   package name.
 | 
			
		||||
version::
 | 
			
		||||
   FIXME: not yet implemented
 | 
			
		||||
   The version of the package to install. Default is to install the version 
 | 
			
		||||
   choosen by the local package manager.
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
EXAMPLES
 | 
			
		||||
--------
 | 
			
		||||
 | 
			
		||||
--------------------------------------------------------------------------------
 | 
			
		||||
# Install the package vim on the target
 | 
			
		||||
__package_emerge screen --state installed
 | 
			
		||||
 | 
			
		||||
# Same but use full qualified package name
 | 
			
		||||
__package_emerge app-misc/screen --state installed
 | 
			
		||||
 | 
			
		||||
# Same but use install specific package version
 | 
			
		||||
# FIXME: not yet implemented
 | 
			
		||||
__package_emerge app-misc/screen --state installed --version 4.0.3
 | 
			
		||||
--------------------------------------------------------------------------------
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
SEE ALSO
 | 
			
		||||
--------
 | 
			
		||||
- cdist-type(7)
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
COPYING
 | 
			
		||||
-------
 | 
			
		||||
Copyright \(C) 2011 Steven Armstrong. Free use of this software is
 | 
			
		||||
granted under the terms of the GNU General Public License version 3 (GPLv3).
 | 
			
		||||
| 
						 | 
				
			
			@ -1,36 +0,0 @@
 | 
			
		|||
#!/bin/sh
 | 
			
		||||
#
 | 
			
		||||
# 2011 Steven Armstrong (steven-cdist at armstrong.cc)
 | 
			
		||||
#
 | 
			
		||||
# This file is part of cdist.
 | 
			
		||||
#
 | 
			
		||||
# cdist is free software: you can redistribute it and/or modify
 | 
			
		||||
# it under the terms of the GNU General Public License as published by
 | 
			
		||||
# the Free Software Foundation, either version 3 of the License, or
 | 
			
		||||
# (at your option) any later version.
 | 
			
		||||
#
 | 
			
		||||
# cdist is distributed in the hope that it will be useful,
 | 
			
		||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
			
		||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 | 
			
		||||
# GNU General Public License for more details.
 | 
			
		||||
#
 | 
			
		||||
# You should have received a copy of the GNU General Public License
 | 
			
		||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
 | 
			
		||||
#
 | 
			
		||||
#
 | 
			
		||||
# __package is an abstract type which dispatches to the lower level
 | 
			
		||||
# __package_$name types which do the actual interaction with the packaging 
 | 
			
		||||
# system.
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
# TODO: depend on package gentoolkit for qpkg
 | 
			
		||||
 | 
			
		||||
# TODO:
 | 
			
		||||
# if /var/cache/eix is older then /usr/portage/metadata/timestamp
 | 
			
		||||
#   then run /usr/bin/eix-update
 | 
			
		||||
#
 | 
			
		||||
# check if package is installed:
 | 
			
		||||
#
 | 
			
		||||
# get currently installed version:
 | 
			
		||||
#
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			@ -1 +0,0 @@
 | 
			
		|||
name
 | 
			
		||||
| 
						 | 
				
			
			@ -1 +0,0 @@
 | 
			
		|||
state
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue