Gentoo-Probe

 view release on metacpan or  search on metacpan

t/sandbox/usr/portage/app-portage/gentoolkit/files/scripts/dep-clean  view on Meta::CPAN

#!/bin/bash
#Shows unrequired packages and missing dependencies.
#Author/Maintainer: Brandon Low <lostlogic@gentoo.org>
#Author: Jerry Haltom <ssrit@larvalstage.net>

PROG=`basename ${0}`

tmp="/tmp/$$"

#Get PORTDIR and PORTDIR_OVERLAY from portage
PORTDIR_OVERLAY="$(/usr/lib/portage/bin/portageq portdir_overlay)"
PORTDIR="$(/usr/lib/portage/bin/portageq portdir)"

rm -rf ${tmp} > /dev/null 2>&1
mkdir ${tmp} > /dev/null 2>&1

declare -i i

set -- `getopt -n ${PROG} -o N,R,U,I,v,q,C,h -l needed,removed,unneeded,interactive,verbose,quiet,nocolor,help -- ${*/ --/};[ $? != 0 ] && echo "y"`

while [ ${#} -gt 0 ]

t/sandbox/usr/portage/app-portage/gentoolkit/files/scripts/etcat  view on Meta::CPAN

	if (curver) and (curver not in versions):
	    versions.append(curver)
	
	versions.sort(pkgcmp)
	
	for ver in versions:
            
            state = []
            color = green
            unstable = 0
	    overlay = ""
            
            # check if masked
            if ver not in unmasked:
                state.append(red("M"))
                color = red
            else:
                state.append(" ")

            # check if in unstable
	    try:

t/sandbox/usr/portage/app-portage/gentoolkit/files/scripts/etcat  view on Meta::CPAN

            if portage.dblink(cat,pkg,"/").exists():
                state.append(turquoise("I"))
                color = turquoise
            else:
                state.append(" ")
		
	    # check if this is a OVERLAY ebuilds
	    try:
		if portage.portdb.oroot:
		    if os.path.exists(portage.portdb.oroot + "/" + package + "/" + pkg + ".ebuild"):
			overlay = " OVERLAY"
	    except AttributeError:
		pass

            # print
	    try:
		slot = portage.db["/"]["porttree"].dbapi.aux_get(ver,["SLOT"])
		if not slot:
		    slot = ["0"]
	    except KeyError:
		slot = ["?"]
		
            print " "*8 + "[" + string.join(state,"") + "] " + color(ver) + " (" + color(slot[0]) + ")" + overlay

        print

# .-------------------------------------------------------.
# | List USE flags for a single ebuild                    |
# +-------------------------------------------------------+
# | Just uses the new IUSE parameter in ebuilds           |
# `-------------------------------------------------------' 
def uses(query):
    

t/sandbox/usr/portage/app-shells/zsh/files/_portage  view on Meta::CPAN

    # binary mirror will be available we should rewrite it accordingly.
    _path_files -g \*.tbz2 -W "${pkgdir}/All"
}

#Function to show all available portage names
_portage_pkglist(){
    portage_classlist="world system"
    portage_pkglist="$portage_pkglist ${portage_classlist}"
    _tags -s portage_pkglist && { compadd "$@" -k portage_pkglist || compadd "$@" ${(kv)=portage_pkglist} }
    _path_files -/ -W "${portdir}"
    # XXX: If I add ${portdir_overlay} category completion won't work properly
    #[[ -n "${portdir_overlay}" ]] && _path_files -/ -W "${portdir_overlay}"
    _path_files -g \*.ebuild
}

common_args=(
    {'(-p)--pretend','(--pretend)-p'}'[simply  display  what would be done]'
    {'(-d)--debug','(--debug)-d'}'[Tells emerge to run the emerge command in debug mode]'
)
install_args=(
    {'(--upgradeonly -U --update -u --quiet -q --onlydeps -o --oneshot --nospinner --noreplace -n --nodeps -O --noconfmem -D --deep --changelog --buildpkg -B -b --buildpkgonly --emptytree -e -f --fetchonly)-l','(--upgradeonly -U --update -u --quiet -...
    {'(-b --buildpkgonly -B --changelog -l)--buildpkg','(--changelog -l --buildpkg --buildpkgonly -B)-b'}'[Tells emerge to build binary packages]'

t/sandbox/usr/portage/app-shells/zsh/files/_portage  view on Meta::CPAN

	'--searchdesc[Matches the search string against the description field]' \
	'-C[Removes all matching packages]' \
	'world[Represent all packages in the world profiles]' \
	'system[Represent all the system packages]' 
}

#Reading informations from make.conf
[[ -n "${PORTDIR}" ]] && portdir="${PORTDIR}"
[[ -n "${PKGDIR}" ]] && pkgdir="${PKGDIR}"
if [[ -n "${PORTDIR_OVERLAY}" ]] ; then
    for overlay in ${=PORTDIR_OVERLAY} ; do
	portdir_overlay=(${overlay} ${portdir_overlay})
    done
fi
[[ -r /etc/make.globals ]] && source /etc/make.globals
[[ -r /etc/make.conf ]] && source /etc/make.conf

[[ -z "${portdir}" ]] && portdir="${PORTDIR}"
[[ -z "${pkgdir}" ]] && pkgdir="${PKGDIR}"
if [[ -z "${portdir_overlay}" ]] ; then
    for overlay in ${=PORTDIR_OVERLAY} ; do
	portdir_overlay=(${overlay} ${portdir_overlay})
    done
fi

portage_pkglist=(${portdir}/*-*/* ${portdir_overlay}/*-*/*)
portage_pkglist=(${portage_pkglist##*/})

_emerge "$@"

t/sandbox/usr/portage/app-shells/zsh/files/_portage-20040204  view on Meta::CPAN

    # binary mirror will be available we should rewrite it accordingly.
    _path_files -g \*.tbz2 -W "${pkgdir}/All"
}

#Function to show all available portage names
_portage_pkglist(){
    portage_classlist="world system"
    portage_pkglist="$portage_pkglist ${portage_classlist}"
    _tags -s portage_pkglist && { compadd "$@" -k portage_pkglist || compadd "$@" ${(kv)=portage_pkglist} }
    _path_files -/ -W "${portdir}"
    # XXX: If I add ${portdir_overlay} category completion won't work properly
    #[[ -n "${portdir_overlay}" ]] && _path_files -/ -W "${portdir_overlay}"
    _path_files -g \*.ebuild
}

common_args=(
    {'(-p)--pretend','(--pretend)-p'}'[simply  display  what would be done]'
    {'(-d)--debug','(--debug)-d'}'[Tells emerge to run the emerge command in debug mode]'
)
install_args=(
    {'(--upgradeonly -U --update -u --quiet -q --onlydeps -o --oneshot --nospinner --noreplace -n --nodeps -O --noconfmem -D --deep --changelog --buildpkg -B -b --buildpkgonly --emptytree -e -f --fetchonly)-l','(--upgradeonly -U --update -u --quiet -...
    {'(-b --buildpkgonly -B --changelog -l)--buildpkg','(--changelog -l --buildpkg --buildpkgonly -B)-b'}'[Tells emerge to build binary packages]'

t/sandbox/usr/portage/app-shells/zsh/files/_portage-20040204  view on Meta::CPAN

	'--searchdesc[Matches the search string against the description field]' \
	'-C[Removes all matching packages]' \
	'world[Represent all packages in the world profiles]' \
	'system[Represent all the system packages]' 
}

#Reading informations from make.conf
[[ -n "${PORTDIR}" ]] && portdir="${PORTDIR}"
[[ -n "${PKGDIR}" ]] && pkgdir="${PKGDIR}"
if [[ -n "${PORTDIR_OVERLAY}" ]] ; then
    for overlay in ${=PORTDIR_OVERLAY} ; do
	portdir_overlay=(${overlay} ${portdir_overlay})
    done
fi
[[ -r /etc/make.globals ]] && source /etc/make.globals
[[ -r /etc/make.conf ]] && source /etc/make.conf

[[ -z "${portdir}" ]] && portdir="${PORTDIR}"
[[ -z "${pkgdir}" ]] && pkgdir="${PKGDIR}"
if [[ -z "${portdir_overlay}" ]] ; then
    for overlay in ${=PORTDIR_OVERLAY} ; do
	portdir_overlay=(${overlay} ${portdir_overlay})
    done
fi

portage_pkglist=(${portdir}/*-*/* ${portdir_overlay}/*-*/*)
portage_pkglist=(${portage_pkglist##*/})
gentoo_runlevels=(/etc/runlevels/*)
gentoo_runlevels=(${${gentoo_runlevels/\/etc\/runlevels\//}%/})

case "$service" in
	emerge)
		_emerge "$@" && return 0
		;;
	rc-update)
		_rc-update "$@" && return 0



( run in 0.895 second using v1.01-cache-2.11-cpan-49f99fa48dc )