Ticket #98 (closed defect: fixed)
GNU sed hardcoded in conf_rename
| Reported by: | blee | Owned by: | blee |
|---|---|---|---|
| Priority: | major | Milestone: | confman-1.9.3 |
| Component: | confman | Version: | 1.9.2b |
| Keywords: | Cc: |
Description
conf_rename uses:
${sed_cmd} -i -r
which is specific to GNU sed.
Change History
comment:1 Changed 2 years ago by blee
- Owner changed from confman-developers@… to blee
- Status changed from new to accepted
comment:3 Changed 2 years ago by ccowart
- Status changed from needsmerge to closed
- Resolution set to fixed
comment:4 Changed 2 years ago by ccowart
- Status changed from closed to reopened
- Resolution fixed deleted
14:57 <@ccowart> ${sed_cmd} -i""
14:57 <@ccowart> not so cross-platform
14:58 <@ccowart> bsd sed expects an argument to -i
14:58 <@ccowart> but a null argument like -i"" is eaten up by the shell
14:59 <@ccowart> and the argv looks like {"-i", "s/.../"}, not the desired
{"-i", "", "s/.../"}
14:59 <@ccowart> which would be acheived by -i ""
14:59 <@ccowart> but I think -i "" makes gsed unhappy
comment:6 Changed 2 years ago by ccowart
- Status changed from needsmerge to assigned
16:07 <@ccowart> sed_i_cmd="${sed_cmd} -i \"\""
16:07 <@ccowart> results in:
16:07 <@ccowart> ? ../database/usr/local/pgsql/data/pg_hba.conf""
comment:7 Changed 2 years ago by ccowart
- Status changed from assigned to needsmerge
(In [492]) Apparently doing sed_i_cmd in a variable has quoting issues and
doesn't perform as expected. I have factored the -i "" logic out
by defining a sed_i_cmd function differently on a per-OS basis.
I have also used the new sed_i_cmd idiom to solve the recipe updates on
renames issue.
