mirror of
https://github.com/openSUSE/osc.git
synced 2025-09-08 05:58:43 +02:00
Fix several issues in HTML doc rendering, improve output
This commit is contained in:
@@ -26,7 +26,7 @@ class PackageQueries(dict):
|
||||
"""Adds package query to dict if it is of the correct architecture and
|
||||
is newer (has a greater version) than the currently assigned package.
|
||||
|
||||
@param a PackageQuery
|
||||
:param query: a PackageQuery
|
||||
"""
|
||||
self.__setitem__(query.name(), query)
|
||||
|
||||
|
@@ -31,9 +31,10 @@ OPERATOR_BY_FLAGS = {
|
||||
def primaryPath(directory):
|
||||
"""Returns path to the primary repository data file.
|
||||
|
||||
@param directory repository directory that contains the repodata subdirectory
|
||||
@return str path to primary repository data file
|
||||
@raise IOError if repomd.xml contains no primary location
|
||||
:param directory: repository directory that contains the repodata subdirectory
|
||||
:return: path to primary repository data file
|
||||
:rtype: str
|
||||
:raise IOError: if repomd.xml contains no primary location
|
||||
"""
|
||||
metaDataPath = os.path.join(directory, "repodata", "repomd.xml")
|
||||
elementTree = ET.parse(metaDataPath)
|
||||
@@ -55,10 +56,9 @@ def queries(directory):
|
||||
"""Returns a list of RepoDataQueries constructed from the repodata under
|
||||
the directory.
|
||||
|
||||
@param directory path to a repository directory (parent directory of
|
||||
repodata directory)
|
||||
@return list of RepoDataQueryResult instances
|
||||
@raise IOError if repomd.xml contains no primary location
|
||||
:param directory: path to a repository directory (parent directory of repodata directory)
|
||||
:return: list of RepoDataQueryResult instances
|
||||
:raise IOError: if repomd.xml contains no primary location
|
||||
"""
|
||||
path = primaryPath(directory)
|
||||
|
||||
@@ -99,9 +99,8 @@ class RepoDataQueryResult(osc.util.packagequery.PackageQueryResult):
|
||||
"""Creates a RepoDataQueryResult from the a package Element under a metadata
|
||||
Element in a primary.xml file.
|
||||
|
||||
@param directory repository directory path. Used to convert relative
|
||||
paths to full paths.
|
||||
@param element package Element
|
||||
:param directory: repository directory path. Used to convert relative paths to full paths.
|
||||
:param element: package Element
|
||||
"""
|
||||
self.__directory = os.path.abspath(directory)
|
||||
self.__element = element
|
||||
|
Reference in New Issue
Block a user