FS#18950 - [pm-utils] remove_parameters() function is broken

Attached to Project: Arch Linux
Opened by Peter Wegas (ccc1) - Saturday, 03 April 2010, 18:11 GMT
Last edited by Ionut Biru (wonder) - Saturday, 03 April 2010, 18:51 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

the remove_parameters() function in /usr/lib/pm-utils/functions uses grep to remove parameters from the parameter list:

"if [ "$1" = "all" ]; then
echo '' > "$PARAMETERS.new"
else
echo '' >"$PARAMETERS.rm"
for p in "$@"; do
echo "$p" >> "$PARAMETERS.rm"
done
# let grep do the dirty work.
grep -vxFf "$PARAMETERS.rm" "$PARAMETERS" > "$PARAMETERS.new"
fi"

but since $PARAMETERS.rm has an empty line at the beginning, grep will just write $PARAMETERS to sdtout.
this behavior of grep is intented. see: http://lists.gnu.org/archive/html/bug-grep/2010-04/msg00037.html




This task depends upon

Closed by  Ionut Biru (wonder)
Saturday, 03 April 2010, 18:51 GMT
Reason for closing:  Not a bug
Comment by Peter Wegas (ccc1) - Saturday, 03 April 2010, 18:20 GMT
Reported to upstream.
Comment by Peter Wegas (ccc1) - Saturday, 03 April 2010, 18:45 GMT
can be closed. works as it should.
sorry for the spam.

Loading...