diff options
| author | fuzzyray <fuzzyray@gentoo.org> | 2009-05-05 17:39:24 +0000 |
|---|---|---|
| committer | fuzzyray <fuzzyray@gentoo.org> | 2009-05-05 17:39:24 +0000 |
| commit | c819d146be6bce86d97019494173253e71b85d2f (patch) | |
| tree | 200d00c2b9a420540ff9c4e0d8b3080b762fb562 /trunk/src/dep-clean | |
| parent | 61823fe68081c6f8edf24455bbb34123598c5bb4 (diff) | |
| download | gentoolkit-c819d146be6bce86d97019494173253e71b85d2f.tar.gz | |
Rearrange trunk to support gentoolkit version 0.3. Split into gentoolkit, gentoolkit-dev, and deprecated. Import djanderson's work on the gentoolkit library and equery
svn path=/trunk/gentoolkit/; revision=589
Diffstat (limited to 'trunk/src/dep-clean')
| -rw-r--r-- | trunk/src/dep-clean/AUTHORS | 9 | ||||
| -rw-r--r-- | trunk/src/dep-clean/ChangeLog | 13 | ||||
| -rw-r--r-- | trunk/src/dep-clean/README | 4 | ||||
| -rw-r--r-- | trunk/src/dep-clean/dep-clean | 164 | ||||
| -rw-r--r-- | trunk/src/dep-clean/dep-clean.1 | 194 |
5 files changed, 0 insertions, 384 deletions
diff --git a/trunk/src/dep-clean/AUTHORS b/trunk/src/dep-clean/AUTHORS deleted file mode 100644 index 2fa030f..0000000 --- a/trunk/src/dep-clean/AUTHORS +++ /dev/null @@ -1,9 +0,0 @@ -Maintainer: -Karl Trygve Kalleberg <karltk@gentoo.org> - -Authors: -Karl Trygve Kalleberg <karltk@gentoo.org> (dep-clean, man page) -Jerry Haltom <ssrit@larvalstage.net> (dep-clean) -Brandon Low <lostlogic@gentoo.org> (dep-clean) -Paul Belt <gaarde@users.sourceforge.net> (man page) -Brandon Low <lostlogic@gentoo.org> (dep-clean) diff --git a/trunk/src/dep-clean/ChangeLog b/trunk/src/dep-clean/ChangeLog deleted file mode 100644 index dc6980e..0000000 --- a/trunk/src/dep-clean/ChangeLog +++ /dev/null @@ -1,13 +0,0 @@ - 04 Oct 2003: Karl Trygve Kalleberg <karltk@gentoo.org> dep-clean, dep-clean.1: - * Rewrote to Python - * Uses gentoolkit - * Changed the switches to be proper toggles - - 25 Feb 2003; Brandon Low <lostlogic@gentoo.org> dep-clean, dep-clean.1: - * Update to work with current everything - * Add -q and change the default behaviour and the verbose behavior - * Make a lot faster by rewriting most everything - * Make script much more readable - * Make pay attention to PORTDIR_OVERLAY - * Bring back from the dead as it give more info - than the depclean action in portage. diff --git a/trunk/src/dep-clean/README b/trunk/src/dep-clean/README deleted file mode 100644 index 6521aef..0000000 --- a/trunk/src/dep-clean/README +++ /dev/null @@ -1,4 +0,0 @@ -See man dep-clean or just run dep-clean --help. - -QuickStart: -dep-clean displays missing, extra, and removed packages on your system. diff --git a/trunk/src/dep-clean/dep-clean b/trunk/src/dep-clean/dep-clean deleted file mode 100644 index 2f2bde0..0000000 --- a/trunk/src/dep-clean/dep-clean +++ /dev/null @@ -1,164 +0,0 @@ -#!/usr/bin/python -# -# Terminology: -# -# portdir = /usr/portage + /usr/local/portage -# vardir = /var/db/pkg - -import sys -import gentoolkit -try: - from portage.output import * -except ImportError: - from output import * - -__author__ = "Karl Trygve Kalleberg, Brandon Low, Jerry Haltom" -__email__ = "karltk@gentoo.org, lostlogic@gentoo.org, ssrit@larvalstage" -__version__ = "0.2.0" -__productname__ = "dep-clean" -__description__ = "Portage auxiliary dependency checker" - -class Config: - pass - -def defaultConfig(): - Config.displayUnneeded = 1 - Config.displayNeeded = 1 - Config.displayRemoved = 1 - Config.color = -1 - Config.verbosity = 2 - Config.prefixes = { "R" : "", - "U" : "", - "N" : "" } -def asCPVs(pkgs): - return map(lambda x: x.get_cpv(), pkgs) - -def asCPs(pkgs): - return map(lambda x: x.get_cp(), pkgs) - -def toCP(cpvs): - def _(x): - (c,p,v,r) = gentoolkit.split_package_name(x) - return c + "/" + p - return map(_, cpvs) - -def checkDeps(): - if Config.verbosity > 1: - print "Scanning packages, please be patient..." - - unmerged = asCPVs(gentoolkit.find_all_uninstalled_packages()) - unmerged_cp = toCP(unmerged) - - merged = asCPVs(gentoolkit.find_all_installed_packages()) - merged_cp = toCP(merged) - - (system, unres_system) = gentoolkit.find_system_packages() - system = asCPVs(system) - - (world, unres_world) = gentoolkit.find_world_packages() - world = asCPVs(world) - - desired = system + world - - unneeded = filter(lambda x: x not in desired, merged) - needed = filter(lambda x: x not in merged, desired) - old = filter(lambda x: x not in unmerged_cp, merged_cp) - - if len(needed): - print "Packages required, but not by world and system:" - for x in needed: print " " + x - raise "Internal error, please report." - - if len(unres_system) and Config.displayNeeded: - if Config.verbosity > 0: - print white("Packages in system but not installed:") - for x in unres_system: - print " " + Config.prefixes["N"] + red(x) - - if len(unres_world) and Config.displayNeeded: - if Config.verbosity > 0: - print white("Packages in world but not installed:") - for x in unres_world: - print " " + Config.prefixes["N"] + red(x) - - if len(old) and Config.displayRemoved: - if Config.verbosity > 0: - print white("Packages installed, but no longer available:") - for x in old: - print " " + Config.prefixes["R"] + yellow(x) - - if len(unneeded) and Config.displayUnneeded: - if Config.verbosity > 0: - print white("Packages installed, but not required by system or world:") - for x in unneeded: - print " " + Config.prefixes["U"] + green(x) - -def main(): - - defaultConfig() - - for x in sys.argv: - if 0: - pass - elif x in ["-h","--help"]: - printUsage() - sys.exit(0) - elif x in ["-V","--version"]: - printVersion() - sys.exit(0) - - elif x in ["-n","--needed","--needed=yes"]: - Config.displayNeeded = 1 - elif x in ["-N","--needed=no"]: - Config.displayNeeded = 0 - - elif x in ["-u","--unneeded","--unneeded=yes"]: - Config.displayUnneeded = 1 - elif x in ["-U","--unneeded=no"]: - Config.displayUnneeded = 0 - - elif x in ["-r","--removed","--removed=yes"]: - Config.displayRemoved = 1 - elif x in ["-R","--removed","--removed=no"]: - Config.displayRemoved = 0 - elif x in ["-c","--color=yes"]: - Config.color = 1 - elif x in ["-C","--color=no"]: - Config.color = 0 - - elif x in ["-v", "--verbose"]: - Config.verbosity += 1 - elif x in ["-q", "--quiet"]: - Config.verbosity = 0 - - # Set up colour output correctly - if (Config.color == -1 and \ - ((not sys.stdout.isatty()) or \ - (gentoolkit.settings["NOCOLOR"] in ["yes","true"]))) \ - or \ - Config.color == 0: - nocolor() - Config.prefixes = { "R": "R ", "N": "N ", "U": "U " } - - checkDeps() - -def printVersion(): - print __productname__ + "(" + __version__ + ") - " + \ - __description__ - print "Authors: " + __author__ - -def printUsage(): - print white("Usage: ") + turquoise(__productname__) + \ - " [" + turquoise("options") + "]" - print "Where " + turquoise("options") + " is one of:" - print white("Display:") - print " -N,--needed needed packages that are not installed." - print " -R,--removed installed packages not in portage." - print " -U,--unneeded potentially unneeded packages that are installed." - print white("Other:") - print " -C,--nocolor output without color. Categories will be denoted by P,N,U." - print " -h,--help print this help" - print " -v,--version print version information" - -if __name__ == "__main__": - main() diff --git a/trunk/src/dep-clean/dep-clean.1 b/trunk/src/dep-clean/dep-clean.1 deleted file mode 100644 index 9e42019..0000000 --- a/trunk/src/dep-clean/dep-clean.1 +++ /dev/null @@ -1,194 +0,0 @@ -.\" Automatically generated by Pod::Man version 1.15 -.\" Thu Jul 18 15:59:55 2002 -.\" -.\" Standard preamble: -.\" ====================================================================== -.de Sh \" Subsection heading -.br -.if t .Sp -.ne 5 -.PP -\fB\\$1\fR -.PP -.. -.de Sp \" Vertical space (when we can't use .PP) -.if t .sp .5v -.if n .sp -.. -.de Ip \" List item -.br -.ie \\n(.$>=3 .ne \\$3 -.el .ne 3 -.IP "\\$1" \\$2 -.. -.de Vb \" Begin verbatim text -.ft CW -.nf -.ne \\$1 -.. -.de Ve \" End verbatim text -.ft R - -.fi -.. -.\" Set up some character translations and predefined strings. \*(-- will -.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left -.\" double quote, and \*(R" will give a right double quote. | will give a -.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used -.\" to do unbreakable dashes and therefore won't be available. \*(C` and -.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<> -.tr \(*W-|\(bv\*(Tr -.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' -.ie n \{\ -. ds -- \(*W- -. ds PI pi -. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch -. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch -. ds L" "" -. ds R" "" -. ds C` "" -. ds C' "" -'br\} -.el\{\ -. ds -- \|\(em\| -. ds PI \(*p -. ds L" `` -. ds R" '' -'br\} -.\" -.\" If the F register is turned on, we'll generate index entries on stderr -.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and -.\" index entries marked with X<> in POD. Of course, you'll have to process -.\" the output yourself in some meaningful fashion. -.if \nF \{\ -. de IX -. tm Index:\\$1\t\\n%\t"\\$2" -.. -. nr % 0 -. rr F -.\} -.\" -.\" For nroff, turn off justification. Always turn off hyphenation; it -.\" makes way too many mistakes in technical documents. -.hy 0 -.if n .na -.\" -.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). -.\" Fear. Run. Save yourself. No user-serviceable parts. -.bd B 3 -. \" fudge factors for nroff and troff -.if n \{\ -. ds #H 0 -. ds #V .8m -. ds #F .3m -. ds #[ \f1 -. ds #] \fP -.\} -.if t \{\ -. ds #H ((1u-(\\\\n(.fu%2u))*.13m) -. ds #V .6m -. ds #F 0 -. ds #[ \& -. ds #] \& -.\} -. \" simple accents for nroff and troff -.if n \{\ -. ds ' \& -. ds ` \& -. ds ^ \& -. ds , \& -. ds ~ ~ -. ds / -.\} -.if t \{\ -. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" -. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' -. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' -. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' -. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' -. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' -.\} -. \" troff and (daisy-wheel) nroff accents -.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' -.ds 8 \h'\*(#H'\(*b\h'-\*(#H' -.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] -.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' -.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' -.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] -.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] -.ds ae a\h'-(\w'a'u*4/10)'e -.ds Ae A\h'-(\w'A'u*4/10)'E -. \" corrections for vroff -.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' -.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' -. \" for low resolution devices (crt and lpr) -.if \n(.H>23 .if \n(.V>19 \ -\{\ -. ds : e -. ds 8 ss -. ds o a -. ds d- d\h'-1'\(ga -. ds D- D\h'-1'\(hy -. ds th \o'bp' -. ds Th \o'LP' -. ds ae ae -. ds Ae AE -.\} -.rm #[ #] #H #V #F C -.\" ====================================================================== -.\" -.IX Title "DEP-CLEAN 1" -.TH DEP-CLEAN 1 "Copyright 2002 Gentoo Technologies, Inc." "2002-07-18" "GenToolKit's Dependency Checker!" -.UC -.SH "NAME" -dep-clean \- Shows unrequired packages and missing dependencies. -.SH "SYNOPSIS" -.IX Header "SYNOPSIS" -.Vb 1 -\& dep-clean [-RUNICv] -.Ve -.SH "DESCRIPTION" -.IX Header "DESCRIPTION" -dep-clean displays extraneous, missing or extra packages. Extra packages are those in which are not a part of the portage tree (/usr/portage). It does \s-1NOT\s0 modify the system in any way. -.SH "OPTIONS" -.IX Header "OPTIONS" -.Ip "\-n, \-\-needed" 4 -.Ip "\-N, \-\-needed=no" 4 -.IX Item "-n, --needed" -Toggle display of needed packages that are not installed. (red) (default=yes) -.Ip "\-r, \-\-removed" 4 -.Ip "\-R, \-\-removed=no" 4 -.IX Item "-R, --removed" -Toggle display of installed packages not in portage. (yellow) (default=yes) -.Ip "\-u, \-\-unneeded" 4 -.Ip "\-U, \-\-unneeded=no" 4 -.IX Item "-U, --unneeded" -Toggle display of unneeded packages that are installed. (green) (default=yes) -.Ip "\-c, \-\-color" 4 -.Ip "\-C, \-\-color=no" 4 -.IX Item "-c, --color" -Toggle output of color. Without color, package types will be noted with R, U and N. -Default is use whatever Portage is set for. -.Ip "\-v, \-\-verbose" 4 -.IX Item "-v, --verbose" -Be more verbose. -.Ip "\-q, \-\-quiet" 4 -.IX Item "-q, --quiet" -Be quiet (display only packages). -.SH "NOTES" -.IX Header "NOTES" -.Ip "" 4 -If this script is run on a system that is not up-to-date or which hasn't been cleaned (with 'emerge \-c') recently, the output may be deceptive. -.Ip "" 4 -If the same package name appears in all three categories, then it is definitely time to update that package and then run 'emerge \-c'. -.Ip "" 4 -The \-U, \-N and \-R options may be combined, default is \-UNR -.SH "AUTHORS" -.IX Header "AUTHORS" -Jerry Haltom <ssrit at larvalstage dot net> (dep-clean) -.br -Brandon Low <lostlogic at gentoo dot org> (dep-clean) -.PP -Paul Belt <gaarde at users dot sourceforge dot net> (man page) -.br -Karl Trygve Kalleberg <karltk at gentoo dot org> (dep-clean, man page) |
