Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 03 Sep 2014 10:09:33 +0100
From:      Matthew Seaman <matthew@freebsd.org>
To:        freebsd-ports@freebsd.org
Subject:   Re: [BRAINSTORMING] simplifying maintainer's life
Message-ID:  <5406DACD.3080601@freebsd.org>
In-Reply-To: <20140903082538.GE63085@ivaldir.etoilebsd.net>
References:  <20140903082538.GE63085@ivaldir.etoilebsd.net>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--Cjk6hWHkK1feCjuXj8ibNRAKtxQTaDpac
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable

On 09/03/14 09:25, Baptiste Daroussin wrote:
> Hi all,
>=20
> On of the most borring thing IMHO in the plist maintainance is all the
> directories.
>=20
> I have been working on some evolutions I want to share and discuss befo=
re making
> them official.
>=20
> First you have to know that since pkg 1.3 @dirrm and @dirrmtry are equi=
valent.
>=20
> Evolutions:
> 1/ stop prepending directories in plist with @dir*: let pkg discover th=
e path
> correspond to a directory and handle it as such (easy)

Presumably if you need an empty directory, just add it to the plist.

> 2/ make pkg automatically remove directories under PREFIX without the n=
eed of
> adding them in plist, such as only empty directories and directories no=
t under
> PREFIX will have to be listed. Of course pkg will not try to remove dir=
ectories
> owned by another package.

There should be some concept of shared use directories, so eg.  if
package foo installs /usr/local/foobar/foo and then later package bar
installs /usr/local/foobar/bar. Should you then delete package foo,
package bar should inherit ownership of /usr/local/foobar/

For a real example of this consider eg. p5-DBD-Pg and p5-DBD-Sqlite.

Probably we can just say directory /usr/local/foobar belongs to both
packages foo and bar, and it only gets deleted when the last owner is
removed and if it is empty.

Needs more thought though.  What happens if two packages disagree about
ownership and permissions on a common directory?  I guess that should
just be treated like a conflicting file, and block installation of the
second package.

> To achieve the point 2 that will mean we will stop using the mtree insi=
de
> packages and create a "hier" package that will have the default hierarc=
hy and
> every package but pkg will depend on this hier package (except if PREFI=
X !=3D
> LOCALBASE)

And if you follow the shared ownership idea to its logical conclusion,
/usr/local/bin, /usr/local/man and /usr/local/share  end up with shared
ownership by almost every package you have installed.  Would you
actually need to have a hier package at all?  Although having one would
still be a good idea IMHO.

> 2 bonus of this approach:
> - it will speed up pkg operation by avoiding to have to extract the mtr=
ee for
>   each package installation
> - it will simplify a lot check-plist
>=20
> Any opinion here?

Having both mtree and the package manifest both providing very similar
functionality is somewhat redundant.

	Cheers,

	Matthew



--Cjk6hWHkK1feCjuXj8ibNRAKtxQTaDpac
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQJ8BAEBCgBmBQJUBtrVXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQxOUYxNTRFQ0JGMTEyRTUwNTQ0RTNGMzAw
MDUxM0YxMEUwQTlFNEU3AAoJEABRPxDgqeTnmVoP/07JVzg4OXReQWoahEMZcPwf
uI3uNtRr84hQplxKtMdSgdrXB0BfCazlb3gJPVwWRqoCqgNUqFngs6WIbikyQDH8
xZl0F6RqybC5/B2iwCo42voZaSJmzA8OyL9ziiHVt3o0bTfYxI6rV4ZsXsJ0oM8P
wKu7cJ33V0TL2kuvI/6QnNYy3psrQtXccWbB4ec8lOPZXyBY0476/oEah7RAg5M+
fBdME/kB0k910jshwFhouwri5ejDyKGOjHILv1lAiDM/KumMzU09AsvQZLfTtU1B
n+1CqyasMNZmaXMYaqI6lG1NKSrDF9BnH74hisqooUSJ9mKwYZo5mS0yGQTHfFJQ
KDFReHL5g1O4oX0y4tz9v8svUmj/UyS1hV28jhXebRQ8v0+VAF3tv0MUAtXMPenE
b13NgUiwRZ21UfYX/FotKmzXmwkbIpDAYfclty0WCPai2TAmqM8McrxcwuLo3bKK
R1VNtYk4rYAIxX/uYUjpfOoFy8NzdV1xuMVLHMxghVUdLytOPjX15DBpWgcrKdxl
q1Jmu2zOO0KlaQ2V5ws6KVMQf+3O9eBDCiSMJjQiqGG1XZVpN3HHLU35u8+/FumU
SdywGOLf8TuZhLq15UCAQMRVmJcYOQK9Q0fI/SoKlxeKi9924WdYnklhlCBPk3AH
ez7GN9fODX4JHgKVxgyL
=NKDQ
-----END PGP SIGNATURE-----

--Cjk6hWHkK1feCjuXj8ibNRAKtxQTaDpac--



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