Mailinglist Archive: opensuse-bugs (4669 mails)

< Previous Next >
[Bug 623290] pm-utils: /usr/lib/pm-utils/functions: line 87: log: command not found
  • From: bugzilla_noreply@xxxxxxxxxx
  • Date: Wed, 1 Sep 2010 11:55:45 +0000
  • Message-id: <20100901115545.0FCF2CC7CE@xxxxxxxxxxxxxxxxxxxxxx>

https://bugzilla.novell.com/show_bug.cgi?id=623290

https://bugzilla.novell.com/show_bug.cgi?id=623290#c8


--- Comment #8 from Vladimir Botka <vbotka@xxxxxxxxxx> 2010-09-01 11:55:43 UTC
---
The problem is that 75modules uses PM_FUNCTIONS that points to functions. The
log() is declared in the pm-functions. But pm-functions includes functions.
IMHO the correct solution is to put the log() into the functions [2]. Could you
try and test package [1].


[1] home:vbotka:branches:openSUSE:11.3:Update:Test/pm-utils

[2]
diff --git a/pm/functions.in b/pm/functions.in
index 8388c65..b774b12 100644
--- a/pm/functions.in
+++ b/pm/functions.in
@@ -3,6 +3,16 @@

# Common functionality for the hooks.

+# Simple little logging function.
+# We do it this way because 'echo -n' is not posix.
+log()
+{
+ is_set "$LOGGING" || return 0;
+ local fmt='%s\n'
+ [ "$1" = "-n" ] && { fmt='%s'; shift; }
+ printf "$fmt" "$*"
+}
+
# If a variable is set to true, yes, 1, or is simply set with no value,
# return 0, otherwise return 1.
is_set()
diff --git a/pm/pm-functions.in b/pm/pm-functions.in
index dfbc59f..169029c 100644
--- a/pm/pm-functions.in
+++ b/pm/pm-functions.in
@@ -85,16 +85,6 @@ done

. "${PM_FUNCTIONS}"

-# Simple little logging function.
-# We do it this way because 'echo -n' is not posix.
-log()
-{
- is_set "$LOGGING" || return 0;
- local fmt='%s\n'
- [ "$1" = "-n" ] && { fmt='%s'; shift; }
- printf "$fmt" "$*"
-}
-
profiling() { [ "$PM_PROFILE" = "true" ]; }

if profiling; then

--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.

< Previous Next >