#47374 flush.pl is not included in perl5
Closed: wontfix Opened by nhosoi.

$ dbgen.pl -o test.ldif -n 10
Legacy library flush.pl will be removed from the Perl core distribution in the next major release. Please install it from the CPAN distribution Perl4::CoreLibs. It is being used at /usr/bin/dbgen.pl, line 536.


[Workaround]
Download Perl4-CoreLibs-0.00#.tar.gz from here:
http://search.cpan.org/~zefram/Perl4-CoreLibs-0.003/lib/Perl4/CoreLibs.pm

Expand the tar ball.

Run dbgen with the path:
perl -I/path/to/expanded/Perl4-CoreLibs-0.003/lib /usr/bin/dbgen.pl -o -n

We should eliminate the requirement for flush.pl in dbgen.pl. None of of other tools appear to use it. The code for flush.pl itself recommends using IO::Handle as an alternative.

Ticket has been cloned to Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=970750

These lines are obsolete:
require "flush.pl";
require "getopts.pl";

{{{
http://cpansearch.perl.org/src/ZEFRAM/Perl4-CoreLibs-0.003/lib/flush.pl

This library is no longer being maintained, and is included for backward

compatibility with Perl 4 programs which may require it.

In particular, this should not be used as an example of modern Perl

programming techniques.

Suggested alternative: IO::Handle

;# Usage: &flush(FILEHANDLE)
;# flushes the named filehandle

;# Usage: &printflush(FILEHANDLE, "prompt: ")
;# prints arguments and flushes filehandle

sub flush {
local($old) = select(shift);
$| = 1;
print "";
$| = 0;
select($old);
}

sub printflush {
local($old) = select(shift);
$| = 1;
print @_;
$| = 0;
select($old);
}

1;

}}}

Fix description: replaced obsolete flush.pl and getopts.pl with
perl5 equivalents.

Reviewed by Rich (Thank you!!)

Pushed to master: commit 8bb10ab2c2a1283aac4540a023acb0361f56f003
Pushed to 389-ds-base-1.3.1: commit 91e3ba63d006a77a704811e532c5c05e1375e3d8

This caused a regression in ticket#612 - reopening

The fix changed opt_b to BeginNum - but did not change all occurrences of opt_b to BeginNum

In addition, the fix hard coded the template path to be /usr/share/dirsrv/data instead of using the macro @templatedir@.

additional - 0001-Ticket-47374-flush.pl-is-not-included-in-perl5.patch
0001-Ticket-47374-flush.pl-is-not-included-in-perl5.2.patch

0e7f59d..ea86856 389-ds-base-1.3.1 -> 389-ds-base-1.3.1
commit ea868566c49869b3fa0f6e2c7194b743d22f77fe
Author: Rich Megginson rmeggins@redhat.com
Date: Fri Jan 31 14:21:59 2014 -0700
01c0794..55df132 389-ds-base-1.3.2 -> 389-ds-base-1.3.2
commit 55df132065f109b8f548100461011c10b58843ea
Author: Rich Megginson rmeggins@redhat.com
Date: Fri Jan 31 14:21:59 2014 -0700
03533f2..f9ba01b master -> master
commit f9ba01b4b9ce3881cf08433b0c43db93ab207507
Author: Rich Megginson rmeggins@redhat.com
Date: Fri Jan 31 14:21:59 2014 -0700

Metadata Update from @nhosoi:
- Issue assigned to nhosoi
- Issue set to the milestone: 1.3.1.3

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/711

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