[CFT] UNIQUENAME patches

Chris Rees crees at FreeBSD.org
Sat Jun 16 13:18:49 UTC 2012


On 13 June 2012 16:21, Matthew Seaman <matthew at freebsd.org> wrote:
>
> Dear all,
>
> After recent mention in this list that UNIQUENAME is not actually a
> unique name for each port and how obviously non-sensical that is, plus
> how it causes various problems with OPTIONS processing and how having a
> proper UNIQUENAME will facilitate the new sub-package functionality
> currently on the drawing board.
>
> So, here are some patches:
>
>   http://people.freebsd.org/~matthew/uniquename/uniquenames.diff
>
> There's also some data on the effect these have on OPTIONSFILE and
> UNIQUENAME values per port in
>
>   http://people.freebsd.org/~matthew/uniquename/before/*
>   http://people.freebsd.org/~matthew/uniquename/after/*
>
> Summarizing the changes:
>
>   * UNIQUENAME is now unique per port, and is primarily derived from
>     the port directory name.
>
>   * Where the port directory name isn't unique (eg. accessibility/orca
>     vs graphics/orca) there is a new UNIQUEPREFIX variable to
>     distinguish the affected ports.  This is set for all the LANG
>     specific category ports (arabic, chinese, french, german, hebrew,
>     hungarian, japanese, korean, polish, portuguese, russian,
>     ukranian, vietnamese) to the standard 2 character abbreviation for
>     that LANG.  Otherwise it is only set for the specific ports where
>     there is a directory name collision, usually based on the category
>     names.
>
>   * To avoid accidental non-uniqueness, UNIQUENAME should be treated
>     as a read-only variable by port maintainers.  UNIQUEPREFIX should
>     only be set where necessary to resolve conflicts.  All instances of
>     ports setting UNIQUENAME have been removed: in the majority of
>     cases, this turned out to be a no-op as the new UNIQUENAME turned
>     out to be the same as what most ports were previously overriding
>     it to.

That's great-- though rather than patching colliding-only ports, can't
we just add the category to it?

.for cat in ${CATEGORIES}
UNIQUEPREFIX?= ${cat}
.endfor

(copying the code from PKGCATEGORY; might be better off moving the
PKGCATEGORY code up higher and just using that).

Chris


More information about the freebsd-ports mailing list