From owner-freebsd-questions@FreeBSD.ORG Tue Dec 4 21:32:28 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 19DC78B7 for ; Tue, 4 Dec 2012 21:32:28 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (smtp6.infracaninophile.co.uk [IPv6:2001:8b0:151:1:3cd3:cd67:fafa:3d78]) by mx1.freebsd.org (Postfix) with ESMTP id 7858E8FC12 for ; Tue, 4 Dec 2012 21:32:27 +0000 (UTC) Received: from seedling.black-earth.co.uk (seedling.black-earth.co.uk [81.2.117.99]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.5/8.14.5) with ESMTP id qB4LWJaP051663 (version=TLSv1/SSLv3 cipher=DHE-RSA-CAMELLIA256-SHA bits=256 verify=NO); Tue, 4 Dec 2012 21:32:19 GMT (envelope-from m.seaman@infracaninophile.co.uk) DKIM-Filter: OpenDKIM Filter v2.7.1 smtp.infracaninophile.co.uk qB4LWJaP051663 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=infracaninophile.co.uk; s=201001-infracaninophile; t=1354656739; bh=+AKAfST3F3h3Xb7SA+ybA2ugdJHi4krVF99c76KI3hU=; h=Date:From:To:CC:Subject:References:In-Reply-To; z=Date:=20Tue,=2004=20Dec=202012=2021:32:19=20+0000|From:=20Matthew =20Seaman=20|To:=20Walter=20Hurry =20|CC:=20freebsd-questions@freebsd.org|Sub ject:=20Re:=20Issue=20with=20the=20pkgng=20repository|References:= 20|In-Reply-To:=20; b=GH5kUv7p9x+ZrwfZLguZjpQICeWmtAmic8mrDJFgrZtzNRoMoiZa4DFmYxQeCpJFX 6KhNxJid+fs4qrCxtqWTfXnh879q7ZH0vtkwbveRkBT71aF9lYojdhMNjQDgg4M+b3 f8toQANSRnsKFEa9WqS1T+jwGKQyP3YKpVny6fOo= Message-ID: <50BE6BE3.8050606@infracaninophile.co.uk> Date: Tue, 04 Dec 2012 21:32:19 +0000 From: Matthew Seaman User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.6; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: Walter Hurry Subject: Re: Issue with the pkgng repository References: In-Reply-To: X-Enigmail-Version: 1.4.6 OpenPGP: id=60AE908C Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="------------enigDA9E09B4BB4E7DBE2FE4BBEF" X-Virus-Scanned: clamav-milter 0.97.6 at lucid-nonsense.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.1 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,SPF_FAIL autolearn=no version=3.3.2 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on lucid-nonsense.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 04 Dec 2012 21:32:28 -0000 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--