Package conary :: Package build :: Module build :: Class XMLCatalogEntry
[hide private]
[frames] | no frames]

Class XMLCatalogEntry

source code

  action.Action --+            
                  |            
action.RecipeAction --+        
                      |        
            BuildAction --+    
                          |    
  action.Action --+       |    
                  |       |    
action.RecipeAction --+   |    
                      |   |    
    action.ShellCommand --+    
                          |    
               BuildCommand --+
                              |
                             XMLCatalogEntry

NAME

r.XMLCatalogEntry() - Adds an entry to the XML catalog file catalog file

SYNOPSIS

r.XMLCatalogEntry([catalogFile,] [type,] [orig,] [replace])

DESCRIPTION

The r.XMLCatalogEntry() class is called from within a Conary recipe to add an entry to the XML catalog file catalogFile.

If the catalog default directory (/etc/xml) is nonexistent, r.XMLCatalogEntry will create it. If the catalog itself is nonexistent, it will be created as well.

KEYWORDS

The r.XMLCatalogEntry() class accepts the following keywords, with default values shown in parentheses when applicable:

catalogDir : ('%(sysconfdir)s/xml') The directory where the catalog file is located.

package : (None) If set, must be a string that specifies the package (package='packagename'), component (package=':componentname'), or package and component (package='packagename:componentname') in which to place the files added while executing this command. Previously-specified PackageSpec or ComponentSpec lines will override the package specification, since all package and component specifications are considered in strict order as provided by the recipe.

EXAMPLES

r.XMLCatalogEntry('docbook-xsl.xml', 'rewriteSystem', 'http://docbook.sourceforge.net/release/xsl/1.65.1', 'file://%(datadir)s/sgml/docbook/xsl-stylesheets-1.65.1')

Calls r.XMLCatalogEntry() on the catalog file docbook-xsl.xml, specifying a type of rewriteSystem, and an original entry of http://docbook.sourceforge.net/release/xsl/1.65.1 to be replaced by file://%(datadir)s/sgml/docbook/xsl-stylesheets-1.65.1.

Instance Methods [hide private]
 
__init__(self, recipe, *args, **keywords) source code
None
do(self, macros)
Method which is used if the ShellCommand instance is invoked during build
source code

Inherited from BuildAction: doAction, initManifest, missingFiles

Inherited from action.RecipeAction: doPrep, doSuggestAutoBuildReqs, init_error

Inherited from action.Action: addArgs

Inherited from action.Action (private): _applyDefaults

Class Variables [hide private]
  _actionPathBuildRequires = set(['xmlcatalog'])
  template = '%%(createcmd)s xmlcatalog --noout --add "%(type)s...
The string template used to build the shell command.
  keywords = {'catalogDir': '%(sysconfdir)s/xml'}
The keywords and default values accepted by the class

Inherited from BuildAction: useExplicitManifest

Instance Variables [hide private]

Inherited from action.ShellCommand: self.command

Method Details [hide private]

__init__(self, recipe, *args, **keywords)
(Constructor)

source code 
Overrides: BuildCommand.__init__

do(self, macros)

source code 
Method which is used if the ShellCommand instance is invoked during build
Returns: None
None
Overrides: BuildCommand.do
(inherited documentation)

Class Variable Details [hide private]

template

The string template used to build the shell command.
Value:
'%%(createcmd)s xmlcatalog --noout --add  "%(type)s" "%(orig)s" "%(rep\
lace)s" "%%(destdir)s/%(catalogDir)s/%(catalogFile)s"'