more sticky tape to get this thing released
authorgenone <genone@gentoo.org>
Tue, 26 Apr 2005 00:38:06 +0000 (00:38 -0000)
committergenone <genone@gentoo.org>
Tue, 26 Apr 2005 00:38:06 +0000 (00:38 -0000)
svn path=/; revision=208

trunk/ChangeLog
trunk/src/equery/equery
trunk/src/gentoolkit/Makefile
trunk/src/gentoolkit/helpers.py
trunk/src/gentoolkit/package.py

index efb7a46c80722dc4baca398d911b821149d177cd..f067f5e05a20a642eb8228ac6b24e4024019ac2e 100644 (file)
@@ -1,3 +1,8 @@
+2005-04-26 Marius Mauch <genone@gentoo.org>
+       * gentoolkit: fix broken Makefile
+       * gentoolkit: add some sticky tape to get the stupid thing working again
+       * equery: fix a few minor problems
+
 2005-04-25 Marius Mauch <genone@gentoo.org>
        * qpkg: moving to /usr/share/doc/gentoolkit-*/deprecated
        * etcat: moving to /usr/share/doc/gentoolkit-*/deprecated
index 079c15bb9843b4ad4290971bdd4b03cbeed77919..102e5081c714eeda904e45092d28b9d93e61d808 100755 (executable)
@@ -732,7 +732,7 @@ class CmdDisplaySize(Command):
        
                                sz = "%.2f KiB" % (size/1024.0)                         
                                if opts["reportSizeInBytes"]:
-                                       sz = number(str(size)) + " bytes"
+                                       sz = pp.number(str(size)) + " bytes"
                                
                                print_info(0, string.rjust("Total size  : ",25) + pp.number(sz))
 
@@ -917,7 +917,7 @@ class CmdWhich(Command):
                return "Print full path to ebuild for a given package" + \
                        "\n" + \
                        "Syntax:\n" + \
-                       "  " + pp.command("size ") + pp.pkgquery("pkgspec")
+                       "  " + pp.command("which ") + pp.pkgquery("pkgspec")
 
 class CmdListGLSAs(Command):
        """List outstanding GLSAs."""
index 84981a2a9f2d25fb5ff946751c74fbde047ec6dc..4fb319b822619551801897aab2b81fa780a2fea4 100644 (file)
@@ -11,12 +11,12 @@ all:
 
 dist:
        mkdir -p ../../${distdir}/src/gentoolkit
-       cp Makefile AUTHORS README ChangeLog TODO package.py helpers.py pprinter.py __init__.py ../../${distdir}/src/gentoolkit/
+       cp Makefile AUTHORS README ChangeLog TODO errors.py package.py helpers.py pprinter.py __init__.py ../../${distdir}/src/gentoolkit/
 
 install:
        install -d $(docdir)/gentoolkit
-       install -m 0644 AUTHORS README TODO ChangeLog $(docdir)/gentoolkit/
+       install -m 0644 AUTHORS README TODO $(docdir)/gentoolkit/
        install -d $(DESTDIR)/usr/lib/gentoolkit/pym/gentoolkit
-       install -m 0644 package.py pprinter.py package.py $(DESTDIR)/usr/lib/gentoolkit/pym/gentoolkit/
+       install -m 0644 package.py pprinter.py helpers.py errors.py $(DESTDIR)/usr/lib/gentoolkit/pym/gentoolkit/
        install -m 0644 __init__.py $(DESTDIR)/usr/lib/gentoolkit/pym/gentoolkit/
        
index 94c3533ae2b8c93fc59dd1c2496e9fd477fac152..98c9b3703882b0913a15b58197752f53d5a900c3 100644 (file)
@@ -7,6 +7,10 @@
 #
 # $Header$
 
+import portage
+from gentoolkit import *
+from gentoolkit.package import *
+
 def find_packages(search_key, masked=False):
        """Returns a list of Package objects that matched the search key."""
        try:
@@ -30,13 +34,13 @@ def find_packages(search_key, masked=False):
 def find_installed_packages(search_key, masked=False):
        """Returns a list of Package objects that matched the search key."""
        try:
-                       t = vartree.dbapi.match(search_key)
+                       t = portage.db["/"]["vartree"].dbapi.match(search_key)
        # catch the "amgigous package" Exception
        except ValueError, e:
                if type(e[0]) == types.ListType:
                        t = []
                        for cp in e[0]:
-                               t += vartree.dbapi.match(cp)
+                               t += portage.db["/"]["vartree"].dbapi.match(cp)
                else:
                        raise ValueError(e)
        return [Package(x) for x in t]
@@ -47,9 +51,9 @@ def find_best_match(search_key):
        # FIXME: How should we handled versioned virtuals??
        cat,pkg,ver,rev = split_package_name(search_key)
        if cat == "virtual":
-               t = vartree.dep_bestmatch(cat+"/"+pkg)
+               t = portage.db["/"]["vartree"].dep_bestmatch(cat+"/"+pkg)
        else:
-               t = vartree.dep_bestmatch(search_key)
+               t = portage.db["/"]["vartree"].dep_bestmatch(search_key)
        if t:
                return Package(t)
        return None
index a25d30ab309faf469ed2db3f45b021f1ec302e0b..689145fe9419717ad89d51102dd55498d96f8caa 100644 (file)
@@ -8,6 +8,8 @@
 # $Header$
 
 from errors import FatalError
+import portage
+from gentoolkit import *
 
 class Package:
        """Package descriptor. Contains convenience functions for querying the
@@ -17,6 +19,7 @@ class Package:
        def __init__(self,cpv):
                self._cpv = cpv
                self._scpv = portage.catpkgsplit(self._cpv)
+               
                if not self._scpv:
                        raise FatalError("invalid cpv: %s" % cpv)
                self._db = None