Skip to content

Commit 0f1f186

Browse files
cheng-zgaborigloi
authored andcommitted
CA-228606: For pool update, generate yum.conf with installonlypkgs
Signed-off-by: Cheng Zhang <[email protected]>
1 parent 63988de commit 0f1f186

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

ocaml/xapi/xapi_pool_update.ml

Lines changed: 14 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ let with_api_errors f x =
158158
reposdir=/dev/null
159159
gpgcheck=$signed
160160
repo_gpgcheck=$signed
161+
installonlypkgs=
161162
162163
[$label]
163164
name=$label
@@ -170,9 +171,19 @@ let create_yum_config ~__context ~self ~url =
170171
let signed = String.length key <> 0 in
171172
let signed_index = if signed then 1 else 0 in
172173
let name_label = Db.Pool_update.get_name_label ~__context ~self in
173-
(Printf.sprintf ("[main]\nkeepcache=0\nreposdir=/dev/null\ngpgcheck=%d\nrepo_gpgcheck=%d\n\n") signed_index signed_index)
174-
^(Printf.sprintf ("[%s]\nname=%s\nbaseurl=%s\n") name_label name_label url)
175-
^(if signed then Printf.sprintf ("gpgkey=file:///etc/pki/rpm-gpg/%s") key else "")
174+
String.concat "\n"
175+
[ "[main]"
176+
; "keepcache=0"
177+
; "reposdir=/dev/null"
178+
; Printf.sprintf "gpgcheck=%d" signed_index
179+
; Printf.sprintf "repo_gpgcheck=%d" signed_index
180+
; "installonlypkgs="
181+
; ""
182+
; Printf.sprintf "[%s]" name_label
183+
; Printf.sprintf "name=%s" name_label
184+
; Printf.sprintf "baseurl=%s" url
185+
; if signed then Printf.sprintf ("gpgkey=file:///etc/pki/rpm-gpg/%s") key else ""
186+
]
176187

177188
let attach_helper ~__context ~uuid ~vdi =
178189
let host = Helpers.get_localhost ~__context in

0 commit comments

Comments
 (0)