Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 5 Dec 2006 14:41:46 -0500
From:      Wesley Shields <wxs@atarininja.org>
To:        Doug Barton <dougb@FreeBSD.org>
Cc:        ports@freebsd.org, Scot Hetzel <swhetzel@gmail.com>
Subject:   Re: distfile belongs to?
Message-ID:  <20061205194146.GC52966@atarininja.org>
In-Reply-To: <4575C568.70905@FreeBSD.org>
References:  <17771.24717.95357.989644@jerusalem.litteratus.org> <456B70E9.4030408@FreeBSD.org> <20061204213106.GA42084@atarininja.org> <45749998.3070308@FreeBSD.org> <20061204232125.GA42307@atarininja.org> <790a9fff0612050838s66c655fapfde80d4038f64ca2@mail.gmail.com> <20061205172803.GA51892@atarininja.org> <4575C568.70905@FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Dec 05, 2006 at 11:15:52AM -0800, Doug Barton wrote:
> Wesley Shields wrote:
> > On Tue, Dec 05, 2006 at 10:38:42AM -0600, Scot Hetzel wrote:
> >> The bsd.port.mk patch could be changed to:
> >>
> >> .if (${OSVERSION} > 602100  && ${OSVERSION} < 700000) || ${OSVERSION} > 
> >> 700027
> >> PKGDISTFILE= "comment distfile"
> >> .else
> >> PKGDISTFILE="distfile"
> >> .endif
> >> :
> >> :
> >> -	${ECHO_CMD} "@distfle $${file}" >> ${TMPPLIST}; \
> >> +	${ECHO_CMD} "@${PKGDISTFILE} $${file}" >> ${TMPPLIST}; \
> >>
> >> This would allow the bsd.port.mk patch be added, without having to
> >> update the pkg_install tools on older systems.
> >>
> >> Then the ports tools (portupgrade, portmaster, ..) could be changed to
> >> look for either "@distfile" or "@comment distfile" in the +CONTENTS
> >> file.
> 
> @distfile is cleaner, but are you saying that we can add the comment
> even if pkg_create doesn't have special knowledge of the @distfile
> stuff? If so, isn't the sense of your test reversed? /me confused :)
> 
> Meanwhile, for the record you're right that adding code to portmaster
> to parse either format is not hard. It'll be much less work than what
> I've got there now. :)
> 
> Given that I'm about to release a new version of portmaster, I'd
> really like to get this change in now if I can. Can we reach a
> consensus (portmgr?) that what Scot proposed is how it will be done,
> even if we don't agree on the mechanics or timing yet?
> 
> > I was going to suggest wrapping the patch in an OSVERSION check for the
> > proper pkg_info update, however I think your approach is better. 
> 
> To me it seems odd that pkg_create has to know about every line in the
> tmp plist. (Having pkg_info know about it is nice too, but not
> necessary to make the mechanics of the change work.) Would it not be a
> better idea to update pkg_create so that it simply packages up what's
> there? Is there a benefit to pkg_create having special knowledge about
> the details like this?

All I know is that "make package" would error out when it ran into the
@distfile line when I was working on this.  This is why I had to make
the change to pkg_create.

> > I'm going to make it ignore the -F flag when there are no recorded
> > distfiles (and document this fact in the manpage).
> 
> Good change.

I'd like to finalize how it should look in +CONTENTS before I make this
change, but it will get done eventually.  :)

One way I was exploring is adding

@comment DISTFILE:$filename:$size:$md5:$sha256

into the generated plist.  This way we shouldn't have to change
pkg_create and only modify pkg_info and other tools.  I haven't tested
this fully but it was just a fairly easy and concise way that I believe
will work. By adding it to +CONTENTS using some type of @comment line we
can avoid changing pkg_create and make for easier adoption.  The only
changes that will need to be made will be to those programs which
process +CONTENTS directly, and even those modifications will be
minimal.

For now I'm going with the line above until suggested otherwise.  :)

I should have a patch ready in a day or two (time is a bit tight right
now).

-- WXS



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20061205194146.GC52966>