Skip to content

Commit d41092f

Browse files
cheng-zrobhoes
authored andcommitted
CA-237415: remove update group from yum by conf file
Signed-off-by: Cheng Zhang <[email protected]>
1 parent 4543624 commit d41092f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/extensions/pool_update.apply

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,8 @@ def execute_apply(session, update_package, yum_conf_file):
6363
raise ApplyFailure(output)
6464

6565

66-
def remove_group(group):
67-
cmd = ['yum', 'group', 'mark', 'remove', group]
66+
def remove_group(group, yum_conf_file):
67+
cmd = ['yum', 'group', 'mark', 'remove', group, '-c', yum_conf_file]
6868
p = subprocess.Popen(cmd, shell=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT, close_fds=True)
6969
output, _ = p.communicate()
7070
xcp.logger.info('pool_update.apply %r returncode=%r output=%r', cmd, p.returncode, output)
@@ -135,7 +135,7 @@ if __name__ == '__main__':
135135
file.write("{0}".format(yum_conf))
136136

137137
execute_apply(session, '@update', yum_conf_file)
138-
remove_group('update')
138+
remove_group('update', yum_conf_file)
139139

140140
session.xenapi.pool_update.resync_host(host)
141141
print(success_message())

0 commit comments

Comments
 (0)