try: import apt_pkg except ImportError: pass from xml.parsers.expat import ExpatError from pdk.exceptions import InputError, SemanticError from pdk.util import cpath, gen_file_fragments, get_remote_file, \ shell_command, Framer, cached_property, parse_xml from pdk.yaxml import parse_yaxml_file from pdk.package import parse_rpm_header, deb, udeb, dsc, \ get_package_type, UnknownPackageTypeError from pdk.progress import ConsoleMassProgress from pdk.index_file import IndexWriter, IndexFile, IndexFileMissingError from pdk.log import get_logger logger = get_logger() def quote(raw): '''Create a valid filename which roughly resembles the raw string.''' return re.sub(r'[^A-Za-z0-9.-]+', '_', raw) class MissingChannelDataError(SemanticError): '''Raised when a required channel data file is missing. Only used for real channels, not remote workspaces. ''' pass class LoaderFactory(tuple): '''Captures parameters to later create a cache loader.
import os import os.path from time import strftime, gmtime import re import hashfile import hashlib from sets import Set from itertools import chain from commands import mkarg from pdk.exceptions import SemanticError, InputError, IntegrityFault import pdk.log as log from pdk.util import ensure_directory_exists, pjoin, LazyWriter, \ parse_domain from pdk.package import udeb logger = log.get_logger() __revision__ = "$Progeny$" # The following lists are derived from the field sort order in apt. # As of apt 0.5.28.1, that is in apt-pkg/tagfile.cc, starting at # line 363. deb_binary_field_order = [ "Package", 'name', "Essential", "Status", "Priority", "Section", "Installed-Size", "Maintainer", "Architecture", 'arch', "Source", "Version", 'version', "Replaces", "Provides", "Depends", "Pre-Depends", "Recommends", "Suggests", "Conflicts", "Conffiles", "Filename", "Size", "MD5sum", "SHA1Sum", "Description", "Task" ] deb_source_field_order = [
try: import apt_pkg except ImportError: pass from xml.parsers.expat import ExpatError from pdk.exceptions import InputError, SemanticError from pdk.util import cpath, gen_file_fragments, get_remote_file, \ shell_command, Framer, cached_property, parse_xml from pdk.yaxml import parse_yaxml_file from pdk.package import parse_rpm_header, deb, udeb, dsc, \ get_package_type, UnknownPackageTypeError from pdk.progress import ConsoleMassProgress from pdk.index_file import IndexWriter, IndexFile, IndexFileMissingError from pdk.log import get_logger logger = get_logger() def quote(raw): '''Create a valid filename which roughly resembles the raw string.''' return re.sub(r'[^A-Za-z0-9.-]+', '_', raw) class MissingChannelDataError(SemanticError): '''Raised when a required channel data file is missing. Only used for real channels, not remote workspaces. ''' pass
import os.path import subprocess from time import strftime, gmtime import re import hashfile import hashlib from sets import Set from itertools import chain from commands import mkarg from pdk.exceptions import SemanticError, InputError, IntegrityFault import pdk.log as log from pdk.util import ensure_directory_exists, pjoin, LazyWriter, \ parse_domain from pdk.package import udeb logger = log.get_logger() __revision__ = "$Progeny$" # The following lists are derived from the field sort order in apt. # As of apt 0.5.28.1, that is in apt-pkg/tagfile.cc, starting at # line 363. deb_binary_field_order = [ "Package", 'name', "Essential", "Status", "Priority", "Section", "Installed-Size", "Maintainer", "Architecture", 'arch', "Source", "Version", 'version', "Replaces", "Provides", "Depends", "Pre-Depends", "Recommends", "Suggests", "Conflicts", "Conffiles", "Filename", "Size", "MD5sum", "SHA1Sum", "Description", "Task" ] deb_source_field_order = [