Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 45662 - qpkg exits with "Only one argument supported" error when only one argument is supplied. The variable arg in the qpkg script is being set in the environment from which it is called but qpkg expects it to have a null value.
Summary: qpkg exits with "Only one argument supported" error when only one argument is...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Portage Tools Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-24 18:34 UTC by Baz (RETIRED)
Modified: 2004-08-21 13:43 UTC (History)
0 users

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 Baz (RETIRED) gentoo-dev 2004-03-24 18:34:42 UTC
When calling qpkg from a perl script that is run from inside of a cron job, it is exiting with the error "Only one argument is supported".  This condition is triggered from a test on the value of $arg, [ -n ${arg} ], which is true if arg is not zero length.

Since arg is only set from within the script subsequent to this test being performed, it relies on the fact that the first time through the containing do-while loop that $arg is unset.

However, in specific environments (particularly when run from cron) $arg is being set in the enviroment before qpkg is executed.  This causes it to exit with the above mentioned error even when one valid argument is supplied.

Reproducible: Sometimes
Steps to Reproduce:
I've tried to reproduce the error in a simple script but have been unable to do so.  The error is only evident in a minimal environment, specifically when called from a perl script run from cron.  qpkg is being called from within backticks from the perl script.
Actual Results:  
Exits with "Only one argument supported"

Expected Results:  
Returned a version string of the installed package.  To prevent the error we
explicitly set the environment variable to null as we call qpkg.  By adding:

arg=""

to the start of the qpkg script, this will prevent the error from occurring.
Comment 1 Marius Mauch (RETIRED) gentoo-dev 2004-08-21 13:43:48 UTC
this tool is deprecated