Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 27 Apr 2013 03:48:01 +0800
From:      Sunpoet Po-Chuan Hsieh <sunpoet@FreeBSD.org>
To:        Baptiste Daroussin <bapt@freebsd.org>
Cc:        svn-ports-head@freebsd.org, svn-ports-all@freebsd.org, ports-committers <ports-committers@freebsd.org>
Subject:   Re: svn commit: r316281 - head/Mk
Message-ID:  <CAMHz58QUn76Q%2B=QJH7EWfOwHkAZywg4dzOMqvitf=V4w%2BNvDLw@mail.gmail.com>
In-Reply-To: <201304222213.r3MMDFec026886@svn.freebsd.org>
References:  <201304222213.r3MMDFec026886@svn.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Apr 23, 2013 at 6:13 AM, Baptiste Daroussin <bapt@freebsd.org>wrote:

> Author: bapt
> Date: Mon Apr 22 22:13:14 2013
> New Revision: 316281
> URL: http://svnweb.freebsd.org/changeset/ports/316281
>
> Log:
>   Remove old links while creating the new packages
>   Force creation of the symlink for pkgng to avoid failure if the link
> already exists
>
>   Submitted by: ohauer@
>
> Modified:
>   head/Mk/bsd.pkgng.mk
>
> Modified: head/Mk/bsd.pkgng.mk
>
> ==============================================================================
> --- head/Mk/bsd.pkgng.mk        Mon Apr 22 22:06:34 2013        (r316280)
> +++ head/Mk/bsd.pkgng.mk        Mon Apr 22 22:13:14 2013        (r316281)
> @@ -258,6 +258,9 @@ do-package: ${TMPPLIST}
>                         fi; \
>                 fi; \
>         fi;
> +       @for cat in ${CATEGORIES}; do \
> +               ${RM} -fv
> ${PACKAGES}/$$cat/${PKGNAMEPREFIX}${PORTNAME}*${PKG_SUFX} ; \
> +       done
>

Please revert/modify this change!
It has 2 problems.

First, it would remove other *correct* links.

% cd /usr/ports/x11/xorg
% make package
...
===>  Checking if x11/xorg already installed
===>   Registering installation for xorg-7.5.2
Installing xorg-7.5.2... done
===>  Building package for xorg-7.5.2
/usr/ports/packages/x11/xorg-7.5.2.txz
/usr/ports/packages/x11/xorg-cf-files-1.0.4.txz
/usr/ports/packages/x11/xorg-libraries-7.5.1.txz
/usr/ports/packages/x11/xorg-macros-1.16.1.txz
Creating package for xorg-7.5.2

Second, it's very strange to show some filenames/links without any
user-friendly messages. Users may not know that they are outdated links
removed by bsd.pkgng.mk.

e.g. while updating mail/postfix from 2.9.5 to 2.10, I got:
===>  Building package for postfix-2.10.0,1
/usr/ports/packages/mail/postfix-2.9.5,1.txz
/usr/ports/packages/ipv6/postfix-2.9.5,1.txz
Creating package for postfix-2.10.0,1

        @if ${PKG_CREATE} -o ${PKGREPOSITORY} ${PKGNAME}; then \
>                 if [ "${PKGORIGIN}" = "ports-mgmt/pkg" ]; then \
>                         if [ ! -d ${PKGLATESTREPOSITORY} ]; then \
> @@ -266,7 +269,7 @@ do-package: ${TMPPLIST}
>                                         exit 1; \
>                                 fi; \
>                         fi ; \
> -                       ${LN} -s
> ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE} ; \
> +                       ${LN} -sf
> ../${PKGREPOSITORYSUBDIR}/${PKGNAME}${PKG_SUFX} ${PKGLATESTFILE} ; \
>                 fi; \
>         else \
>                 cd ${.CURDIR} && eval ${MAKE} delete-package; \
>

-- 
  Sunpoet Po-Chuan Hsieh <sunpoet at sunpoet.net> <sunpoet at FreeBSD.org>
          4096R/CC57E36B 8AD8 68F2 7D2B 0A10 7E9B 8CC0 DC44 247E CC57 E36B
                            http://people.FreeBSD.org/~sunpoet/pgpkeys.txt



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAMHz58QUn76Q%2B=QJH7EWfOwHkAZywg4dzOMqvitf=V4w%2BNvDLw>