パスワードを忘れた? アカウント作成
41585 journal

Ab.の日記: FreeBSD: localports と package, ports システムとの同期

日記 by Ab.
以前の日記から Making a local branch of the ports tree を参考に INDEX-7, INDEX-7.db を生成したのですが、どうしても portversion や pkg_version が comparison failed とか origin not found とか言って言う事を聞いてくれません。
INDEX-7.db がちゃんと出来てないんじゃないかとか思って

db_dump-4.2 -p /usr/ports/INDEX-7.db | grep tkn-

で調べてみるとエントリはちゃんとあるみたいだし、さっぱり分からん!っていうか一体何処を参照して origin not found とか言ってやがるんじゃーい!と業を煮やして ktrace

ktrace portversion tkn-\*
kdump | less

したら出てきましたよこんなのが

42554 ruby18   CALL  read(0x4,0x800eda000,0x1000)
42554 ruby18   GIO   fd 4 read 473 bytes
       "@comment PKG_FORMAT_REVISION:1.1
        @name tkn-passwdgen-cgi-1.0
        @comment ORIGIN:www/tkn-passwdgen-cgi
        @cwd /usr/local
        @pkgdep perl-threaded-5.8.8_1
        @comment DEPORIGIN:lang/perl5.8
        @pkgdep p5-Digest-MD5-2.38
        @comment DEPORIGIN:security/p5-Digest-MD5
        @pkgdep p5-Crypt-GeneratePassword-0.03
        @comment DEPORIGIN:security/p5-Crypt-GeneratePassword
        @comment $FreeBSD$
        share/tkn-passwdgen-cgi/passwdgen.cgi
        @comment MD5:5b24926b799dfef0c0bf74009aafb743
        @dirrm share/tkn-passwdgen-cgi
       "

42554 ruby18   NAMI  "/usr/ports/www/tkn-passwdgen-cgi/Makefile"
42554 ruby18   RET   stat -1 errno 2 No such file or directory

むう ORIGIN:www/tkn-passwdgen-cgi というのがイカンようですな。
というわけで原因はここしかあるまい、と tkn-passwdgen-cgi/Makefile の CATEGORIES を local に変更。
そしてそのままだと ports がそんなカテゴリ無いよと怒るので /usr/ports/Makefile.local に

VALID_CATEGORIES += local

を追加、あと、 tkn-passwdgen-cgi/Makefile にも同じ行を追加。
そうやってから次の ports database 更新スクリプト(Making a local branch of the ports tree に載っているものをちょっと変更した版)を実行するとバッチリ上手く行きました。

#!/bin/sh

PORTSBASE=/usr/ports
#PORTSDIRNAME=`cd $PORTSBASE ; /bin/pwd` # for fixingup NFS/symlink pathnames
INDEX=${PORTSBASE}/INDEX-7
LOCAL=${PORTSBASE}/local
localpattern='^[^|]*|/usr/ports/local'
tmpfile=`/usr/bin/mktemp -t index` || exit 1

# make_index script complains a ton about using the INDEX file rather than the
# raw "describe" output so we just toss the errors.  this is probably a bad
# thing to do, but nobody will die because of it...
( cd $LOCAL; make describe | \
    sed -e "s#/root/localports#$LOCAL#g"; \
    grep -v ${localpattern} ${INDEX} ) | \
        perl ${PORTSBASE}/Tools/make_index 2> /dev/null | \
        grep ${localpattern} > $tmpfile

echo "Local ports appended to $INDEX file:"
cat $tmpfile

grep -v ${localpattern} ${INDEX} > ${INDEX}.tmp
cat $tmpfile >> ${INDEX}.tmp
mv ${INDEX}.tmp ${INDEX}
rm -f $tmpfile

大体こんな感じでいいのかなー。
さて次は何を ports にしよう。

この議論は賞味期限が切れたので、アーカイブ化されています。 新たにコメントを付けることはできません。
typodupeerror

アレゲは一日にしてならず -- アレゲ見習い

読み込み中...