mirror of
				https://github.com/xcat2/confluent.git
				synced 2025-10-31 03:12:31 +00:00 
			
		
		
		
	Fix suse imgutil build function
This commit is contained in:
		| @@ -414,8 +414,10 @@ class OsHandler(object): | ||||
|  | ||||
| class SuseHandler(OsHandler): | ||||
|     def __init__(self, name, version, arch, args): | ||||
|         if not version.startswith(b'15.'): | ||||
|             raise Exception('Unsupported Suse version {}'.format(version.decode('utf8'))) | ||||
|         if not isinstance(version, str): | ||||
|             version = version.decade('utf8') | ||||
|         if not version.startswith('15.'): | ||||
|             raise Exception('Unsupported Suse version {}'.format(version)) | ||||
|         self.oscategory = 'suse15' | ||||
|         super().__init__(name, version, arch, args) | ||||
|         self.zyppargs = [] | ||||
| @@ -443,11 +445,18 @@ class SuseHandler(OsHandler): | ||||
|             mkdirp(targzypp) | ||||
|             shutil.copytree( | ||||
|                 '/etc/zypp/repos.d/', os.path.join(targzypp, 'repos.d')) | ||||
|         idx = 1 | ||||
|         for source in self.sources: | ||||
|             subprocess.check_call(['zypper', '-R', self.targpath, 'ar', source]) | ||||
|             if not source: | ||||
|                 continue | ||||
|             subprocess.check_call(['zypper', '-R', self.targpath, 'ar', source, 'source-{}'.format(idx)]) | ||||
|             idx += 1 | ||||
|         for source in self.addrepos.split(','): | ||||
|             if not source: | ||||
|                 continue | ||||
|             source = 'file://' + source | ||||
|             subprocess.check_call(['zypper', '-R', self.targpath, 'ar', source]) | ||||
|             subprocess.check_call(['zypper', '-R', self.targpath, 'ar', source, 'source-{}'.format(idx)]) | ||||
|             idx += 1 | ||||
|         mydir = get_mydir(self.oscategory) | ||||
|         mkdirp(os.path.join(self.targpath, 'usr/lib/dracut/modules.d')) | ||||
|         mkdirp(os.path.join(self.targpath, 'etc/dracut.conf.d')) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user