Namazu-devel-ja(旧)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
mknmz checks so strictly (namazu-bugs-ja#2643)
- From: ryo@xxxxxxxxxxxx
- Date: Wed, 21 Jan 2004 12:16:56 +0900 (JST)
- X-ml-name: namazu-devel-ja
- X-mail-count: 03575
--------_400DEDF2CC27010147D0_MULTIPART_MIXED_
Content-Type: text/plain; charset="ISO-2022-JP"
Content-Transfer-Encoding: 7bit
岡本と申します。
NMZ.result.normal.ja があって NMZ.result.normal が無い場合に
インデックスを作成しようとすると「古い形式の・・」という
エラーが出て不便ですので、添付のパッチのような処理を
ちょこっと入れて頂ければ幸いです。ご検討下さいませ。
なお、参照したファイルは次のものです。
# $Id: mknmz.in,v 1.85.4.27 2002/06/17 06:33:40 takesako Exp $
---- ここから
--- /usr/bin/mknmz 2003-01-25 14:30:00.000000000 +0900
+++ bin/mknmz_add 2004-01-21 02:01:38.000000000 +0900
@@ -930,7 +930,16 @@
# check present index whether it is old type of not
sub check_present_index () {
- if (-f $var::NMZ{'i'} && ! -f "$var::NMZ{'result'}.normal")
+
+ # check whether NMZ.result.normal or at least one of NMZ.result.normal.* file exists
+ my $check = 0;
+ for my $file( glob "$var::NMZ{'result'}.normal*" ){
+ next if not -f $file;
+ $check++;
+ last;
+ }
+
+ if (-f $var::NMZ{'i'} && not $check )
{
util::cdie(_("Present index is old type. it's unsupported.\n"));
}
---- ここまで
--
Okamoto RYO <ryo@xxxxxxxxxxxx>
--------_400DEDF2CC27010147D0_MULTIPART_MIXED_
Content-Type: application/octet-stream; name="mknmz_check_present_index.diff"
Content-Disposition: attachment;
filename="mknmz_check_present_index.diff"
Content-Transfer-Encoding: base64
LS0tIC91c3IvYmluL21rbm16CTIwMDMtMDEtMjUgMTQ6MzA6MDAuMDAwMDAwMDAwICswOTAwCisr
KyBiaW4vbWtubXpfYWRkCTIwMDQtMDEtMjEgMDI6MDE6MzguMDAwMDAwMDAwICswOTAwCkBAIC05
MzAsNyArOTMwLDE2IEBACiAKICMgY2hlY2sgcHJlc2VudCBpbmRleCB3aGV0aGVyIGl0IGlzIG9s
ZCB0eXBlIG9mIG5vdAogc3ViIGNoZWNrX3ByZXNlbnRfaW5kZXggKCkgewotICAgIGlmICgtZiAk
dmFyOjpOTVp7J2knfSAmJiAhIC1mICIkdmFyOjpOTVp7J3Jlc3VsdCd9Lm5vcm1hbCIpIAorCisg
ICAgIyBjaGVjayB3aGV0aGVyIE5NWi5yZXN1bHQubm9ybWFsIG9yIGF0IGxlYXN0IG9uZSBvZiBO
TVoucmVzdWx0Lm5vcm1hbC4qIGZpbGUgZXhpc3RzCisgICAgbXkgJGNoZWNrID0gMDsKKyAgICBm
b3IgbXkgJGZpbGUoIGdsb2IgIiR2YXI6Ok5NWnsncmVzdWx0J30ubm9ybWFsKiIgKXsKKwluZXh0
IGlmIG5vdCAtZiAkZmlsZTsKKwkkY2hlY2srKzsKKwlsYXN0OworICAgIH0KKworICAgIGlmICgt
ZiAkdmFyOjpOTVp7J2knfSAmJiBub3QgJGNoZWNrICkgCiAgICAgewogCXV0aWw6OmNkaWUoXygi
UHJlc2VudCBpbmRleCBpcyBvbGQgdHlwZS4gaXQncyB1bnN1cHBvcnRlZC5cbiIpKTsKICAgICB9
Cg==
--------_400DEDF2CC27010147D0_MULTIPART_MIXED_--