* Be even more explicit about partial ports trees being unsupported

for INDEX builds [1]

* Remove the parallel target from Makefile; this is heavily tied to
  the package build cluster and can be better done in the makeparallel
  script (commit to follow) [2]

* Extend the format of INDEX to separately list the
  EXTRACT/PATCH/FETCH_DEPENDS instead of lumping them all in together
  with BUILD_DEPENDS.  The three new fields are appended to the end of
  the record in that order. [2]

* Change BROKEN to IGNORE in BROKEN_WITH_MYSQL failure code [3]

* Support non-default PREFIX for perl 5.00503 [5]

* Use pkg_info -I instead of ls when searching for conflicts [6]

* Allow local customization of the port subdirectories by including
  ${.CURDIR}/Makefile.local in bsd.subdir.mk if it exists [7]

* Fix 'make search' when ${PORTSDIR} is a symlink to a directory name
  containing extended regexp metacharacters [8]

Submitted by:	linimon [1] [3], kris [2], lth [4], sem [5], eik [5] [6],
		Roman Neuhauser <neuhauser@chello.cz> [7]
PR:		68299 [1], 67705 [3], 67264 [4], 59696 [5], 66568 [6],
		68072 [7]
This commit is contained in:
Kris Kennaway 2004-07-14 08:18:16 +00:00
parent f8a38f5ab6
commit 3a7c8c1833
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=113603
4 changed files with 130 additions and 71 deletions

View File

@ -99,11 +99,17 @@ ${.CURDIR}/${INDEXFILE}:
echo "********************************************************************"; \
echo "Before reporting this error, verify that you are running a supported"; \
echo "version of FreeBSD (see http://www.FreeBSD.org/ports/) and that you"; \
echo "have a complete and up-to-date ports collection (INDEX builds are"; \
echo "not supported with partial or out-of-date ports collections). If"; \
echo "so, then report the failure to ports@FreeBSD.org together with"; \
echo "relevant details of your ports configuration (including FreeBSD"; \
echo "version, environment and /etc/make.conf settings)."; \
echo "have a complete and up-to-date ports collection. (INDEX builds are"; \
echo "not supported with partial or out-of-date ports collections -- in"; \
echo "particular, if you are using cvsup, you must cvsup the \"ports-all\""; \
echo "collection, and have no \"refuse\" files.) If that is the case, then"; \
echo "report the failure to ports@FreeBSD.org together with relevant"; \
echo "details of your ports configuration (including FreeBSD version,"; \
echo "your architecture, your environment, and your /etc/make.conf"; \
echo "settings, especially compiler flags and WITH/WITHOUT settings)."; \
echo; \
echo "Note: the latest pre-generated version of INDEX may be fetched"; \
echo "automatically with \"make fetchindex\"."; \
echo "********************************************************************"; \
echo; \
fi; \
@ -122,18 +128,7 @@ ${.CURDIR}/${INDEXFILE}:
echo " Done."
print-index: ${.CURDIR}/${INDEXFILE}
@awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9); }' < ${.CURDIR}/${INDEXFILE}
parallel: ${.CURDIR}/${INDEXFILE}
.if !defined(branch)
@echo "The parallel target requires a branch parameter,"
@echo "e.g.: \"make parallel branch=X\""
@false
.endif
.for dir in ${SUBDIR}
@[ -r ${dir}/Makefile ] && echo "all: ${dir}-all" || true
.endfor
@awk -F '|' '{me=$$1; here=$$2; bdep=$$8; rdep=$$9; split(here, tmp, "/"); if (bdep != "") { gsub("$$", ".tgz", bdep); gsub(" ", ".tgz ", bdep); } if (rdep != "") { gsub("$$", ".tgz", rdep); gsub(" ", ".tgz ", rdep); } print tmp[4] "-all: " me ".tgz"; print me ": " me ".tgz"; print me ".tgz: " bdep " " rdep; printf("\t@/var/portbuild/scripts/pdispatch ${branch} /var/portbuild/scripts/portbuild %s.tgz %s", me, here); if (bdep != "") printf(" %s", bdep); if (rdep != "") printf(" %s", rdep); printf("\n")}' < ${.CURDIR}/${INDEXFILE}
@awk -F\| '{ printf("Port:\t%s\nPath:\t%s\nInfo:\t%s\nMaint:\t%s\nIndex:\t%s\nB-deps:\t%s\nR-deps:\t%s\nE-deps:\t%s\nP-deps:\t%s\nF-deps:\t%s\nWWW:\t%s\n\n", $$1, $$2, $$4, $$6, $$7, $$8, $$9, $$11, $$12, $$13, $$10); }' < ${.CURDIR}/${INDEXFILE}
CVS?= cvs
SUP?= cvsup

View File

@ -1493,7 +1493,7 @@ MYSQL_VER= ${DEFAULT_MYSQL_VER}
.if defined(BROKEN_WITH_MYSQL)
. for VER in ${BROKEN_WITH_MYSQL}
. if (${MYSQL_VER} == "${VER}")
BROKEN= "Doesn't work with MySQL version : ${MYSQL_VER} (Doesn't support MySQL ${BROKEN_WITH_MYSQL})"
IGNORE= "Doesn't work with MySQL version : ${MYSQL_VER} (Doesn't support MySQL ${BROKEN_WITH_MYSQL})"
. endif
. endfor
.endif # BROKEN_WITH_MYSQL
@ -3054,6 +3054,10 @@ do-configure:
.if !defined(PERL_MODBUILD)
@cd ${CONFIGURE_WRKSRC} && \
${PERL5} -pi -e 's/ doc_(perl|site|\$$\(INSTALLDIRS\))_install$$//' Makefile
.if ${PERL_LEVEL} <= 500503
@cd ${CONFIGURE_WRKSRC} && \
${PERL5} -pi -e 's/^(INSTALLSITELIB|INSTALLSITEARCH|SITELIBEXP|SITEARCHEXP|INSTALLMAN1DIR|INSTALLMAN3DIR) = \/usr\/local/$$1 = \$$(PREFIX)/' Makefile
.endif
.endif
.endif
.if defined(USE_IMAKE)
@ -3081,34 +3085,25 @@ do-build:
.if !target(check-conflicts)
check-conflicts:
.if defined(CONFLICTS) && !defined(DISABLE_CONFLICTS)
@${RM} -f ${WRKDIR}/.CONFLICTS
.for conflict in ${CONFLICTS}
@found="`${LS} -d ${PKG_DBDIR}/${conflict} 2>/dev/null || ${TRUE}`"; \
if [ X"$$found" != X"" ]; then \
${ECHO_CMD} "$$found" >> ${WRKDIR}/.CONFLICTS; \
fi
.endfor
@if [ -s ${WRKDIR}/.CONFLICTS ]; then \
found=`${CAT} ${WRKDIR}/.CONFLICTS | ${SED} -e s'|${PKG_DBDIR}/||g' | ${TR} '\012' ' '`; \
conflicting=0; \
for entry in $${found}; do \
prfx=`${PKG_INFO} -q -p $${entry} 2> /dev/null | ${SED} -ne '1s|^@cwd ||p'`; \
if [ "x${PREFIX}" = "x$${prfx}" ]; then \
conflicting=1;\
conflicts_with="$${conflicts_with} $${entry}";\
fi;\
@found=`${PKG_INFO} -I ${CONFLICTS:C/.+/'&'/} 2>/dev/null | ${AWK} '{print $$1}'`; \
conflicts_with=; \
for entry in $${found}; do \
prfx=`${PKG_INFO} -q -p "$${entry}" 2> /dev/null | ${SED} -ne '1s/^@cwd //p'`; \
orgn=`${PKG_INFO} -q -o "$${entry}" 2> /dev/null`; \
if [ "/${PREFIX}" = "/$${prfx}" -a "/${PKGORIGIN}" != "/$${orgn}" ]; then \
conflicts_with="$${conflicts_with} $${entry}"; \
fi; \
done; \
if [ -n "$${conflicts_with}" ]; then \
${ECHO_MSG}; \
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
for entry in $${conflicts_with}; do \
${ECHO_MSG} " $${entry}"; \
done; \
${ECHO_MSG}; \
if [ "x$${conflicting}" = "x1" ] ; then \
${ECHO_MSG} "===> ${PKGNAME} conflicts with installed package(s): "; \
for entry in $${conflicts_with} ; do \
${ECHO_MSG} " $${entry}";\
done;\
${ECHO_MSG} " They install files into the same place."; \
${ECHO_MSG} " Please remove them first with pkg_delete(1)."; \
${RM} -f ${WRKDIR}/.CONFLICTS; \
exit 1; \
fi ;\
${ECHO_MSG} " They install files into the same place."; \
${ECHO_MSG} " Please remove them first with pkg_delete(1)."; \
exit 1; \
fi
.endif # CONFLICTS
.endif
@ -4386,13 +4381,14 @@ describe:
print q{|/dev/null}; \
} \
print q{|${MAINTAINER}|${CATEGORIES}|}; \
@bdirs = map((split /:/)[1], split(q{ }, q{${EXTRACT_DEPENDS} ${PATCH_DEPENDS} ${FETCH_DEPENDS} ${BUILD_DEPENDS}})); \
@edirs = map((split /:/)[1], split(q{ }, q{${EXTRACT_DEPENDS}})); \
@pdirs = map((split /:/)[1], split(q{ }, q{${PATCH_DEPENDS}})); \
@fdirs = map((split /:/)[1], split(q{ }, q{${FETCH_DEPENDS}})); \
@bdirs = map((split /:/)[1], split(q{ }, q{${BUILD_DEPENDS}})); \
@rdirs = map((split /:/)[1], split(q{ }, q{${RUN_DEPENDS}})); \
@mdirs = ( \
map((split /:/)[0], split(q{ }, q{${DEPENDS}})), \
map((split /:/)[1], split(q{ }, q{${LIB_DEPENDS}})) \
); \
for my $$i (\@bdirs, \@rdirs, \@mdirs) { \
@ddirs = map((split /:/)[0], split(q{ }, q{${DEPENDS}})); \
@ldirs = map((split /:/)[1], split(q{ }, q{${LIB_DEPENDS}})); \
for my $$i (\@edirs, \@pdirs, \@fdirs, \@bdirs, \@rdirs, \@ddirs, \@ldirs) { \
my @dirs = @$$i; \
@$$i = (); \
for (@dirs) { \
@ -4404,14 +4400,26 @@ describe:
} \
} \
} \
for (@bdirs, @mdirs) { \
$$x{$$_} = 1; \
for (@edirs, @ddirs) { \
$$xe{$$_} = 1; \
} \
print join(q{ }, sort keys %x), q{|}; \
for (@rdirs, @mdirs) { \
$$y{$$_} = 1; \
print join(q{ }, sort keys %xe), q{|}; \
for (@pdirs, @ddirs) { \
$$xp{$$_} = 1; \
} \
print join(q{ }, sort keys %y), q{|}; \
print join(q{ }, sort keys %xp), q{|}; \
for (@fdirs, @ddirs) { \
$$xf{$$_} = 1; \
} \
print join(q{ }, sort keys %xf), q{|}; \
for (@bdirs, @ddirs, @ldirs) { \
$$xb{$$_} = 1; \
} \
print join(q{ }, sort keys %xb), q{|}; \
for (@rdirs, @ddirs, @ldirs) { \
$$xr{$$_} = 1; \
} \
print join(q{ }, sort keys %xr), q{|}; \
if (open(DESCR, q{${DESCR}})) { \
while (<DESCR>) { \
if (/^WWW:\s+(\S+)/) { \

View File

@ -82,6 +82,11 @@ OPSYS!= /usr/bin/uname -s
ECHO_MSG?= echo
# local customization of the ports tree
.if exists(${.CURDIR}/Makefile.local)
.include "${.CURDIR}/Makefile.local"
.endif
TARGETS+= all
TARGETS+= build
TARGETS+= checksum
@ -349,7 +354,9 @@ search: ${PORTSDIR}/${INDEXFILE}
-v xkeylim="$${xkeylim:-${PORTSEARCH_XKEYLIM}}"\
-v display="$${display:-${PORTSEARCH_DISPLAY_FIELDS}}" \
'BEGIN { \
sub(top, "${PORTSDIR}", there); \
if (substr(there, 1, length(top)) == top) \
there = "${PORTSDIR}" substr(there, 1 + length(top)); \
therelen = length(there); \
IGNORECASE=icase; \
keylen = length(key); keylim = keylim && keylen; \
if (!keylim && keylen) \
@ -377,7 +384,7 @@ search: ${PORTSDIR}/${INDEXFILE}
} \
} \
{ \
if ($$2 !~ there) \
if (substr($$2, 1, therelen) != there) \
next; \
for (i in parms) \
if ($$i !~ parms[i]) \

View File

@ -2,12 +2,10 @@
#
# $FreeBSD$
#
# Written to speed-up INDEX file generation. The new scheme
# basically visits each port once and writes out each port's
# build-depends and run-depends as a list of directories. This
# INDEX builds visit each port once and write out each port's
# *-depends as a list of directories, using 'make describe'. This
# script goes back in and maps the directories back to pkgnames,
# fixes up the build-depends and run-depends list, and writes
# out the new INDEX file.
# fixes up the *-depends list, and writes out the new INDEX file.
require 5.002;
@ -38,14 +36,40 @@ sub recurse {
my $pkg = shift(@_);
return if $pkg->{checked};
# build-depends = build-depends + recursive list of run-depends
# for each build-depends
# extract-depends = extract-depends + recursive list of run-depends
# for each extract-depends
my @deps = ();
foreach $name (@{$pkg->{bdep}}) {
foreach $name (@{$pkg->{edep}}) {
recurse($index{$name});
push(@deps, @{$index{$name}->{rdep}});
}
$pkg->{edep} = uniqify(@{$pkg->{edep}}, @deps);
# same as above except for patch-depends this time
@deps = ();
foreach $name (@{$pkg->{pdep}}) {
recurse($index{$name});
push(@deps, @{$index{$name}->{rdep}});
}
$pkg->{pdep} = uniqify(@{$pkg->{pdep}}, @deps);
# same as above except for fetch-depends this time
@deps = ();
foreach $name (@{$pkg->{fdep}}) {
recurse($index{$name});
push(@deps, @{$index{$name}->{rdep}});
}
$pkg->{fdep} = uniqify(@{$pkg->{fdep}}, @deps);
$pkg->{checked} = 1;
# same as above except for build-depends this time
@deps = ();
foreach $name (@{$pkg->{bdep}}) {
recurse($index{$name});
push(@deps, @{$index{$name}->{rdep}});
}
$pkg->{bdep} = uniqify(@{$pkg->{bdep}}, @deps);
$pkg->{checked} = 1;
# same as above except for run-depends this time
@deps = ();
@ -55,6 +79,7 @@ sub recurse {
}
$pkg->{rdep} = uniqify(@{$pkg->{rdep}}, @deps);
$pkg->{checked} = 1;
}
# Given one or more lists as arguments return the set
@ -85,9 +110,12 @@ while (<>) {
# Create a hash table of the infomation we need about this port.
my $pkg = {
'bdep' => [split(/ /, $f[7])],
'rdep' => [split(/ /, $f[8])],
'rest' => join('|', splice(@f, 9)),
'edep' => [split(/ /, $f[7])],
'pdep' => [split(/ /, $f[8])],
'fdep' => [split(/ /, $f[9])],
'bdep' => [split(/ /, $f[10])],
'rdep' => [split(/ /, $f[11])],
'rest' => join('|', splice(@f, 12)),
'text' => join('|', splice(@f, 0, 7))
};
$index{$name} = $pkg;
@ -99,12 +127,27 @@ while (<>) {
# For each port perform the mapping between directory and pkgnames.
foreach $name (keys %index) {
my $pkg = $index{$name};
# first the build dependencies
if (@{$pkg->{edep}}) {
my @edep = map { by_path($_, $name) } @{$pkg->{edep}};
$pkg->{edep} = \@edep;
}
#
if (@{$pkg->{pdep}}) {
my @pdep = map { by_path($_, $name) } @{$pkg->{pdep}};
$pkg->{pdep} = \@pdep;
}
# first the build dependencies
if (@{$pkg->{fdep}}) {
my @fdep = map { by_path($_, $name) } @{$pkg->{fdep}};
$pkg->{fdep} = \@fdep;
}
# first the build dependencies
if (@{$pkg->{bdep}}) {
my @bdep = map { by_path($_, $name) } @{$pkg->{bdep}};
$pkg->{bdep} = \@bdep;
}
# and now the run dependencies
# first the build dependencies
if (@{$pkg->{rdep}}) {
my @rdep = map { by_path($_, $name) } @{$pkg->{rdep}};
$pkg->{rdep} = \@rdep;
@ -123,7 +166,13 @@ foreach $name (@names) {
print join(' ', sort(@{$pkg->{bdep}})) if @{$pkg->{bdep}};
print "|";
print join(' ', sort(@{$pkg->{rdep}})) if @{$pkg->{rdep}};
print "|$pkg->{rest}\n";
print "|$pkg->{rest}|";
print join(' ', sort(@{$pkg->{edep}})) if @{$pkg->{edep}};
print "|";
print join(' ', sort(@{$pkg->{pdep}})) if @{$pkg->{pdep}};
print "|";
print join(' ', sort(@{$pkg->{fdep}})) if @{$pkg->{fdep}};
print "\n";
++$pkg->{'PRINTED'};
}
}