Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 5 additions & 8 deletions rust/agama-dbus-server/src/locale.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,16 @@ impl Locale {
.args([
"--root",
ROOT,
"--force",
"--locale",
self.locales.first().context("missing locale")?.as_str(),
"--keymap",
&self.keymap.to_string(),
"--timezone",
&self.timezone,
])
.status()
.context("Failed to execute systemd-firstboot")?;
Command::new("/usr/bin/systemd-firstboot")
.args(["--root", ROOT, "--keymap", &self.keymap.to_string()])
.status()
.context("Failed to execute systemd-firstboot")?;
Command::new("/usr/bin/systemd-firstboot")
.args(["--root", ROOT, "--timezone", self.timezone.as_str()])
.status()
.context("Failed to execute systemd-firstboot")?;

Ok(())
}
Expand Down
6 changes: 6 additions & 0 deletions rust/package/agama-cli.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Sun Dec 3 15:53:34 UTC 2023 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Use a single call to systemd-firstboot to write the localization
settings (gh#openSUSE/agama#903).

-------------------------------------------------------------------
Sat Dec 2 18:05:54 UTC 2023 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down
58 changes: 58 additions & 0 deletions service/lib/agama/dbus/y2dir/modules/InstFunctions.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
# Copyright (c) [2022-2023] SUSE LLC
#
# All Rights Reserved.
#
# This program is free software; you can redistribute it and/or modify it
# under the terms of version 2 of the GNU General Public License as published
# by the Free Software Foundation.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
# more details.
#
# You should have received a copy of the GNU General Public License along
# with this program; if not, contact SUSE LLC.
#
# To contact SUSE LLC about this file by physical or electronic mail, you may
# find current contact information at www.suse.com.

require "yast"

# :nodoc:
module Yast
# Replacement for the Yast::Package module
#
# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb
class InstFunctionsClass < Module
def main
puts "Loading mocked module #{__FILE__}"
end

# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb#L56
def ignored_features
[]
end

# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb#L83
def reset_ignored_features; end

# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb#L91
def feature_ignored?(_feature_name)
false
end

# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb#L107
def second_stage_required?
false
end

# @see https://github.com/yast/yast-installation/blob/279b7d108eab24082237cf5e3f02a31f58fef8da/src/modules/InstFunctions.rb#L137
def self_update_explicitly_enabled?
false
end
end

InstFunctions = InstFunctionsClass.new
InstFunctions.main
end
7 changes: 7 additions & 0 deletions service/package/rubygem-agama.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
-------------------------------------------------------------------
Sun Dec 3 15:45:22 UTC 2023 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

- Redefine the InstFunctions module to avoid calling code that
causes unwanted side effects, like resetting the timezone
(gh#openSUSE/agama#903).

-------------------------------------------------------------------
Sat Dec 2 18:05:37 UTC 2023 - Imobach Gonzalez Sosa <igonzalezsosa@suse.com>

Expand Down