Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Sep 2014 11:23:32 +0200
From:      Baptiste Daroussin <bapt@FreeBSD.org>
To:        Matthew Seaman <matthew@freebsd.org>
Cc:        freebsd-ports@freebsd.org
Subject:   Re: [BRAINSTORMING] simplifying maintainer's life
Message-ID:  <20140903092332.GF63085@ivaldir.etoilebsd.net>
In-Reply-To: <5406DACD.3080601@freebsd.org>
References:  <20140903082538.GE63085@ivaldir.etoilebsd.net> <5406DACD.3080601@freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--aZoGpuMECXJckB41
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Wed, Sep 03, 2014 at 10:09:33AM +0100, Matthew Seaman wrote:
> 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)
>=20
> Presumably if you need an empty directory, just add it to the plist.

Yup
>=20
> > 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.
>=20
> 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/
>=20
> For a real example of this consider eg. p5-DBD-Pg and p5-DBD-Sqlite.
>=20
> 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.

That is what I was trying to explain :)
>=20
> 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.

Right now we have no way to handle this in pkg(8) but that could be added l=
ater
>=20
> > 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)
>=20
> 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.

hier also defined /usr/local/etc/libmap.d or /usr/local/etc/rc.conf.d :)
>=20
> > 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?
>=20
> Having both mtree and the package manifest both providing very similar
> functionality is somewhat redundant.

The mtree will be not packaged at all anymore.

regards,
Bapt

--aZoGpuMECXJckB41
Content-Type: application/pgp-signature

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

iEYEARECAAYFAlQG3hQACgkQ8kTtMUmk6EzovQCdELYZ5B8JVe3jllql12/etjRE
XpcAn14WzXNtiys23+DntZRYmC67tdDS
=hmqj
-----END PGP SIGNATURE-----

--aZoGpuMECXJckB41--



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