+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
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))
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."""
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/
#
# $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:
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]
# 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
# $Header$
from errors import FatalError
+import portage
+from gentoolkit import *
class Package:
"""Package descriptor. Contains convenience functions for querying the
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