From ffc5b5367c8b7faeefb056ad9b843eff5d5e17e2 Mon Sep 17 00:00:00 2001 From: Fathi Boudra Date: Mon, 19 Aug 2013 10:39:34 +0300 Subject: Revert Fedora support - regression --- linaro_image_tools/media_create/chroot_utils.py | 2 +- linaro_image_tools/media_create/rootfs.py | 19 ++++++++----------- .../media_create/tests/test_media_create.py | 3 +-- .../media_create/unpack_binary_tarball.py | 5 +---- 4 files changed, 11 insertions(+), 18 deletions(-) (limited to 'linaro_image_tools/media_create') diff --git a/linaro_image_tools/media_create/chroot_utils.py b/linaro_image_tools/media_create/chroot_utils.py index 6776c4c..83b0f6d 100644 --- a/linaro_image_tools/media_create/chroot_utils.py +++ b/linaro_image_tools/media_create/chroot_utils.py @@ -105,7 +105,7 @@ def install_hwpack(rootfs_dir, hwpack_file, extract_kpkgs, hwpack_force_yes): print "Installing (linaro-hwpack-install) %s in target rootfs." % ( hwpack_basename) - # Get information required by linaro-hwpack-install + # Get infromation required by linaro-hwpack-install with HardwarepackHandler([hwpack_file]) as hwpack: version, _ = hwpack.get_field("version") architecture, _ = hwpack.get_field("architecture") diff --git a/linaro_image_tools/media_create/rootfs.py b/linaro_image_tools/media_create/rootfs.py index 765cc99..73bc8eb 100644 --- a/linaro_image_tools/media_create/rootfs.py +++ b/linaro_image_tools/media_create/rootfs.py @@ -43,8 +43,7 @@ def rootfs_mount_options(rootfs_type): def populate_rootfs(content_dir, root_disk, partition, rootfs_type, rootfs_id, should_create_swap, swap_size, - mmc_device_id, partition_offset, os_release_id, - board_config=None): + mmc_device_id, partition_offset, board_config=None): """Populate the rootfs and make the necessary tweaks to make it usable. This consists of: @@ -87,14 +86,13 @@ def populate_rootfs(content_dir, root_disk, partition, rootfs_type, append_to_fstab(root_disk, fstab_additions) - if os_release_id == 'debian' or os_release_id == 'ubuntu': - print "\nCreating /etc/flash-kernel.conf\n" - create_flash_kernel_config( - root_disk, mmc_device_id, 1 + partition_offset) + print "\nCreating /etc/flash-kernel.conf\n" + create_flash_kernel_config( + root_disk, mmc_device_id, 1 + partition_offset) - if board_config is not None: - print "\nUpdating /etc/network/interfaces\n" - update_network_interfaces(root_disk, board_config) + if board_config is not None: + print "\nUpdating /etc/network/interfaces\n" + update_network_interfaces(root_disk, board_config) def update_network_interfaces(root_disk, board_config): @@ -138,8 +136,7 @@ def _list_files(directory): not be world-readable. """ p = cmd_runner.run( - ['find', directory, '-maxdepth', '1', '-mindepth', '1', - '!', '-name', 'lost+found'], + ['find', directory, '-maxdepth', '1', '-mindepth', '1'], stdout=subprocess.PIPE, as_root=True) stdout, _ = p.communicate() return stdout.split() diff --git a/linaro_image_tools/media_create/tests/test_media_create.py b/linaro_image_tools/media_create/tests/test_media_create.py index 565056c..269f986 100644 --- a/linaro_image_tools/media_create/tests/test_media_create.py +++ b/linaro_image_tools/media_create/tests/test_media_create.py @@ -3673,8 +3673,7 @@ class TestPopulateRootFS(TestCaseWithFixtures): populate_rootfs( contents_dir, root_disk, partition='/dev/rootfs', rootfs_type='ext3', rootfs_id='UUID=uuid', should_create_swap=True, - swap_size=100, mmc_device_id=0, partition_offset=0, - os_release_id='ubuntu', board_config=None) + swap_size=100, mmc_device_id=0, partition_offset=0) self.assertEqual( ['UUID=uuid / ext3 errors=remount-ro 0 1', diff --git a/linaro_image_tools/media_create/unpack_binary_tarball.py b/linaro_image_tools/media_create/unpack_binary_tarball.py index 8dcdef8..ba00261 100644 --- a/linaro_image_tools/media_create/unpack_binary_tarball.py +++ b/linaro_image_tools/media_create/unpack_binary_tarball.py @@ -29,11 +29,8 @@ def unpack_android_binary_tarball(tarball, unpack_dir, as_root=True): def unpack_binary_tarball(tarball, unpack_dir, as_root=True): - extract_opt = '-xf' - if tarball.endswith('.xz'): - extract_opt = '-Jxf' proc = cmd_runner.run( - ['tar', '--numeric-owner', '-C', unpack_dir, extract_opt, tarball], + ['tar', '--numeric-owner', '-C', unpack_dir, '-xf', tarball], as_root=as_root) proc.wait() return proc.returncode -- cgit v1.2.3