From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mark H Weaver Subject: Re: [PATCH] list-packages: Display package usage count. Date: Sun, 26 Oct 2014 15:46:30 -0400 Message-ID: <87oasy1und.fsf@netris.org> References: <87wq7uu0ga.fsf@member.fsf.org> <87siibstyh.fsf@gnu.org> <87lho2y9km.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:46030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XiTm7-000822-Pb for guix-devel@gnu.org; Sun, 26 Oct 2014 15:46:59 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XiTm0-000812-62 for guix-devel@gnu.org; Sun, 26 Oct 2014 15:46:51 -0400 In-Reply-To: <87lho2y9km.fsf@gmail.com> (Eric Bavier's message of "Sun, 26 Oct 2014 13:23:05 -0500") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Eric Bavier Cc: guix-devel@gnu.org Eric Bavier writes: > Ludovic Court=C3=A8s writes: > >> Eric Bavier skribis: >> >>> + (define (users package) >>> + (let ((n (length (package-transitive-dependents >>> + (find-packages-by-name* (package-name package) >>> + (package-version package= )))))) >> >> Why not just (package-transitive-dependents package)? > > Because that would not accurately count the "true" number of dependents. Agreed, but what you wrote doesn't fully address the problem either. If we modify 'gnu-make', that's also going to affect 'gnu-make-boot0' in commencement.scm. Since that one has a different name ("make-boot0"), your logic won't catch it. Similarly, if you modify 'gcc-4.7', that's also going to affect 'gcc-4.8' (different version) which affects 'gcc-boot0' (with a different name and version). So, it seems to me that we need a way to find all packages that 'inherit' from the package we're changing, transitively. I'm not sure off-hand if that information is preserved, but if not, we should probably arrange to preserve it somehow. Mark