for option in [ "help", "source", "destination", "no-action" ]:
if not cnf.has_key("Copy-Installer::Options::%s" % (option)):
cnf["Copy-Installer::Options::%s" % (option)] = ""
- extra_arguments = apt_pkg.ParseCommandLine(cnf.Cnf, Arguments, sys.argv)
- Options = cnf.SubTree("Copy-Installer::Options")
+ extra_arguments = apt_pkg.parse_commandline(cnf.Cnf, Arguments, sys.argv)
+ Options = cnf.subtree("Copy-Installer::Options")
if Options["Help"]:
usage()
def check_dir(self, dir, message):
if not os.path.isdir(dir):
- raise IOError(message)
+ raise IOError("%s (%s)" % (message, dir))
def check_architecture(self, arch_dir):
architecture = re.sub('.*?/installer-(.*?)/.*', r'\1', arch_dir)
def do_copy(self):
for source, dest in self.trees_to_copy:
- shutil.copytree(source, dest)
+ shutil.copytree(source, dest, symlinks=True)
for source, dest in self.symlinks_to_create:
if os.path.lexists(dest):
os.unlink(dest)