* let's call it packages, more informative

This commit is contained in:
Eray Özkural
2005-11-14 15:54:57 +00:00
parent 98a72b00c1
commit b9f03dfc0a
2 changed files with 5 additions and 4 deletions
+1
View File
@@ -850,6 +850,7 @@ Gives a brief list of PiSi components published in the repositories.
ctx.ui.info('%s - %s ' % (component.name, unicode(component.summary))) ctx.ui.info('%s - %s ' % (component.name, unicode(component.summary)))
self.finalize() self.finalize()
class ListUpgrades(Command): class ListUpgrades(Command):
"""List packages to be upgraded """List packages to be upgraded
+4 -4
View File
@@ -56,9 +56,9 @@ class Component(xmlfile.XmlFile):
# Dependencies to other components # Dependencies to other components
t_Dependencies = [ [autoxml.String], autoxml.optional, "Dependencies/Component"] t_Dependencies = [ [autoxml.String], autoxml.optional, "Dependencies/Component"]
# the components contained by this guy. # the parts of this component.
# to be filled by the component database, thus it is optional. # to be filled by the component database, thus it is optional.
t_Components = [ [autoxml.String], autoxml.optional, "Components/Component"] t_Packages = [ [autoxml.String], autoxml.optional, "Parts/Package"]
# TODO: this is probably not necessary since we use fully qualified # TODO: this is probably not necessary since we use fully qualified
# module names (like in Java) # module names (like in Java)
@@ -106,14 +106,14 @@ class ComponentDB(object):
if not self.has_component(component_name): if not self.has_component(component_name):
raise Error(_('Information for component %s not available') % component_name) raise Error(_('Information for component %s not available') % component_name)
component = self.get_component(component_name) component = self.get_component(component_name)
component.components.append(package) component.packages.append(package)
self.d[component_name] = component # update self.d[component_name] = component # update
def remove_package(self, component_name, package): def remove_package(self, component_name, package):
if not self.has_component(component_name): if not self.has_component(component_name):
raise Error(_('Information for component %s not available') % component_name) raise Error(_('Information for component %s not available') % component_name)
component = self.get_component(component_name) component = self.get_component(component_name)
component.components.remove(package) component.packages.remove(package)
self.d[component_name] = component # update self.d[component_name] = component # update
def clear(self): def clear(self):