From: Torsten Werner Date: Wed, 23 Mar 2011 18:02:48 +0000 (+0100) Subject: Rename ContentsScanner to BinaryContentsScanner. X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de7a18ef913661dff550e07487f65c01c99381a3;p=dak Rename ContentsScanner to BinaryContentsScanner. Signed-off-by: Torsten Werner --- diff --git a/dak/contents.py b/dak/contents.py index d763f869..ff3a97d5 100755 --- a/dak/contents.py +++ b/dak/contents.py @@ -40,7 +40,7 @@ import apt_pkg from daklib.config import Config from daklib.dbconn import * -from daklib.contents import ContentsScanner, ContentsWriter +from daklib.contents import BinaryContentsScanner, ContentsWriter from daklib import daklog from daklib import utils @@ -84,7 +84,7 @@ def write_all(cnf, suite_names = [], force = None): def scan_all(cnf, limit): Logger = daklog.Logger(cnf.Cnf, 'contents scan') - result = ContentsScanner.scan_all(limit) + result = BinaryContentsScanner.scan_all(limit) processed = '%(processed)d packages processed' % result remaining = '%(remaining)d packages remaining' % result Logger.log([processed, remaining]) diff --git a/daklib/contents.py b/daklib/contents.py index a158e8fc..df571e10 100755 --- a/daklib/contents.py +++ b/daklib/contents.py @@ -258,10 +258,10 @@ def generate_helper(suite_id, arch_id, overridetype_id, component_id = None): return log_message -class ContentsScanner(object): +class BinaryContentsScanner(object): ''' - ContentsScanner provides a threadsafe method scan() to scan the contents of - a DBBinary object. + BinaryContentsScanner provides a threadsafe method scan() to scan the + contents of a DBBinary object. ''' def __init__(self, binary_id): ''' @@ -313,7 +313,7 @@ def scan_helper(binary_id): ''' This function runs in a subprocess. ''' - scanner = ContentsScanner(binary_id) + scanner = BinaryContentsScanner(binary_id) scanner.scan() diff --git a/tests/dbtest_contents.py b/tests/dbtest_contents.py index 90fe4966..957307ba 100755 --- a/tests/dbtest_contents.py +++ b/tests/dbtest_contents.py @@ -3,7 +3,7 @@ from db_test import DBDakTestCase, fixture from daklib.dbconn import * -from daklib.contents import ContentsWriter, ContentsScanner, UnpackedSource +from daklib.contents import ContentsWriter, BinaryContentsScanner, UnpackedSource from os.path import normpath from sqlalchemy.exc import FlushError, IntegrityError @@ -167,7 +167,7 @@ class ContentsTestCase(DBDakTestCase): self.assertEqual(['usr/bin/hello', 'usr/share/doc/hello/copyright'], filelist) self.session.commit() - ContentsScanner(self.binary['hello_2.2-1_i386'].binary_id).scan() + BinaryContentsScanner(self.binary['hello_2.2-1_i386'].binary_id).scan() bin_contents_list = self.binary['hello_2.2-1_i386'].contents.order_by('file').all() self.assertEqual(2, len(bin_contents_list)) self.assertEqual('usr/bin/hello', bin_contents_list[0].file)