Пример #1
0
 def _bootstrap_with_tarball(self, suite):
     self.check_target_exists()
     suite_path = path(self.defenv.get('installer', 'suite_storage'))
     arch = get_architecture()
     filename = '%s-%s.tar.gz' % (suite, arch)
     basefile = suite_path / filename
     taropts = '-xzf'
     # we normally expect a tar.gz
     # but we'll check for a plain tar also
     if not basefile.exists():
         filename = '%s-%s.tar' % (suite, arch)
         basefile = suite_path / filename
         taropts = '-xf'
     if not basefile.exists():
         # We don't really want to ruin an install
         # by not having a tarball, so we log a warning
         # and proceed with a debootstrap.
         msg = "base tarball not found, reverting to debootstrap"
         self.log.warn(msg)
         self._bootstrap_with_debootstrap(suite)
     else:
         #cmd = 'tar -C %s %s %s' % (self.target, taropts, basefile)
         cmd = ['tar', '-C', str(self.target), taropts, str(basefile)]
         # if cmd returns nonzero, runlog will raise an error
         runlog(cmd)
Пример #2
0
 def _determine_default_kernel(self):
     arch = get_architecture()
     # reset arch when arch is i386
     # using 686 by default.
     if arch == "i386":
         arch = "686"
     debian_kernel = "linux-image-2.6-%s" % arch
     return debian_kernel
Пример #3
0
 def _determine_default_kernel(self):
     arch = get_architecture()
     # reset arch when arch is i386
     # using 686 by default.
     if arch == 'i386':
         arch = '686'
     debian_kernel = 'linux-image-2.6-%s' % arch
     return debian_kernel
Пример #4
0
 def _determine_default_kernel(self):
     debian_kernel = 'linux-image-2.6-%s' % get_architecture()
     return debian_kernel
Пример #5
0
 def _make_repository(self, apt_id, uri=None):
     rsource = self._make_repository_source(apt_id, uri=uri)
     lsource = self._make_repository_source(apt_id, uri=self.local_mirror)
     arch = get_architecture()
     return RemoteRepos(rsource, lsource, arch=arch)
Пример #6
0
 def get_architecture(self):
     return get_architecture()
Пример #7
0
 def _make_repository(self, apt_id, uri=None):
     rsource = self._make_repository_source(apt_id, uri=uri)
     lsource = self._make_repository_source(apt_id, uri=self.local_mirror)
     arch = get_architecture()
     return RemoteRepos(rsource, lsource, arch=arch)
Пример #8
0
 def _determine_default_kernel(self):
     debian_kernel = 'linux-image-2.6-%s' % get_architecture()
     return debian_kernel