Subject: Re: about pkg_path
To: None <tech-pkg@NetBSD.org>
From: Alan Barrett <apb@cequrux.com>
List: tech-pkg
Date: 01/28/2006 10:13:00
On Sat, 28 Jan 2006, Rui-Xiang Guo wrote:
> -       pkgpath=`cd $startdir/$dir && ${PWD_CMD}`
> -       pkgpath="${pkgpath#${PKGSRCDIR}/}"
> +       pkgpath="${dir#../../}"
>         ${ECHO} "$pkgpath"
>  
> Because the $dir comes from ${_ALL_DEPENDS:C/^[^:]*://:O:u} which is always
> with prefix "../../".

Currently, the convention that all depends are of the form
../../category/package is only a convention (checked by pkglint, and
enforced by policy for official pkgsrc packages), but it's not really a
requirement (needed by the infrastructure itself).  Even the idea that
the hierarchy is exactly two levels deep is (AFAIK) only a convention.

People are free to have private categories that contain
private packages, and to use depends like ../mypackage
instead of ../../mycategory/mypackage.  I think that even
../../../category/subcategory/package works.  Your change would break
both these.

--apb (Alan Barrett)