From owner-freebsd-ports@FreeBSD.ORG Sun Sep 28 06:54:32 2008 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 51C3E1065698 for ; Sun, 28 Sep 2008 06:54:32 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.freebsd.org (Postfix) with ESMTP id D83418FC16 for ; Sun, 28 Sep 2008 06:54:31 +0000 (UTC) (envelope-from yanefbsd@gmail.com) Received: by ug-out-1314.google.com with SMTP id m2so174513uge.39 for ; Sat, 27 Sep 2008 23:54:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type:content-transfer-encoding :content-disposition; bh=iZ1hCMVwe3f1nsUoDIyRRXximbSqQXKdOGZbQ61bKTU=; b=g+h0ajW/9hVqEOrvakg9FJiM5zA0DchvSRRY+1gIC4/dUjzpKzHHoZYTBaUU9Qayha 05GBp5DUAJ6wEr5sXQc9EMKdNKiYQw5Nehg8mcJKK5OAyzRHIaODr9K4kW2mbuCj12jX CqUZRBgWAb3dL2y7ZqKISYDr3JTbfICC3fkWk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type :content-transfer-encoding:content-disposition; b=wSYfgfxPPeBtKeLRrnlS5bgx6/4Bww7l2IDEW3r/TBor7+qeGlEW5EzretknCxt+R9 tokfd+ljEgEz0zFGQUDUbEtFTo8i6YHqKqFzg1iuhvte9xin7kYIROXbhjwNtU5rieRQ y3k9ZgCFG9nmWtlVNJCt+HsXFQEqjVR9m4Vdk= Received: by 10.67.123.19 with SMTP id a19mr92053ugn.36.1222584869674; Sat, 27 Sep 2008 23:54:29 -0700 (PDT) Received: by 10.66.251.1 with HTTP; Sat, 27 Sep 2008 23:54:29 -0700 (PDT) Message-ID: <7d6fde3d0809272354o2da84929t62ca7f585d486a1f@mail.gmail.com> Date: Sat, 27 Sep 2008 23:54:29 -0700 From: "Garrett Cooper" To: ports@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Cc: Subject: Usefulness of pkg_depend command? X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 28 Sep 2008 06:54:32 -0000 Hi porters, Just thinking -- one of the problems with many utilities is mapping dependencies with installing either packages or ports. Would there be any interest in a C app (based off the same code in pkg_install already) in the base system being able to provide dependency info for a list of ports / pkgs provided, s.t. we could have a shell script to simply install items in order via the BUILD_DEPS and RUN_DEPS fields in INDEX files? The driving force behind this is that I should be able to do the following to upgrade my ports / pkgs instead of depending on complicated infrastructures to do this for me: #!/bin/sh for pkg in `pkg_depend -o $@ | grep '<' | cut -d ' ' -f 1`; do cd /usr/ports/$pkg || continue make clean all || continue make deinstall install done # END I realize that pkg_cutleaves brute forces this logic and pkg_tree does similar. My point was to implement it in C with existing logic in pkg_install for both performance reasons and to prevent code duplication as much as possible. Thanks, -Garrett