Subject: Re: xpkgwedge: problem in removing symbolic links
To: None <tech-pkg@NetBSD.org>
From: Kouichirou Hiratsuka <hira@po6.nsk.ne.jp>
List: tech-pkg
Date: 10/05/2005 22:46:06
Hello,
If there are no objections, I'll commit the patch.
At Fri, 26 Aug 2005 04:10:41 +0900,
I wrote:
>
> When I remove all of packages in my machine, the symbolic links
> which were created by xpkgwedge are left under /usr/pkg/bin.
>
[snip]
>
> In case of X11_TYPE=xorg or X11_TYPE=XFree86, should xpkgwedge
> depend on ${X11_TYPE}-clients?
>
> At least, -h is better to check for existence of the symbolic
> links, I think.
>
[snip]
>
> Index: Makefile
> ===================================================================
> RCS file: /cvsroot/pkgsrc/pkgtools/xpkgwedge/Makefile,v
> retrieving revision 1.58
> diff -u -r1.58 Makefile
> --- Makefile 14 Jun 2005 20:12:51 -0000 1.58
> +++ Makefile 25 Aug 2005 18:55:10 -0000
> @@ -51,6 +51,7 @@
>
> .if defined(X11_TYPE) && !empty(X11_TYPE:Mxorg) || \
> defined(X11_TYPE) && !empty(X11_TYPE:MXFree86)
> +DEPENDS+= ${X11_TYPE}-clients-*:../../x11/${X11_TYPE}-clients
> X11TYPEFLAGS?= -L${X11BASE}/lib ${COMPILER_RPATH_FLAG}${X11BASE}/lib
> SUBST_CLASSES= fix
> SUBST_STAGE.fix= post-patch
> Index: DEINSTALL
> ===================================================================
> RCS file: /cvsroot/pkgsrc/pkgtools/xpkgwedge/DEINSTALL,v
> retrieving revision 1.9
> diff -u -r1.9 DEINSTALL
> --- DEINSTALL 30 Apr 2004 19:44:21 -0000 1.9
> +++ DEINSTALL 25 Aug 2005 18:55:10 -0000
> @@ -12,7 +12,7 @@
> VIEW-DEINSTALL)
> ${ECHO_N} "Removing font program symlinks from view..."
> for prog in ${FONT_PROGS}; do
> - if [ -f ${PKG_PREFIX}/bin/$prog -a \
> + if [ -h ${PKG_PREFIX}/bin/$prog -a \
> ${PKG_PREFIX} != ${X11BASE} ]; then
> ${RM} -f ${PKG_PREFIX}/bin/$prog
> fi
> @@ -41,7 +41,7 @@
> DEINSTALL)
> ${ECHO_N} "Removing font program symlinks..."
> for prog in ${FONT_PROGS}; do
> - if [ -f ${PKG_PREFIX}/bin/$prog -a \
> + if [ -h ${PKG_PREFIX}/bin/$prog -a \
> ${PKG_PREFIX} != ${X11BASE} ]; then
> ${RM} -f ${PKG_PREFIX}/bin/$prog
> fi
>
best regards.
--
Kouichirou Hiratsuka
hira@po6.nsk.ne.jp