25 April 2008 г. 18:39:16 Stuart Henderson wrote:
> On 2008/04/25 18:35, Vadim Zhukov wrote:
> > 25 April 2008 ?. 18:09:28 Stuart Henderson wrote:
> > > On 2008/04/25 17:32, Vadim Zhukov wrote:
> > > > Patch below adds support of a BUILD_BROKES_WHEN_INSTALLED
> > > > variable. If this variable is set, port's building process will
> > > > be prohibited if some version of port is already installed.
> > > > Glib2 is a good example of a port needs such prohibition.
> > > >
> > > > No manpage changes yet, I want to get response for the idea
> > > > first.
> > >
> > > The build is not *always* broken when the libs are installed
> > > beforehand. Your change would make it a lot slower to get some
> > > things (e.g. small security fixes that don't change the library
> > > functions) tested.
> >
> > Well, make BUILD_BROKES_WHEN_INSTALLED=No will help in that case...
> > But, of course, this is ugly.
>
> But it changes from version to version. An update that doesn't
> change library functions is no problem...
Mmmmaybe slightly modified version at the end of letter, which ignores
same version with actual one will be good enough? BTW, fixed a bug
(FULLPKGNAME vs. PKGNAME).
> > > And imho bsd.port.mk shouldn't be providing
> > > crutches for GNU libtool bugs.
> >
> > But if GNU will not fix 'em, who more would? :)
>
> see in /usr/ports/infrastructure, but it's not finished yet.
Yep, I saw. :)
--- infrastructure/README 20 Oct 2006 09:45:21 -0000 1.6
+++ infrastructure/README 25 Apr 2008 20:42:53 -0000
@@ -39,7 +39,7 @@
db/user.list
List of users and groups created by the ports (or that are advised
- to be added.
+ to be added).
fetch/check-license
Legacy script used by Marco to check the LICENSE files.
--
Best wishes,
Vadim Zhukov
--- infrastructure/mk/bsd.port.mk 12 Apr 2008 13:04:21 -0000 1.926
+++ infrastructure/mk/bsd.port.mk 25 Apr 2008 20:43:31 -0000
@@ -80,7 +80,7 @@
_ALL_VARIABLES ?= HOMEPAGE DISTNAME BUILD_DEPENDS RUN_DEPENDS \
REGRESS_DEPENDS USE_GMAKE MODULES FLAVORS \
NO_BUILD NO_REGRESS SHARED_ONLY ONLY_FOR_ARCHS IS_INTERACTIVE \
- BROKEN MULTI_PACKAGES PSEUDO_FLAVORS \
+ BROKEN BUILD_BROKES_WHEN_INSTALLED MULTI_PACKAGES PSEUDO_FLAVORS \
REGRESS_IS_INTERACTIVE DISTFILES DIST_SUBDIR \
PERMIT_DISTFILES_CDROM PERMIT_DISTFILES_FTP \
CONFIGURE_STYLE USE_LIBTOOL SEPARATE_BUILD \
@@ -259,6 +259,7 @@
SHARED_ONLY ?= No
SEPARATE_BUILD ?= No
+BUILD_BROKES_WHEN_INSTALLED ?= No
DIST_SUBDIR ?=
@@ -2096,6 +2097,19 @@
${_BUILD_COOKIE}: ${_CONFIGURE_COOKIE}
.if ${NO_BUILD:L} == "no"
@${ECHO_MSG} "===> Building for ${FULLPKGNAME}${_MASTER}"
+.if ${BUILD_BROKES_WHEN_INSTALLED:L} == "yes"
+.for S in ${MULTI_PACKAGES}
+ if INSTALLED_VERSIONS="`${_PKG_QUERY} '${PKGNAME${S}:C/-[0-9].*/-*/}'`"
&& \
+ ! ${_PKG_QUERY} '${PKGNAME${S}}' -q; then \
+ echo ""; \
+ echo "*** Making this port brokes when another version is
installed."; \
+ echo "*** Please, uninstall corresponding package(-s) first:"; \
+ echo "*** $$INSTALLED_VERSIONS"; \
+ echo ""; \
+ false; \
+ else true; fi
+.endfor
+.endif
.if ${VMEM_WARNING:L} == "yes"
@echo ""; \
echo "*** WARNING: you may see an error such as"; \