From owner-freebsd-questions Thu Mar 23 9:27:57 2000 Delivered-To: freebsd-questions@freebsd.org Received: from ns.binep.ac.ru (ns.binep.ac.ru [193.233.37.5]) by hub.freebsd.org (Postfix) with ESMTP id 266A537B884 for ; Thu, 23 Mar 2000 09:27:49 -0800 (PST) (envelope-from goshik@binep.ac.ru) Received: from serv2.binep.ac.ru (serv2 [193.233.44.77]) by ns.binep.ac.ru (8.9.3/8.9.3) with SMTP id UAA03220; Thu, 23 Mar 2000 20:36:23 +0300 (MSK) (envelope-from goshik@binep.ac.ru) Reply-To: "Igor B. Bykhalo" From: "Igor B. Bykhalo" To: "John Daniels" Cc: Subject: Re: Ports questions Date: Thu, 23 Mar 2000 20:18:56 +0300 Message-ID: <01bf94eb$df0c1680$0000e9c1@serv2.binep.ac.ru> MIME-Version: 1.0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: 8bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.0913.2206 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.0913.2200 Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG CC:ports trimmed >From: John Daniels >Hi: >Thanks for the reply. > >I am trying to get a better handle on how ports functions. I still don't >quite 'get it.' If I use pkg_delete, then only that specific package is >deleted? None of the additional packages that were added as dependencies >will be deleted? No, because other applications can depend on these packages, as it is quite often the case... > So I have to delete each of these dependent applications >individually? Does ports keep a list of the dependent applications >somewhere so I know what was installed (and thus, what I would need to >delete)? Yes, in /var/db/pkg database. Look at this: # ll /var/db/pkg/gettext-0.10.35 total 5 -rw-r--r-- 1 root wheel 38 3 מגפ 12:19 +COMMENT -rw-r--r-- 1 root wheel 1450 3 מגפ 12:19 +CONTENTS -rw-r--r-- 1 root wheel 305 3 מגפ 12:19 +DESC -rw-r--r-- 1 root wheel 21 3 מגפ 12:56 +REQUIRED_BY # cat +REQUIRED_BY wget-1.5.3 mc-4.5.42 > If I wanted to delete an application which another application >depends on, would I get a warning/option to discontinue?, or would ports >just rebuild the app the next time I started the xyz port which depends on >the deleted app? Yes to warning - pkg_delete will warn You and refuse to delete port, no to rebuild - the ports collection is not so automated. Personally I'm thinking this is good... And You may force deletion by pkg_delete -f PortName. >Wouldn't it seem that if ports were really 'smart' that it would have an >associated database that kept track of dependencies so that when a >port/package is deleted it would prompt the user for permission to delete >each of the dependent apps that are not needed by other apps on the system? >This might be only a minor issue for experienced users but it would give >newbies more confidence in using ports. For now, cvsup, pkg_version, "print-index" and "search" targets in /usr/ports/Makefile are Your friends. pkg_version -c can even generate "prototype" script for updating installed ports, but beware - it's just a "template", You'll need double check it before using... Bye, Igor To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message