Hi Bruno,

Bruno Haible <[email protected]> writes:

>> This patch removes some misleading text from the xsetenv module
>> description.
>
> I disagree with this patch. The module has a dependency to the 'unsetenv'
> module, which provides the unsetenv() function.
>
> Either you remove that dependency (and mention it in NEWS, and check
> whether the packages that use 'xsetenv', namely coreutils and gettext,
> need an update).
> Or you revert the description change.

Oops, sorry. I thought the description would be covered by the
dependency to unsetenv. I don't see a problem with the dependency, so I
reverted the change.

I guess the Description serves as an easy reference. And unless we want
to implement 'gnulib-tool --extract-recursive-descriptions', which seems
a bit excessive, we can keep text like this. :)

>> I noticed that xsetenv calls the following:
>> 
>>     error (EXIT_FAILURE, 0, _("memory exhausted"));
>> 
>> Is there a reason we don't just use xalloc_die here? Or can we change it
>> to simplify things a bit?
>
> Explanation: xsetenv.c predates the introduction of the xalloc-die module.
> Therefore yes, it's OK to change this code to use xalloc_die().

Thanks, that is what I thought but wanted to check.

Collin

>From a3e2064472d80c2e84ae7825ed29f79fe9d1db7c Mon Sep 17 00:00:00 2001
Message-ID: <a3e2064472d80c2e84ae7825ed29f79fe9d1db7c.1759091452.git.collin.fu...@gmail.com>
From: Collin Funk <[email protected]>
Date: Sun, 28 Sep 2025 13:30:15 -0700
Subject: [PATCH] xsetenv: Revert the previous change.

* modules/xsetenv (Description): Restore the description of unsetenv.
---
 ChangeLog       | 3 +++
 modules/xsetenv | 1 +
 2 files changed, 4 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index a7cd043396..b358ac895a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2025-09-28  Collin Funk  <[email protected]>
 
+	xsetenv: Revert the previous change.
+	* modules/xsetenv (Description): Restore the description of unsetenv.
+
 	xsetenv: Remove unnecessary text from module description.
 	* modules/xsetenv (Description): Remove mention of the unsetenv function
 	which is not provided by this module.
diff --git a/modules/xsetenv b/modules/xsetenv
index 161b0b68f1..3e3c8267b9 100644
--- a/modules/xsetenv
+++ b/modules/xsetenv
@@ -1,5 +1,6 @@
 Description:
 xsetenv() function: set an environment variable, with out-of-memory checking.
+unsetenv() function: remove an environment variable.
 
 Files:
 lib/xsetenv.h
-- 
2.51.0

Reply via email to