Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 04 Dec 2012 21:32:19 +0000
From:      Matthew Seaman <m.seaman@infracaninophile.co.uk>
To:        Walter Hurry <walterhurry@gmail.com>
Cc:        freebsd-questions@freebsd.org
Subject:   Re: Issue with the pkgng repository
Message-ID:  <50BE6BE3.8050606@infracaninophile.co.uk>
In-Reply-To: <k9lnqr$oc5$2@ger.gmane.org>
References:  <k9lnqr$oc5$2@ger.gmane.org>

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

On 04/12/2012 20:52, Walter Hurry wrote:
> I have another minor issue with pkgng:
>=20
> Say package foo-1.0 depends on bar-1.0. Then bar-1.0 is upgraded to=20
> version 1.1.
>=20
> So a new package bar-1.1 is built (from the port), and replaces bar-1.0=
=20
> in the repository. The repository database is then updated using 'pkg=20
> repo'.=20
>=20
> Now the repository database is out of whack: It still thinks foo-1.0=20
> depends on bar-1.0 (the deps table in the compressed repo.sqlite databa=
se=20
> - i.e. repo.txz in the repository).
>=20
> Admittedly the packages will still install (from the repository in=20
> question) on another machine, but nevertheless it doesn't seem quite=20
> right.
>=20
> One workaround is to re-create the foo package (plus any others dependi=
ng=20
> on bar) and refresh the repository, but is this an omission?

This is a flaw in your package repository maintenance process.  If
bar-1.0 is upgraded to bar-1.1 then you should rebuild all the packages
that have a direct dependency on it, and possibly many of the packages
that have an indirect dependency too.  I say 'rebuild' because that is
generally what happens in practice, even though in many cases you could
probably get away with simply repackaging everything that requires bar-1.=
x.

Not always though, and it's hard to tell the difference programatically
in the general case.  If, for example, bar-1.0 provides libbar.so.1 and
bar-1.1 provides libbar.so.2 then full rebuilds are definitely required
for anything that ultimately links against libbar.so.  And to discover
that 100% accurately, you have to examine the dynamic linkage
characteristics of every ELF file in every package with bar-1.x
somewhere in its dependency tree.  (No, LIB_DEPENDS cannot be relied on
for this) That's just once example reason why you might need a full
rebuild.  There are many more.  Which is why it is standard to just punt
and rebuild everything that requires bar-1.x.

Tracking this sort of stuff manually is pretty tedious.  Which is why
things like poudriere and tinderbox exist; so you can automate.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.

PGP: http://www.infracaninophile.co.uk/pgpkey
JID: matthew@infracaninophile.co.uk


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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlC+a+MACgkQ8Mjk52CukIwPrgCdGdAsNhTM373ime9RquJluLoc
LmgAn05omyX5xgLdeiD0OqOdcr8I9rH0
=t6H1
-----END PGP SIGNATURE-----

--------------enigDA9E09B4BB4E7DBE2FE4BBEF--



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