#49070 ldif2db.pl script shows wrong usage for -n as instance, instead of database
Closed: wontfix Opened by mreynolds.

Ticket was cloned from Red Hat Bugzilla (product Red Hat Enterprise Linux 6): Bug 1400997

Description of problem: Running ldif2db.pl --help shows -n instance, instead of
-n backend database name.
Version-Release number of selected component (if applicable):
389-ds-base-1.2.11.15-85
How reproducible: Consistently with RHEL-6.9
Steps to Reproduce:
1. Install 389-ds-base-1.2.11.15-85 build on RHEL-6.9
2. Create an instance and run ldif2db.pl script to check usage, with --help
3. ldif2db.pl displays wrong usage for -n option.
Actual results: It shows Instance name to be supplied for -n option. Where as
it is expected to be "backend database name".
Expected results: -n backend    - Backend database name.  Example: userRoot
Additional info: This is working with 389-ds-base-1.3.5.10 builds on RHEL7.3.

You have my ack, but I'm waring the reporter's hat... :)

This is the corresponding usage in the master branch. The reporter may complain they don't match. :) :)
print(STDERR " -n backend - Backend database name. Example: userRoot\n");

In the 1.2.11 branch, these "-n instance" are found. You may want to change db2index.pl and db2ldif.pl, as well...
template-db2index.pl.in: print(STDERR " -n instance [-t
template-db2index.pl.in: print(STDERR " : -n instance - instance to be indexed\n");
template-db2ldif.pl.in: print(STDERR " {-n instance} | {-s include} [{-x exclude}] \n");
template-db2ldif.pl.in: print(STDERR " : -n instance - instance to be exported\n");
template-ldif2db.pl.in: print(STDERR " -n instance | {-s include}
[{-x exclude}*] [-O] [-c]\n");
template-ldif2db.pl.in: print(STDERR " : -n instance - instance to be imported to\n");

Replying to [comment:2 nhosoi]:

You have my ack, but I'm waring the reporter's hat... :)

This is the corresponding usage in the master branch. The reporter may complain they don't match. :) :)
print(STDERR " -n backend - Backend database name. Example: userRoot\n");

In the 1.2.11 branch, these "-n instance" are found. You may want to change db2index.pl and db2ldif.pl, as well...
template-db2index.pl.in: print(STDERR " -n instance [-t
template-db2index.pl.in: print(STDERR " : -n instance - instance to be indexed\n");
template-db2ldif.pl.in: print(STDERR " {-n instance} | {-s include} [{-x exclude}] \n");
template-db2ldif.pl.in: print(STDERR " : -n instance - instance to be exported\n");
template-ldif2db.pl.in: print(STDERR " -n instance | {-s include}
[{-x exclude}*] [-O] [-c]\n");
template-ldif2db.pl.in: print(STDERR " : -n instance - instance to be imported to\n");

Good catch, I was going to check them actually, but I got distracted and forgot :(

New patch attached

Thanks, Mark!

934c560..7211e65 389-ds-base-1.2.11 -> 389-ds-base-1.2.11
commit 7211e65825ae59c79ad5c7cf2d00c18314e900fd
Author: Mark Reynolds mreynolds@redhat.com
Date: Mon Dec 19 10:30:40 2016 -0500

Metadata Update from @mreynolds:
- Issue set to the milestone: 1.2.11.33

389-ds-base is moving from Pagure to Github. This means that new issues and pull requests
will be accepted only in 389-ds-base's github repository.

This issue has been cloned to Github and is available here:
- https://github.com/389ds/389-ds-base/issues/2129

If you want to receive further updates on the issue, please navigate to the github issue
and click on subscribe button.

Thank you for understanding. We apologize for all inconvenience.

Metadata Update from @spichugi:
- Issue close_status updated to: wontfix (was: Fixed)

Metadata