Skip to content

Commit

Permalink
storage: Never install packages on-demand in Anaconda mode
Browse files Browse the repository at this point in the history
  • Loading branch information
mvollmer committed Aug 28, 2024
1 parent 4bbac21 commit 12e61ba
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
4 changes: 4 additions & 0 deletions pkg/storaged/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -960,6 +960,10 @@ function init_model(callback) {
}

function enable_pk_features() {
if (client.in_anaconda_mode()) {
client.features.packagekit = false;
return Promise.resolve();
}
return PK.detect().then(function (available) { client.features.packagekit = available });
}

Expand Down
23 changes: 23 additions & 0 deletions test/verify/check-storage-anaconda
Original file line number Diff line number Diff line change
Expand Up @@ -638,6 +638,29 @@ AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=
self.dialog_wait_close()
b.wait_text(self.card_row_col("Storage", 1, 3), "Unformatted data")

@testlib.skipImage("No Stratis", "debian-*", "ubuntu-*")
def testNoOndemandPackages(self):
b = self.browser
m = self.machine

disk = self.add_loopback_disk(name="loop10")

m.execute("systemctl stop stratisd && dnf remove -y stratisd stratis")

anaconda_config = {
"mount_point_prefix": "/sysroot",
"available_devices": [disk],
}

self.login_and_go("/storage")
self.enterAnacondaMode(anaconda_config)

dropdown_toggle = self.dropdown_toggle(self.card_header("Storage"))
raid_action = self.dropdown_action(self.card_header("Storage"), "Create MDRAID device")
stratis_action = self.dropdown_action(self.card_header("Storage"), "Create Stratis pool")
b.click(dropdown_toggle)
b.wait_visible(raid_action)
b.wait_not_present(stratis_action)

if __name__ == '__main__':
testlib.test_main()

0 comments on commit 12e61ba

Please sign in to comment.