From patchwork Wed Mar 23 23:00:49 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lo=C3=AFc_Minier?= X-Patchwork-Id: 764 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:45:33 -0000 Delivered-To: patches@linaro.org Received: by 10.220.180.8 with SMTP id bs8cs26540vcb; Wed, 23 Mar 2011 16:00:51 -0700 (PDT) Received: by 10.216.145.131 with SMTP id p3mr6426733wej.82.1300921250438; Wed, 23 Mar 2011 16:00:50 -0700 (PDT) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id r11si15754252wei.156.2011.03.23.16.00.49; Wed, 23 Mar 2011 16:00:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1Q2X2n-0002Wa-EX for ; Wed, 23 Mar 2011 23:00:49 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id 6051F2E889C for ; Wed, 23 Mar 2011 23:00:49 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: linaro-image-tools X-Launchpad-Branch: ~linaro-maintainers/linaro-image-tools/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 301 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-maintainers/linaro-image-tools/trunk] Rev 301: Merge lp:~lool/linaro-image-tools/shuffle-modules; move modules to to Message-Id: <20110323230049.20360.31600.launchpad@loganberry.canonical.com> Date: Wed, 23 Mar 2011 23:00:49 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="12633"; Instance="initZopeless config overlay" X-Launchpad-Hash: 13462983624a1222b2796899904809f455ad8025 Merge authors: Loïc Minier (lool) Related merge proposals: https://code.launchpad.net/~lool/linaro-image-tools/shuffle-modules/+merge/54618 proposed by: Loïc Minier (lool) review: Approve - Guilherme Salgado (salgado) ------------------------------------------------------------ revno: 301 [merge] fixes bug(s): https://launchpad.net/bugs/711310 committer: Loïc Minier branch nick: linaro-image-tools timestamp: Wed 2011-03-23 23:58:00 +0100 message: Merge lp:~lool/linaro-image-tools/shuffle-modules; move modules to to linaro_image_tools.* to allow sharing code; LP: #711310. added: linaro_image_tools/ linaro_image_tools/__init__.py renamed: hwpack/ => linaro_image_tools/hwpack/ linaro_media_create/ => linaro_image_tools/media_create/ tests/ => linaro_image_tools/tests/ modified: .testr.conf COPYING linaro-hwpack-create linaro-media-create linaro_image_tools/hwpack/builder.py linaro_image_tools/hwpack/hardwarepack.py linaro_image_tools/hwpack/testing.py linaro_image_tools/hwpack/tests/__init__.py linaro_image_tools/hwpack/tests/test_better_tarfile.py linaro_image_tools/hwpack/tests/test_builder.py linaro_image_tools/hwpack/tests/test_config.py linaro_image_tools/hwpack/tests/test_hardwarepack.py linaro_image_tools/hwpack/tests/test_packages.py linaro_image_tools/hwpack/tests/test_script.py linaro_image_tools/hwpack/tests/test_tarfile_matchers.py linaro_image_tools/hwpack/tests/test_testing.py linaro_image_tools/media_create/__init__.py linaro_image_tools/media_create/boards.py linaro_image_tools/media_create/check_device.py linaro_image_tools/media_create/hwpack.py linaro_image_tools/media_create/partitions.py linaro_image_tools/media_create/populate_boot.py linaro_image_tools/media_create/rootfs.py linaro_image_tools/media_create/tests/__init__.py linaro_image_tools/media_create/tests/fixtures.py linaro_image_tools/media_create/tests/test_media_create.py linaro_image_tools/media_create/unpack_binary_tarball.py linaro_image_tools/media_create/utils.py linaro_image_tools/tests/__init__.py linaro_image_tools/tests/integration.txt --- lp:linaro-image-tools https://code.launchpad.net/~linaro-maintainers/linaro-image-tools/trunk You are subscribed to branch lp:linaro-image-tools. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-maintainers/linaro-image-tools/trunk/+edit-subscription === modified file '.testr.conf' --- .testr.conf 2010-11-22 13:17:27 +0000 +++ .testr.conf 2011-03-23 22:25:10 +0000 @@ -1,3 +1,3 @@ [DEFAULT] test_command=python -m subunit.run $IDLIST -test_id_list_default=tests.test_suite +test_id_list_default=linaro_image_tools.tests.test_suite === modified file 'COPYING' --- COPYING 2011-01-28 19:53:07 +0000 +++ COPYING 2011-03-23 22:25:10 +0000 @@ -3,11 +3,11 @@ Maintainer: Linaro Infrastructure team Source: https://launchpad.net/linaro-image-tools -Files: linaro-hwpack-create linaro-hwpack-install hwpack/* -Copyright: 2010, 2011 Linaro Limited +Files: linaro-hwpack-create linaro-hwpack-install linaro_image_tools/hwpack/* +Copyright: 2010, 2011 Linaro Limited License: GPL-2+ -Files: linaro-media-create linaro_media_create/* -Copyright: 2010, 2011 Linaro Limited +Files: linaro-media-create linaro_image_tools/media_create/* +Copyright: 2010, 2011 Linaro Limited License: GPL-3+ === modified file 'linaro-hwpack-create' --- linaro-hwpack-create 2011-01-28 19:50:48 +0000 +++ linaro-hwpack-create 2011-03-23 22:25:10 +0000 @@ -24,7 +24,8 @@ import logging import sys -from hwpack.builder import ConfigFileMissing, HardwarePackBuilder +from linaro_image_tools.hwpack.builder import ( + ConfigFileMissing, HardwarePackBuilder) if __name__ == '__main__': === modified file 'linaro-media-create' --- linaro-media-create 2011-02-11 15:49:23 +0000 +++ linaro-media-create 2011-03-23 22:25:10 +0000 @@ -23,25 +23,25 @@ import sys import tempfile -from linaro_media_create.boards import ( - board_configs, - ) -from linaro_media_create.check_device import ( +from linaro_image_tools.media_create.boards import board_configs +from linaro_image_tools.media_create.check_device import ( confirm_device_selection_and_ensure_it_is_ready) -from linaro_media_create.hwpack import install_hwpacks -from linaro_media_create.partitions import ( +from linaro_image_tools.media_create.hwpack import install_hwpacks +from linaro_image_tools.media_create.partitions import ( Media, setup_partitions, get_uuid, ) -from linaro_media_create.populate_boot import populate_boot -from linaro_media_create.rootfs import populate_rootfs -from linaro_media_create.unpack_binary_tarball import unpack_binary_tarball -from linaro_media_create.utils import ( +from linaro_image_tools.media_create.populate_boot import populate_boot +from linaro_image_tools.media_create.rootfs import populate_rootfs +from linaro_image_tools.media_create.unpack_binary_tarball import ( + unpack_binary_tarball, + ) +from linaro_image_tools.media_create.utils import ( ensure_command, is_arm_host, ) -from linaro_media_create import ( +from linaro_image_tools.media_create import ( cmd_runner, get_args_parser ) === added directory 'linaro_image_tools' === added file 'linaro_image_tools/__init__.py' === renamed directory 'hwpack' => 'linaro_image_tools/hwpack' === modified file 'linaro_image_tools/hwpack/builder.py' --- hwpack/builder.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/builder.py 2011-03-23 22:25:10 +0000 @@ -22,9 +22,9 @@ import logging import errno -from hwpack.config import Config -from hwpack.hardwarepack import HardwarePack, Metadata -from hwpack.packages import ( +from linaro_image_tools.hwpack.config import Config +from linaro_image_tools.hwpack.hardwarepack import HardwarePack, Metadata +from linaro_image_tools.hwpack.packages import ( FetchedPackage, LocalArchiveMaker, PackageFetcher, === modified file 'linaro_image_tools/hwpack/hardwarepack.py' --- hwpack/hardwarepack.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/hardwarepack.py 2011-03-23 22:25:10 +0000 @@ -21,8 +21,8 @@ import time -from hwpack.better_tarfile import writeable_tarfile -from hwpack.packages import ( +from linaro_image_tools.hwpack.better_tarfile import writeable_tarfile +from linaro_image_tools.hwpack.packages import ( FetchedPackage, get_packages_file, PackageMaker, === modified file 'linaro_image_tools/hwpack/testing.py' --- hwpack/testing.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/testing.py 2011-03-23 22:25:10 +0000 @@ -35,9 +35,12 @@ from testtools import TestCase from testtools.matchers import Annotate, Equals, Matcher, Mismatch -from hwpack.better_tarfile import writeable_tarfile -from hwpack.tarfile_matchers import TarfileHasFile -from hwpack.packages import get_packages_file, FetchedPackage +from linaro_image_tools.hwpack.better_tarfile import writeable_tarfile +from linaro_image_tools.hwpack.tarfile_matchers import TarfileHasFile +from linaro_image_tools.hwpack.packages import ( + get_packages_file, + FetchedPackage, + ) @contextmanager === modified file 'linaro_image_tools/hwpack/tests/__init__.py' --- hwpack/tests/__init__.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/tests/__init__.py 2011-03-23 22:25:10 +0000 @@ -23,14 +23,14 @@ def test_suite(): module_names = [ - 'hwpack.tests.test_better_tarfile', - 'hwpack.tests.test_builder', - 'hwpack.tests.test_config', - 'hwpack.tests.test_hardwarepack', - 'hwpack.tests.test_packages', - 'hwpack.tests.test_script', - 'hwpack.tests.test_tarfile_matchers', - 'hwpack.tests.test_testing', + 'linaro_image_tools.hwpack.tests.test_better_tarfile', + 'linaro_image_tools.hwpack.tests.test_builder', + 'linaro_image_tools.hwpack.tests.test_config', + 'linaro_image_tools.hwpack.tests.test_hardwarepack', + 'linaro_image_tools.hwpack.tests.test_packages', + 'linaro_image_tools.hwpack.tests.test_script', + 'linaro_image_tools.hwpack.tests.test_tarfile_matchers', + 'linaro_image_tools.hwpack.tests.test_testing', ] loader = unittest.TestLoader() suite = loader.loadTestsFromNames(module_names) === modified file 'linaro_image_tools/hwpack/tests/test_better_tarfile.py' --- hwpack/tests/test_better_tarfile.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/tests/test_better_tarfile.py 2011-03-23 22:25:10 +0000 @@ -25,7 +25,7 @@ from testtools import TestCase -from hwpack.better_tarfile import writeable_tarfile +from linaro_image_tools.hwpack.better_tarfile import writeable_tarfile @contextmanager === modified file 'linaro_image_tools/hwpack/tests/test_builder.py' --- hwpack/tests/test_builder.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/tests/test_builder.py 2011-03-23 22:25:10 +0000 @@ -25,19 +25,19 @@ from testtools import TestCase from testtools.matchers import Equals -from hwpack.builder import ( +from linaro_image_tools.hwpack.builder import ( ConfigFileMissing, HardwarePackBuilder, logger as builder_logger, ) -from hwpack.config import HwpackConfigError -from hwpack.hardwarepack import Metadata -from hwpack.packages import ( +from linaro_image_tools.hwpack.config import HwpackConfigError +from linaro_image_tools.hwpack.hardwarepack import Metadata +from linaro_image_tools.hwpack.packages import ( FetchedPackage, PackageMaker, ) -from hwpack.tarfile_matchers import TarfileHasFile -from hwpack.testing import ( +from linaro_image_tools.hwpack.tarfile_matchers import TarfileHasFile +from linaro_image_tools.hwpack.testing import ( AppendingHandler, AptSourceFixture, ChdirToTempdirFixture, === modified file 'linaro_image_tools/hwpack/tests/test_config.py' --- hwpack/tests/test_config.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/tests/test_config.py 2011-03-23 22:25:10 +0000 @@ -23,7 +23,7 @@ from testtools import TestCase -from hwpack.config import Config, HwpackConfigError +from linaro_image_tools.hwpack.config import Config, HwpackConfigError class ConfigTests(TestCase): === modified file 'linaro_image_tools/hwpack/tests/test_hardwarepack.py' --- hwpack/tests/test_hardwarepack.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/tests/test_hardwarepack.py 2011-03-23 22:25:10 +0000 @@ -26,9 +26,9 @@ from testtools import TestCase from testtools.matchers import Equals -from hwpack.hardwarepack import HardwarePack, Metadata -from hwpack.packages import get_packages_file -from hwpack.testing import ( +from linaro_image_tools.hwpack.hardwarepack import HardwarePack, Metadata +from linaro_image_tools.hwpack.packages import get_packages_file +from linaro_image_tools.hwpack.testing import ( DummyFetchedPackage, HardwarePackHasFile, MatchesAsPackagesFile, === modified file 'linaro_image_tools/hwpack/tests/test_packages.py' --- hwpack/tests/test_packages.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/tests/test_packages.py 2011-03-23 22:25:10 +0000 @@ -33,7 +33,7 @@ from testtools import TestCase from testtools.matchers import Equals -from hwpack.packages import ( +from linaro_image_tools.hwpack.packages import ( DependencyNotSatisfied, DummyProgress, FetchedPackage, @@ -45,7 +45,7 @@ stringify_relationship, TemporaryDirectoryManager, ) -from hwpack.testing import ( +from linaro_image_tools.hwpack.testing import ( AptSourceFixture, ContextManagerFixture, DummyFetchedPackage, === modified file 'linaro_image_tools/hwpack/tests/test_script.py' --- hwpack/tests/test_script.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/tests/test_script.py 2011-03-23 22:25:10 +0000 @@ -22,8 +22,8 @@ import os import subprocess -from hwpack.hardwarepack import Metadata -from hwpack.testing import ( +from linaro_image_tools.hwpack.hardwarepack import Metadata +from linaro_image_tools.hwpack.testing import ( AptSourceFixture, ChdirToTempdirFixture, ConfigFileFixture, @@ -45,7 +45,7 @@ script_name = "linaro-hwpack-create" this_path = os.path.abspath(__file__) parent_path = this_path - for i in range(3): + for i in range(4): parent_path = os.path.dirname(parent_path) possible_paths = [ os.path.join(parent_path, script_name), === modified file 'linaro_image_tools/hwpack/tests/test_tarfile_matchers.py' --- hwpack/tests/test_tarfile_matchers.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/tests/test_tarfile_matchers.py 2011-03-23 22:25:10 +0000 @@ -23,12 +23,12 @@ from testtools import TestCase -from hwpack.tarfile_matchers import ( +from linaro_image_tools.hwpack.tarfile_matchers import ( TarfileHasFile, TarfileMissingPathMismatch, TarfileWrongValueMismatch, ) -from hwpack.testing import test_tarfile +from linaro_image_tools.hwpack.testing import test_tarfile class TarfileMissingPathMismatchTests(TestCase): === modified file 'linaro_image_tools/hwpack/tests/test_testing.py' --- hwpack/tests/test_testing.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/hwpack/tests/test_testing.py 2011-03-23 22:25:10 +0000 @@ -31,7 +31,7 @@ Mismatch, NotEquals, ) -from hwpack.testing import ( +from linaro_image_tools.hwpack.testing import ( DummyFetchedPackage, EachOf, MatchesAsPackagesFile, @@ -41,7 +41,7 @@ MatchesSetwise, parse_packages_file_content, ) -from hwpack.packages import ( +from linaro_image_tools.hwpack.packages import ( get_packages_file, ) === renamed directory 'linaro_media_create' => 'linaro_image_tools/media_create' === modified file 'linaro_image_tools/media_create/__init__.py' --- linaro_media_create/__init__.py 2011-02-11 15:49:23 +0000 +++ linaro_image_tools/media_create/__init__.py 2011-03-23 22:25:10 +0000 @@ -19,7 +19,7 @@ import argparse -from linaro_media_create.boards import board_configs +from linaro_image_tools.media_create.boards import board_configs KNOWN_BOARDS = board_configs.keys() === modified file 'linaro_image_tools/media_create/boards.py' --- linaro_media_create/boards.py 2011-03-17 17:48:49 +0000 +++ linaro_image_tools/media_create/boards.py 2011-03-23 22:25:10 +0000 @@ -32,8 +32,8 @@ import struct from binascii import crc32 -from linaro_media_create import cmd_runner -from linaro_media_create.partitions import SECTOR_SIZE +from linaro_image_tools.media_create import cmd_runner +from linaro_image_tools.media_create.partitions import SECTOR_SIZE # Notes: # * since we align partitions on 4 MiB by default, geometry is currently 128 === modified file 'linaro_image_tools/media_create/check_device.py' --- linaro_media_create/check_device.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/media_create/check_device.py 2011-03-23 22:25:10 +0000 @@ -21,7 +21,7 @@ import dbus -from linaro_media_create import partitions +from linaro_image_tools.media_create import partitions def _get_system_bus_and_udisks_iface(): === modified file 'linaro_image_tools/media_create/hwpack.py' --- linaro_media_create/hwpack.py 2011-02-02 17:32:10 +0000 +++ linaro_image_tools/media_create/hwpack.py 2011-03-23 22:25:10 +0000 @@ -20,8 +20,8 @@ import os import sys -from linaro_media_create import cmd_runner -from linaro_media_create.utils import ( +from linaro_image_tools.media_create import cmd_runner +from linaro_image_tools.media_create.utils import ( is_arm_host, find_command, ) === modified file 'linaro_image_tools/media_create/partitions.py' --- linaro_media_create/partitions.py 2011-03-10 23:28:21 +0000 +++ linaro_image_tools/media_create/partitions.py 2011-03-23 22:25:10 +0000 @@ -30,7 +30,7 @@ PARTITION_NORMAL, ) -from linaro_media_create import cmd_runner +from linaro_image_tools.media_create import cmd_runner HEADS = 128 === modified file 'linaro_image_tools/media_create/populate_boot.py' --- linaro_media_create/populate_boot.py 2011-03-01 16:40:46 +0000 +++ linaro_image_tools/media_create/populate_boot.py 2011-03-23 22:25:10 +0000 @@ -19,7 +19,7 @@ import os -from linaro_media_create import cmd_runner +from linaro_image_tools.media_create import cmd_runner def populate_boot(board_config, chroot_dir, rootfs_uuid, boot_partition, === modified file 'linaro_image_tools/media_create/rootfs.py' --- linaro_media_create/rootfs.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/media_create/rootfs.py 2011-03-23 22:25:10 +0000 @@ -21,7 +21,7 @@ import os import tempfile -from linaro_media_create import cmd_runner +from linaro_image_tools.media_create import cmd_runner def populate_rootfs(content_dir, root_disk, partition, rootfs_type, === modified file 'linaro_image_tools/media_create/tests/__init__.py' --- linaro_media_create/tests/__init__.py 2011-01-11 21:26:54 +0000 +++ linaro_image_tools/media_create/tests/__init__.py 2011-03-23 22:25:10 +0000 @@ -1,7 +1,7 @@ import unittest def test_suite(): - module_names = ['linaro_media_create.tests.test_media_create', + module_names = ['linaro_image_tools.media_create.tests.test_media_create', ] loader = unittest.TestLoader() suite = loader.loadTestsFromNames(module_names) === modified file 'linaro_image_tools/media_create/tests/fixtures.py' --- linaro_media_create/tests/fixtures.py 2011-02-01 17:53:44 +0000 +++ linaro_image_tools/media_create/tests/fixtures.py 2011-03-23 22:25:10 +0000 @@ -22,8 +22,8 @@ import subprocess import tempfile -from linaro_media_create import partitions -from linaro_media_create import cmd_runner +from linaro_image_tools.media_create import partitions +from linaro_image_tools.media_create import cmd_runner class CreateTempDirFixture(object): === modified file 'linaro_image_tools/media_create/tests/test_media_create.py' --- linaro_media_create/tests/test_media_create.py 2011-03-18 13:37:32 +0000 +++ linaro_image_tools/media_create/tests/test_media_create.py 2011-03-23 22:25:10 +0000 @@ -31,9 +31,9 @@ from testtools import TestCase -from hwpack.testing import TestCaseWithFixtures +from linaro_image_tools.hwpack.testing import TestCaseWithFixtures -from linaro_media_create import ( +from linaro_image_tools.media_create import ( check_device, cmd_runner, boards, @@ -41,8 +41,8 @@ rootfs, utils, ) -import linaro_media_create -from linaro_media_create.boards import ( +import linaro_image_tools.media_create +from linaro_image_tools.media_create.boards import ( LOADER_MIN_SIZE_S, SECTOR_SIZE, align_up, @@ -58,7 +58,7 @@ _get_mlo_file, _run_mkimage, ) -from linaro_media_create.hwpack import ( +from linaro_image_tools.media_create.hwpack import ( copy_file, install_hwpack, install_hwpacks, @@ -66,7 +66,7 @@ run_local_atexit_funcs, temporarily_overwrite_file_on_dir, ) -from linaro_media_create.partitions import ( +from linaro_image_tools.media_create.partitions import ( HEADS, SECTORS, calculate_partition_size_and_offset, @@ -81,23 +81,25 @@ get_uuid, _parse_blkid_output, ) -from linaro_media_create.populate_boot import populate_boot -from linaro_media_create.rootfs import ( +from linaro_image_tools.media_create.populate_boot import populate_boot +from linaro_image_tools.media_create.rootfs import ( create_flash_kernel_config, has_space_left_for_swap, move_contents, populate_rootfs, write_data_to_protected_file, ) -from linaro_media_create.unpack_binary_tarball import unpack_binary_tarball -from linaro_media_create.utils import ( +from linaro_image_tools.media_create.unpack_binary_tarball import ( + unpack_binary_tarball, + ) +from linaro_image_tools.media_create.utils import ( ensure_command, find_command, install_package_providing, UnableToFindPackageProvidingCommand, ) -from linaro_media_create.tests.fixtures import ( +from linaro_image_tools.media_create.tests.fixtures import ( CreateTempDirFixture, CreateTarballFixture, MockCmdRunnerPopenFixture, @@ -231,7 +233,7 @@ self.mock_all_boards_funcs() def mock_all_boards_funcs(self): - """Mock functions of linaro_media_create.boards with a call tracer.""" + """Mock functions of boards module with a call tracer.""" def mock_func_creator(name): return lambda *args, **kwargs: self.funcs_calls.append(name) @@ -240,7 +242,7 @@ attr = getattr(boards, name) if type(attr) == types.FunctionType: self.useFixture(MockSomethingFixture( - linaro_media_create.boards, name, + linaro_image_tools.media_create.boards, name, mock_func_creator(name))) def mock_set_appropriate_serial_tty(self, config): @@ -1430,12 +1432,13 @@ # run_local_atexit_funcs() runs the atexit handlers in LIFO order, but # even though the first function called (raising_func) will raise # an exception, the second one will still be called after it. - linaro_media_create.hwpack.local_atexit = [ + linaro_image_tools.media_create.hwpack.local_atexit = [ behaving_func, raising_func] # run_local_atexit_funcs() also propagates the last exception raised # by one of the functions. self.assertRaises( - TestException, linaro_media_create.hwpack.run_local_atexit_funcs) + TestException, + linaro_image_tools.media_create.hwpack.run_local_atexit_funcs) self.assertEquals( ['raising_func', 'behaving_func'], self.call_order) @@ -1452,10 +1455,10 @@ sys, 'stdout', open('/dev/null', 'w'))) self.useFixture(MockCmdRunnerPopenFixture()) self.useFixture(MockSomethingFixture( - linaro_media_create.hwpack, 'install_hwpack', + linaro_image_tools.media_create.hwpack, 'install_hwpack', mock_install_hwpack)) self.useFixture(MockSomethingFixture( - linaro_media_create.hwpack, 'run_local_atexit_funcs', + linaro_image_tools.media_create.hwpack, 'run_local_atexit_funcs', mock_run_local_atexit_functions)) force_yes = True @@ -1474,5 +1477,5 @@ # Ensure the list of cleanup functions gets cleared to make sure tests # don't interfere with one another. def clear_atexits(): - linaro_media_create.hwpack.local_atexit = [] + linaro_image_tools.media_create.hwpack.local_atexit = [] self.addCleanup(clear_atexits) === modified file 'linaro_image_tools/media_create/unpack_binary_tarball.py' --- linaro_media_create/unpack_binary_tarball.py 2011-01-28 19:50:48 +0000 +++ linaro_image_tools/media_create/unpack_binary_tarball.py 2011-03-23 22:25:10 +0000 @@ -17,7 +17,7 @@ # You should have received a copy of the GNU General Public License # along with Linaro Image Tools. If not, see . -from linaro_media_create import cmd_runner +from linaro_image_tools.media_create import cmd_runner def unpack_binary_tarball(tarball, unpack_dir, as_root=True): === modified file 'linaro_image_tools/media_create/utils.py' --- linaro_media_create/utils.py 2011-02-02 16:37:15 +0000 +++ linaro_image_tools/media_create/utils.py 2011-03-23 22:25:10 +0000 @@ -25,7 +25,7 @@ except ImportError: CommandNotFound = None -from linaro_media_create import cmd_runner +from linaro_image_tools.media_create import cmd_runner def install_package_providing(command): === renamed directory 'tests' => 'linaro_image_tools/tests' === modified file 'linaro_image_tools/tests/__init__.py' --- tests/__init__.py 2011-01-11 21:26:54 +0000 +++ linaro_image_tools/tests/__init__.py 2011-03-23 22:25:10 +0000 @@ -1,5 +1,7 @@ -from hwpack.tests import test_suite as hwpack_suite -from linaro_media_create.tests import test_suite as media_create_suite +from linaro_image_tools.hwpack.tests import test_suite as hwpack_suite +from linaro_image_tools.media_create.tests import ( + test_suite as media_create_suite, + ) def test_suite(): === modified file 'linaro_image_tools/tests/integration.txt' --- tests/integration.txt 2011-01-28 12:21:07 +0000 +++ linaro_image_tools/tests/integration.txt 2011-03-23 22:25:10 +0000 @@ -4,13 +4,13 @@ # This should print nothing to stdout but will unpack the given binary # tarball under the given directory. - >>> from linaro_media_create.unpack_binary_tarball import unpack_binary_tarball + >>> from linaro_image_tools.media_create.unpack_binary_tarball import unpack_binary_tarball >>> unpack_binary_tarball(, ) # Partition (for real!) /dev/sdb for a beagle board and return the devices # for the boot and root partitions. - >>> from linaro_media_create.partitions import Media, setup_partitions - >>> from linaro_media_create.boards import board_configs + >>> from linaro_image_tools.media_create.partitions import Media, setup_partitions + >>> from linaro_image_tools.media_create.boards import board_configs >>> setup_partitions( ... board_configs['beagle'], Media('/dev/sdb'), None, 'boot', ... 'root', 'ext3', True, True, True)