Skip to content

Commit

Permalink
Fied GUI installs.
Browse files Browse the repository at this point in the history
Anaconda will want to perform fetch, but if we install via GUI,
a fetch has already been performed, and the addon should be able to
acknowledge the work that has been done on the GUI side.
  • Loading branch information
matejak committed Jun 7, 2021
1 parent 2be5070 commit 7abf7eb
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
6 changes: 5 additions & 1 deletion org_fedora_oscap/ks/oscap.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,11 @@ def setup(self, storage, ksdata, payload):
self.model.content_uri = self.content_url
thread_name = self.model.fetch_content(self.certificates, self._handle_error)

content = self.model.finish_content_fetch(thread_name, self.fingerprint, lambda msg: log.info(msg), self.raw_preinst_content_path, lambda content: content, self._handle_error)
content_dest = None
if self.content_type != "scap-security-guide":
content_dest = self.raw_preinst_content_path

content = self.model.finish_content_fetch(thread_name, self.fingerprint, lambda msg: log.info(msg), content_dest, lambda content: content, self._handle_error)

if not content:
return
Expand Down
8 changes: 6 additions & 2 deletions org_fedora_oscap/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,12 @@ def _finish_actual_fetch(self, wait_for, fingerprint, report_callback, dest_file

report_callback("Analyzing content.")
if not actually_fetched_content:
fpaths = [f"{common.SSG_DIR}/{common.SSG_CONTENT}"]
labelled_files = content_handling.identify_files(fpaths)
if not dest_filename: # using scap-security-guide
fpaths = [f"{common.SSG_DIR}/{common.SSG_CONTENT}"]
labelled_files = content_handling.identify_files(fpaths)
else: # Using downloaded XCCDF/OVAL/DS/tailoring
fpaths = glob(str(self.CONTENT_DOWNLOAD_LOCATION / "*.xml"))
labelled_files = content_handling.identify_files(fpaths)
else:
dest_filename = pathlib.Path(dest_filename)
# RPM is an archive at this phase
Expand Down

0 comments on commit 7abf7eb

Please sign in to comment.