Package daklib :: Module import_repository
[hide private]
[frames] | no frames]

Module import_repository

source code

Classes [hide private]
  Release
  File
Functions [hide private]
 
obtain_file(base, path)
Obtain a file 'path' located below 'base'
source code
 
obtain_release(base, suite_name, keyring, fingerprint=None)
Obtain release information
source code
 
obtain_release_file(release, filename)
Obtain file referenced from Release
source code
 
import_source_to_archive(base, entry, transaction, archive, component)
Import source package described by 'entry' into the given 'archive' and 'component'
source code
 
import_package_to_suite(base, entry, transaction, suite, component)
Import binary package described by 'entry' into the given 'suite' and 'component'
source code
 
import_source_to_suite(base, entry, transaction, suite, component)
Import source package described by 'entry' into the given 'suite' and 'component'
source code
boolean

Note: This should probably be moved somewhere else

source_in_archive(source, version, archive, component=None)
Check that source package 'source' with version 'version' exists in 'archive', with an optional check for the given component 'component'.
source code
Variables [hide private]
  _release_hashes_fields = 'MD5Sum', 'SHA1', 'SHA256'
  _compressions = '.xz', '.gz', '.bz2'

Imports: daklib, apt_pkg, os, shutil, tempfile, urllib, DBSource, PoolFile, object_session


Function Details [hide private]

obtain_file(base, path)

source code 

Obtain a file 'path' located below 'base'

Returns: daklib.import_repository.File

Note: return type can still change

obtain_release(base, suite_name, keyring, fingerprint=None)

source code 

Obtain release information

Returns: daklib.import_repository.Release

obtain_release_file(release, filename)

source code 

Obtain file referenced from Release

A compressed version is automatically selected and decompressed if it exists.

Returns: daklib.import_repository.File

import_source_to_archive(base, entry, transaction, archive, component)

source code 

Import source package described by 'entry' into the given 'archive' and 'component'

'entry' needs to be a dict-like object with at least the following keys as used in a Sources index: Directory, Files, Checksums-Sha1, Checksums-Sha256

Return: daklib.dbconn.DBSource

import_package_to_suite(base, entry, transaction, suite, component)

source code 

Import binary package described by 'entry' into the given 'suite' and 'component'

'entry' needs to be a dict-like object with at least the following keys as used in a Packages index: Filename, Size, MD5sum, SHA1, SHA256

Returns: daklib.dbconn.DBBinary

import_source_to_suite(base, entry, transaction, suite, component)

source code 

Import source package described by 'entry' into the given 'suite' and 'component'

'entry' needs to be a dict-like object with at least the following keys as used in a Sources index: Directory, Files, Checksums-Sha1, Checksums-Sha256

Returns: daklib.dbconn.DBBinary

source_in_archive(source, version, archive, component=None)

source code 

Check that source package 'source' with version 'version' exists in 'archive', with an optional check for the given component 'component'.

Parameters:
  • source (str)
  • version (str)
  • component (daklib.dbconn.Component or None)
  • archive (daklib.dbconn.Archive)
Returns: boolean

Note: This should probably be moved somewhere else