minideblib.AptRepoClient
index
minideblib/AptRepoClient.py

# -*- coding: UTF-8 -*-
# vim: sw=4 ts=4 expandtab ai
#
AptRepoClient.py
#
# This module implements class for access APT repository metadata.
#
# Copyright (C) 2006,2007 Alexandr Kanevskiy
#
# Contact: Alexandr Kanevskiy <packages@bifh.org>
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License 
# version 2 as published by the Free Software Foundation. 
#
# This program is distributed in the hope that it will be useful, but
# WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
# 02110-1301 USA
#
# $Id: AptRepoClient.py 100 2008-05-07 20:35:13Z kad $

 
Modules
       
os
re
time
types
urllib2

 
Classes
       
exceptions.Exception(exceptions.BaseException)
AptRepoException
minideblib.LoggableObject.LoggableObject
AptRepoClient

 
class AptRepoClient(minideblib.LoggableObject.LoggableObject)
    Client class to access Apt repositories.
 
  Methods defined here:
__init__(self, repos=None, arch=None)
Base class to access APT debian packages meta-data
get_available_binaries(self, base_url=None)
get_available_binary_repos(self)
Lists known binary repositories. Format is [ (base_url, distribution, section), ... ]
get_available_binary_versions(self, package, base_url=None)
get_available_source_repos(self)
Lists known source repositories. Format is [ (base_url, distribution, section), ... ]
get_available_source_versions(self, package, base_url=None)
get_available_sources(self, base_url=None)
get_best_binary_version(self, package, base_url=None)
Return exact repository and best available version for binary package
get_best_source_version(self, package, base_url=None)
Return exact repository and best available version for source package
get_binary_name_version(self, package, version=None, base_url=None)
Returns list of packages for requested name/version. 
If version is not specified, the best version will be choosen
get_source_name_version(self, package, version=None, base_url=None)
Returns list of packages for requested name/version. 
If version is not specified, the best version will be choosen
load_repos(self, repoline=None, ignore_errors=True, clear=True)
Loads repositories into internal data structures. Replaces previous content if clear = True (default)
make_pkgid_map(self)
Makes dictionary 'pkgid_map' out of available source/binary packages
make_source_to_binaries_map(self)
Makes dictionary 'source_to_binaries' out of available packages
update = load_repos(self, repoline=None, ignore_errors=True, clear=True)

 
class AptRepoException(exceptions.Exception)
    Exception generated in error situations
 
 
Method resolution order:
AptRepoException
exceptions.Exception
exceptions.BaseException
__builtin__.object

Methods defined here:
__init__(self, msg)
__repr__(self)
__str__(self)

Data descriptors defined here:
__weakref__
list of weak references to the object (if defined)

Data and other attributes inherited from exceptions.Exception:
__new__ = <built-in method __new__ of type object at 0x81419a0>
T.__new__(S, ...) -> a new object with type S, a subtype of T

Methods inherited from exceptions.BaseException:
__delattr__(...)
x.__delattr__('name') <==> del x.name
__getattribute__(...)
x.__getattribute__('name') <==> x.name
__getitem__(...)
x.__getitem__(y) <==> x[y]
__getslice__(...)
x.__getslice__(i, j) <==> x[i:j]
 
Use of negative indices is not supported.
__reduce__(...)
__setattr__(...)
x.__setattr__('name', value) <==> x.name = value
__setstate__(...)

Data descriptors inherited from exceptions.BaseException:
__dict__
args
message
exception message

 
Data
        __all__ = ['AptRepoClient', 'AptRepoException']
__revision__ = 'r100'