Skip to content

Commit

Permalink
Enable AHS automatically if needed when restoring sources
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianTM committed Oct 18, 2024
1 parent d8358da commit fcad024
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
6 changes: 6 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
mx-repo-manager (24.10) mx; urgency=medium

* Enable AHS automatically if needed when restoring sources

-- Adrian <[email protected]> Fri, 18 Oct 2024 17:18:40 -0400

mx-repo-manager (24.7) mx; urgency=medium

* Fix replaceDebianRepos deb-src substitution
Expand Down
5 changes: 2 additions & 3 deletions mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -774,10 +774,9 @@ void MainWindow::pushRestoreSources_clicked()
.arg(tmpdir.path(), QString::number(mx_version));
shell->runAsRoot(cmd);

// For 64-bit OS check if user wants AHS repo
// For newer versions and 64-bit OS check if AHS was enabled
if (mx_version >= 19 && shell->getOut("uname -m", true) == "x86_64") {
if (QMessageBox::Yes
== QMessageBox::question(this, tr("Enabling AHS"), tr("Do you use AHS (Advanced Hardware Stack) repo?"))) {
if (shell->run("apt-get update --print-uris | grep -q _ahs_binary", true)) {
shell->runAsRoot(R"(sed -i '/^\s*#*\s*deb.*ahs\s*/s/^#*\s*//' /etc/apt/sources.list.d/mx.list)", true);
}
}
Expand Down

0 comments on commit fcad024

Please sign in to comment.