run-this-one changed command handling (requires a single command now) / shell arg issue
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
run-one (Ubuntu) |
Fix Released
|
High
|
Dustin Kirkland |
Bug Description
I have been using "run-this-one" to call a program with multiple arguments, and this stopped working after upgrading to Saucy.
It appears to be related to this change:
http://
Using $@ is different from using $CMD (after CMD="$@").
The first one handles positional arguments, but the second one is just a string (see e.g. http://
I think the flock line(s) should be reverted to
flock -xn "$FLAG" "$@"
again. (Note that there's no "-c" here, which requires a single argument).
TEST CASE:
% run-this-one ssh localhost "printf '%s\n' 'on line one' two 3"
onnlinenonentwon3n%
Quoting the command with run-this-one works around this:
% run-this-one "ssh localhost \"printf '%s\n' 'on line one' two 3\""
on line one
two
3
WORKS (flock directly, without -c):
% flock -xn /tmp/flag ssh localhost "printf '%s\n' 'on line one' two 3"
on line one
two
3
WORKS (flock directly, with -c):
% flock -xn /tmp/flag -c "ssh localhost \"printf '%s\n' 'on line one' two 3\""
on line one
two
3
If the current behavior should be kept (which I would not recommend), run-this-one should test if it is being passed a single argument only then.
Funnily it appears that this was meant to fix another bug reported by me (bug 1189950).
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: run-one 1.13-0ubuntu1 [modified: usr/bin/run-one]
ProcVersionSign
Uname: Linux 3.11.0-12-generic x86_64
ApportVersion: 2.12.5-0ubuntu1
Architecture: amd64
Date: Fri Oct 11 00:29:57 2013
InstallationDate: Installed on 2012-05-28 (500 days ago)
InstallationMedia: Ubuntu 12.04 LTS "Precise Pangolin" - Release amd64 (20120425)
MarkForUpload: True
PackageArchitec
SourcePackage: run-one
UpgradeStatus: Upgraded to saucy on 2013-10-08 (2 days ago)
Changed in run-one (Ubuntu): | |
status: | New → In Progress |
importance: | Undecided → High |
assignee: | nobody → Dustin Kirkland (kirkland) |
This bug was fixed in the package run-one - 1.14-0ubuntu1
---------------
run-one (1.14-0ubuntu1) saucy; urgency=low
* run-one: LP: #1238318
- fix regression, $@ handles positional arguments correctly,
whereas $CMD does not, drop -c
-- Dustin Kirkland <email address hidden> Tue, 10 Sep 2013 23:50:44 -0500