From owner-freebsd-ports@FreeBSD.ORG Fri Aug 1 06:59:14 2008 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E03B31065673 for ; Fri, 1 Aug 2008 06:59:14 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: from mail2.fluidhosting.com (mx23.fluidhosting.com [204.14.89.6]) by mx1.freebsd.org (Postfix) with ESMTP id 875638FC0C for ; Fri, 1 Aug 2008 06:59:14 +0000 (UTC) (envelope-from dougb@FreeBSD.org) Received: (qmail 1449 invoked by uid 399); 1 Aug 2008 06:59:14 -0000 Received: from localhost (HELO lap.dougb.net) (dougb@dougbarton.us@127.0.0.1) by localhost with ESMTPAM; 1 Aug 2008 06:59:14 -0000 X-Originating-IP: 127.0.0.1 X-Sender: dougb@dougbarton.us Message-ID: <4892B440.4090809@FreeBSD.org> Date: Thu, 31 Jul 2008 23:59:12 -0700 From: Doug Barton Organization: http://www.FreeBSD.org/ User-Agent: Thunderbird 2.0.0.16 (X11/20080726) MIME-Version: 1.0 To: Norberto Meijome References: <489144B5.4030101@FreeBSD.org> <4892022F.1080009@FreeBSD.org> <9bbcef730807311438m45802827y91c7bb7366406af6@mail.gmail.com> <20080801125414.55567d37@ayiin> In-Reply-To: <20080801125414.55567d37@ayiin> X-Enigmail-Version: 0.95.6 OpenPGP: id=D5B2F0FB Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-ports@freebsd.org Subject: Re: Call for comments - pkg_trans 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: Fri, 01 Aug 2008 06:59:15 -0000 Norberto Meijome wrote: > On Thu, 31 Jul 2008 23:38:21 +0200 "Ivan Voras" > wrote: > >>> BTW, I thought of another problem scenario. The user installs >>> port M, and it brings dependencies D1, D2, and D3. Then the >>> user installs port N which also has port D2 as a dependency. >> Port N then won't install D2 as it already exists. The user can >> rollback [N], then rollback [M+D1+D2+D3]. Trying to roll back >> back [M+D1+D2+D3] before [N] will show the user a message about >> dependencies. > > Shouldn't you be able to request rollback [M + D1 + D2+ D3 ] , but > have the dependency of {something else not M} on D2 be detected, > and therefore D2 *not* uninstalled? That is certainly how I would imagine it should work, yes. > As a matter of fact, i don't really see why we need a transaction > system to have an option to {pkg management of choice} to uninstall > {unwanted_pkg} and all other dependencies ONLY needed by > {unwanted_pkg}. Anyway, pkg_cutleaves does part of it...but it'd be > much handier, i think, to handle it @ the uninstall time. As I mentioned previously portmaster has the -s option to remove ports that were installed as dependencies but are no longer depended on. It also has the -e option to "expunge" leaf ports you don't want anymore, and -e will run 'portmaster -s' after it's done deleting the port you specify on the command line. > And since we are just wishing for things, It'd be nice to have an > opportunity to back off from a install/remove after calculating > dependencies, such as that provided by yum (it shows everything it > will do and asks for confirmation before proceeding. ) portmaster has the --show-work option that gives you output like this: ===>>> Port directory: /usr/ports/sysutils/fusefs-ntfs ===>>> Starting check for all dependencies ===>>> Gathering dependency list for sysutils/fusefs-ntfs from ports ===>>> Installed archivers/unzip ===>>> Installed converters/libiconv ===>>> Installed devel/gmake ===>>> Installed devel/libtool15 ===>>> NOT INSTALLED devel/libublio ===>>> Installed devel/pkg-config ===>>> NOT INSTALLED lang/ruby18 ===>>> NOT INSTALLED sysutils/fusefs-kmod ===>>> NOT INSTALLED sysutils/fusefs-libs ===>>> NOT INSTALLED textproc/ruby-deplate Is that what you had in mind? That is currently a separate operation because for ports with a lot of dependencies it can take a long time to build the list. But I suppose that if there is interest I could create a new mode of operation to do that check first, then confirm with the user that they want to proceed. Doug -- This .signature sanitized for your protection