diff --git a/pisi/api.py b/pisi/api.py index a7a6409e..350aef2b 100644 --- a/pisi/api.py +++ b/pisi/api.py @@ -315,6 +315,7 @@ def add_repo(name, indexuri): def remove_repo(name): if ctx.repodb.has_repo(name): ctx.repodb.remove_repo(name) + pisi.util.clean_dir(os.path.join(ctx.config.index_dir(), repo)) ctx.ui.info(_('Repo %s removed from system.') % name) else: ctx.ui.error(_('Repository %s does not exist. Cannot remove.') diff --git a/pisi/component.py b/pisi/component.py index fb36d07f..314d6146 100644 --- a/pisi/component.py +++ b/pisi/component.py @@ -26,13 +26,21 @@ class Error(pisi.Error): __metaclass__ = autoxml.autoxml -class Distribution: - t_Name = [autoxml.Text, autoxml.mandatory] +class Distribution(xmlfile.XmlFile): + + __metaclass__ = autoxml.autoxml + + tag = "PISI" + + t_SourceName = [autoxml.Text, autoxml.mandatory] # name of distribution (source) t_Description = [autoxml.LocalText, autoxml.mandatory] t_Version = [autoxml.Text, autoxml.mandatory] t_Type = [autoxml.Text, autoxml.mandatory] t_Dependencies = [ [autoxml.Text], autoxml.optional, "Dependencies/Distribution"] + t_BinaryName = [autoxml.Text, autoxml.optional] # name of repository (binary distro) + t_Architecture = [autoxml.Text, autoxml.optional] # architecture identifier + class Component(xmlfile.XmlFile): "representation for component declarations" @@ -46,6 +54,7 @@ class Component(xmlfile.XmlFile): # component name in other languages, for instance in Turkish # LocalName for system.base could be sistem.taban or "Taban Sistem", # this could be useful for GUIs + t_LocalName = [autoxml.LocalText, autoxml.mandatory] # Information about the component diff --git a/pisi/configfile.py b/pisi/configfile.py index e1e7715f..385e3ed1 100644 --- a/pisi/configfile.py +++ b/pisi/configfile.py @@ -81,7 +81,7 @@ class DirsDefaults: db_dir = "/var/db/pisi" archives_dir = "/var/cache/pisi/archives" packages_dir = "/var/cache/pisi/packages" - index_dir = "/var/cache/pisi/index" + index_dir = "/var/lib/pisi/index" tmp_dir = "/var/tmp/pisi" icon_theme_dir = "/usr/share/icons/Tulliana-1.0" kde_dir = "/usr/kde/3.5" diff --git a/pisi/constants.py b/pisi/constants.py index f143c47d..d160a7b7 100644 --- a/pisi/constants.py +++ b/pisi/constants.py @@ -10,9 +10,9 @@ # Please read the COPYING file. # -# PISI constants. -# If you have a "magic" constant value this is where it should be -# defined. +"""PISI constants. +If you have a "magic" constant value this is where it should be +defined.""" # Author: Baris Metin