[linker] Remove dead code

There are big parts of code that can not be reached. Other parts expose
options that are not used anywhere. To keep things simple, all of that
is removed in this patch.

Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
Lubomír Sedlář 2016-05-05 15:34:11 +02:00
parent 444c3a21ca
commit bdf968ff3f
2 changed files with 9 additions and 128 deletions

View file

@ -9,7 +9,6 @@ try:
except ImportError:
import unittest
import os
import shutil
import stat
import sys
@ -339,16 +338,6 @@ class TestLinkerLink(TestLinkerBase):
self.assertEqual(os.readlink(self.dst_symlink2), "subdir")
self.assertEqual(os.readlink(self.dst_symlink3), "does-not-exist")
def test_scan_hardlink(self):
os.makedirs(self.dst_dir)
cache_dir = os.path.join(self.dst_dir, "cache")
os.makedirs(cache_dir)
cache_file = os.path.join(cache_dir, 'file1')
shutil.copy2(self.file1, cache_file)
self.linker.scan(self.dst_dir)
self.linker.link(self.src_dir, self.dst_dir, link_type="hardlink")
self.assertTrue(self.same_inode(self.dst_file1, cache_file))
def test_copy_preserve_hardlinks(self):
self.assertTrue(self.same_inode(self.file1, self.hardlink1))
self.linker.link(self.src_dir, self.dst_dir, link_type="copy")