Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 219153 - app-admin/prelude-{lml,manager} - Init scripts using basename cause errors when evaluating service dependencies
Summary: app-admin/prelude-{lml,manager} - Init scripts using basename cause errors wh...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High trivial (vote)
Assignee: Gentoo Netmon project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-04-24 15:43 UTC by Jeroen Roovers (RETIRED)
Modified: 2009-04-12 21:24 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jeroen Roovers (RETIRED) gentoo-dev 2008-04-24 15:43:23 UTC
+++ This bug was initially created as a clone of Bug #218397 +++

Various ebuilds are using init scripts (presumably based from a standard template) which start off with "PROGNAME=`basename $1`".

When the system has to re-evaluate the dependencies (when starting/stopping a service after an init script has changed) then the following error appears (repeated once for each init script containing this code):
    basename: missing operand
    Try `basename --help' for more information.

Replacing `basename $1` with the name of the init script fixes the issue.  Alternately the init system should be changed to evaluate this (or other similar) code correctly when it comes across it during the service dependency evaluation.

This doesn't appear to actually affect the results of the evaluation, merely causes unwanted (and confusing) error messages.

Ebuilds I've found using this code are:
    app-admin/prelude-manager
    app-admin/prelude-lml
    net-ftp/frox

That's from a grep through the portage tree - just my luck I've got them all installed.

Reproducible: Always

Steps to Reproduce:
1. Install one of the affected ebuilds.
2. Run "touch /etc/init.d/numlock" to force a re-evaluation of the dependencies.
3. Run "/etc/init.d/numlock start" (or stop if already started).

Actual Results:  
 * Caching service dependencies ...
basename: missing operand
Try `basename --help' for more information.                               [ ok ]
 * Enabling numlock on ttys ...                                           [ ok ]

Expected Results:  
 * Caching service dependencies ...                                       [ ok ]
 * Enabling numlock on ttys ...                                           [ ok ]
Comment 1 Patrizio Bassi 2008-10-01 21:05:19 UTC
no news here?
Comment 2 Luca Lesinigo 2008-11-19 11:33:10 UTC
I can confirm the problem report and that the proposed solution work.
Tested on gentoo 2008.0 on hppa with app-admin/prelude-manager-0.9.9.1
Comment 3 Mark Loeser (RETIRED) gentoo-dev 2009-04-12 21:24:10 UTC
Fixed both.  Thanks.