<feed xmlns='http://www.w3.org/2005/Atom'>
<title>drakx/perl-install/c, branch 18.73</title>
<subtitle>Mageia Installer and base platform for many utilities</subtitle>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/'/>
<entry>
<title>Use POSIX::setlocale() instead of c::setlocale().</title>
<updated>2025-11-02T18:20:25+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2025-11-02T12:50:05+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=b518f9f16b0fc09802d238eef91de41ed54de282'/>
<id>b518f9f16b0fc09802d238eef91de41ed54de282</id>
<content type='text'>
Since Perl 5.28, Perl has used the thread-safe uselocale() functions
from the C standard library when setting the locale. Once a thread-safe
locale setting has been made, the Locale::gettext functions will use
those settings, not the global locale settings. So calling the drakx
c::setlocale() and c::init_setlocale() functions, which still use the
underlying setlocale() function from the C standard library normally
has no effect. However, prior to Perl 5.38, there was a bug in Perl
that could cause the main thread to revert to using the global locale
settings, and it it would seem this bug was being triggered by the
stage2 installer, meaning it still properly translated the UI after
the language selection step. Now we have a newer version of Perl, this
is no longer so, and the UI contiues to be in English after the user
has selected a different language (mga#34656).

The POSIX::setlocale() function affects the thread-safe locale, so can
be used to fix this bug.

This patch removes the c::setlocale() function to prevent reintroduction
of this bug, and moves the c::init_locale() function to the common module.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Since Perl 5.28, Perl has used the thread-safe uselocale() functions
from the C standard library when setting the locale. Once a thread-safe
locale setting has been made, the Locale::gettext functions will use
those settings, not the global locale settings. So calling the drakx
c::setlocale() and c::init_setlocale() functions, which still use the
underlying setlocale() function from the C standard library normally
has no effect. However, prior to Perl 5.38, there was a bug in Perl
that could cause the main thread to revert to using the global locale
settings, and it it would seem this bug was being triggered by the
stage2 installer, meaning it still properly translated the UI after
the language selection step. Now we have a newer version of Perl, this
is no longer so, and the UI contiues to be in English after the user
has selected a different language (mga#34656).

The POSIX::setlocale() function affects the thread-safe locale, so can
be used to fix this bug.

This patch removes the c::setlocale() function to prevent reintroduction
of this bug, and moves the c::init_locale() function to the common module.
</pre>
</div>
</content>
</entry>
<entry>
<title>When writing a GPT partition table, merge all actions into a single commit.</title>
<updated>2017-03-14T22:22:31+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2017-03-05T19:08:06+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=679ea1e5ab5c570b461cf3dacfe0fb61a04e9d79'/>
<id>679ea1e5ab5c570b461cf3dacfe0fb61a04e9d79</id>
<content type='text'>
This avoids unnecessary udev events, which in some cases were causing
udevd to trigger a kernel partition table reread, causing the kernel
to get out of sync with drakx.

In order to do so, the libparted bindings are enhanced so that we
manipulate a 'ped_disk' object:
- disk_open() returns such an object
- set_disk_type() is removed
- disk_commit() writes back the partition table and tell the kernel
  about it
  if we fails to write the partition table, we let
  partition_table::write() fire an exceptionc
  if we only have succeed in writing the partition table, we let
  partition_table::write() try harder (umounting partitions before
  trying againt to tell the kernel again)
- need_to_tell_kernel() is overrided

The last change is needed because we now tell the kernel about the new
partition layout in partition_table::gpt::write() when calling
disk_commit() while previously we were deferring that to
partition_table::write() which after having called the gpt's write()
calls tell_kernel() -&gt; c::tell_kernel_to_reread_partition_table()

So we must tell partition_table::write() that telling the kernel to
reread the partition_table is not needed if we already succeeded in
that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This avoids unnecessary udev events, which in some cases were causing
udevd to trigger a kernel partition table reread, causing the kernel
to get out of sync with drakx.

In order to do so, the libparted bindings are enhanced so that we
manipulate a 'ped_disk' object:
- disk_open() returns such an object
- set_disk_type() is removed
- disk_commit() writes back the partition table and tell the kernel
  about it
  if we fails to write the partition table, we let
  partition_table::write() fire an exceptionc
  if we only have succeed in writing the partition table, we let
  partition_table::write() try harder (umounting partitions before
  trying againt to tell the kernel again)
- need_to_tell_kernel() is overrided

The last change is needed because we now tell the kernel about the new
partition layout in partition_table::gpt::write() when calling
disk_commit() while previously we were deferring that to
partition_table::write() which after having called the gpt's write()
calls tell_kernel() -&gt; c::tell_kernel_to_reread_partition_table()

So we must tell partition_table::write() that telling the kernel to
reread the partition_table is not needed if we already succeeded in
that.
</pre>
</div>
</content>
</entry>
<entry>
<title>fix indentation</title>
<updated>2017-03-14T22:22:31+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2017-03-07T21:06:47+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=56c31ccc4deb378276afeff4780b59c16e77ce80'/>
<id>56c31ccc4deb378276afeff4780b59c16e77ce80</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>simplify using ped_disk_probe()</title>
<updated>2017-03-14T22:22:31+00:00</updated>
<author>
<name>Martin Whitaker</name>
<email>mageia@martin-whitaker.me.uk</email>
</author>
<published>2017-03-07T21:02:49+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=6fe03f55903194dac9a0519ddb0545986dafe5c4'/>
<id>6fe03f55903194dac9a0519ddb0545986dafe5c4</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>(get_partition_flag) kill it</title>
<updated>2017-03-06T21:14:05+00:00</updated>
<author>
<name>Thierry Vignaud</name>
<email>thierry.vignaud@gmail.com</email>
</author>
<published>2017-03-06T21:14:05+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=e8ebb6990c47b225e36ddd65c65a9182a6e2642d'/>
<id>e8ebb6990c47b225e36ddd65c65a9182a6e2642d</id>
<content type='text'>
it's unused since commit 1daabebda57976579465e5c281eaa14088e0e37f
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
it's unused since commit 1daabebda57976579465e5c281eaa14088e0e37f
</pre>
</div>
</content>
</entry>
<entry>
<title>bind hid_probe()</title>
<updated>2017-03-06T15:49:22+00:00</updated>
<author>
<name>Thierry Vignaud</name>
<email>thierry.vignaud@gmail.com</email>
</author>
<published>2017-02-25T07:13:08+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=4732690283a60cd39918b94d636c3d246f8f27d2'/>
<id>4732690283a60cd39918b94d636c3d246f8f27d2</id>
<content type='text'>
Needed for next commit
It could also be later used for drakx's lspci (like for ldetect's
lspcidrake)
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Needed for next commit
It could also be later used for drakx's lspci (like for ldetect's
lspcidrake)
</pre>
</div>
</content>
</entry>
<entry>
<title>regroup net includes like they were in the past</title>
<updated>2016-07-01T15:41:15+00:00</updated>
<author>
<name>Thierry Vignaud</name>
<email>thierry.vignaud@gmail.com</email>
</author>
<published>2016-07-01T15:31:30+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=bac52c60e891ed3e927b508729d04be720fd34d6'/>
<id>bac52c60e891ed3e927b508729d04be720fd34d6</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>remove now useless compilation helper</title>
<updated>2016-07-01T15:41:15+00:00</updated>
<author>
<name>Thierry Vignaud</name>
<email>thierry.vignaud@gmail.com</email>
</author>
<published>2016-07-01T15:27:08+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=ce60f4e48a2ccd29c5780d4affc0d69640cdbc44'/>
<id>ce60f4e48a2ccd29c5780d4affc0d69640cdbc44</id>
<content type='text'>
it was added in commit 58776de07de819cb962aa35e76c8379d96f03e6b
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
it was added in commit 58776de07de819cb962aa35e76c8379d96f03e6b
</pre>
</div>
</content>
</entry>
<entry>
<title>detect GRUB_BIOS partitions (mga#18656)</title>
<updated>2016-06-11T07:39:32+00:00</updated>
<author>
<name>Thierry Vignaud</name>
<email>thierry.vignaud@gmail.com</email>
</author>
<published>2016-06-08T20:48:20+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=83565d0739e5746ea02c210106a2d1f1d1477eda'/>
<id>83565d0739e5746ea02c210106a2d1f1d1477eda</id>
<content type='text'>
let's abuse -&gt;{pt_type} for tracking such partitions
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
let's abuse -&gt;{pt_type} for tracking such partitions
</pre>
</div>
</content>
</entry>
<entry>
<title>no need to tell kernel to reread part table</title>
<updated>2015-06-21T11:18:02+00:00</updated>
<author>
<name>Thierry Vignaud</name>
<email>thierry.vignaud@gmail.com</email>
</author>
<published>2015-06-12T13:39:48+00:00</published>
<link rel='alternate' type='text/html' href='https://gitweb.mageia.org/software/drakx/commit/?id=68823a8447aa3a77dcbd4087020252469269a02a'/>
<id>68823a8447aa3a77dcbd4087020252469269a02a</id>
<content type='text'>
...when adding or deleting a partition or setting its flag
rationale: telling kernel to reread partition table is done later in
partition_table::write() whereas partition_table::gpt::write() job is
just to update partition table on disk.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
...when adding or deleting a partition or setting its flag
rationale: telling kernel to reread partition table is done later in
partition_table::write() whereas partition_table::gpt::write() job is
just to update partition table on disk.
</pre>
</div>
</content>
</entry>
</feed>
