From owner-freebsd-ports@FreeBSD.ORG Thu Apr 24 10:22:24 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 B2F29106564A for ; Thu, 24 Apr 2008 10:22:24 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from falcon.cybervisiontech.com (falcon.cybervisiontech.com [217.20.163.9]) by mx1.freebsd.org (Postfix) with ESMTP id 4B69E8FC13 for ; Thu, 24 Apr 2008 10:22:24 +0000 (UTC) (envelope-from avg@icyb.net.ua) Received: from localhost (localhost [127.0.0.1]) by falcon.cybervisiontech.com (Postfix) with ESMTP id 4A82A7440E8; Thu, 24 Apr 2008 13:22:22 +0300 (EEST) X-Virus-Scanned: Debian amavisd-new at falcon.cybervisiontech.com Received: from falcon.cybervisiontech.com ([127.0.0.1]) by localhost (falcon.cybervisiontech.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id SYtHafg1dOZh; Thu, 24 Apr 2008 13:22:22 +0300 (EEST) Received: from [10.2.1.87] (gateway.cybervisiontech.com.ua [88.81.251.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by falcon.cybervisiontech.com (Postfix) with ESMTP id BB77F7440D2; Thu, 24 Apr 2008 13:22:21 +0300 (EEST) Message-ID: <48105F5C.8090300@icyb.net.ua> Date: Thu, 24 Apr 2008 13:22:20 +0300 From: Andriy Gapon User-Agent: Thunderbird 2.0.0.12 (X11/20080311) MIME-Version: 1.0 To: Andy Kosela References: <480E3F5E.3060501@icyb.net.ua> <481032B1.2040907@icyb.net.ua> <3cc535c80804240214k2b3059f7xeee9eee22574ed24@mail.gmail.com> In-Reply-To: <3cc535c80804240214k2b3059f7xeee9eee22574ed24@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: Michel Talon , freebsd-ports@freebsd.org Subject: Re: purely package-based/oriented solution 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: Thu, 24 Apr 2008 10:22:24 -0000 on 24/04/2008 12:14 Andy Kosela said the following: > On Thu, Apr 24, 2008 at 9:11 AM, Andriy Gapon wrote: >> on 22/04/2008 22:41 Andriy Gapon said the following: >> > Sorry if this is something obvious or a FAQ. >> > >> > Is there a tool for purely package-based management of third-party software? >> > That is, something that meets the following criteria: >> > 1. doesn't require ports tree >> > 2. works similarly to package installation in FreeBSD installer >> > 3. can properly handle upgrading packages (including dependencies) >> > 4. can check remote package repositories and, based on timestamp or >> > INDEX, can find new versions for installed packages >> > 5. can verify that all dependencies would be met before downloading all >> > packages in full (e.g. based on INDEX data or can download initial >> > blocks of packages, so that package metadata could be extracted and >> > examined). >> > >> >> Results so far: >> 1. One tool that I found in ports was bpkg, its description and manual >> page sounded promising. >> But after I saw the following line in its code I decided to not even try it: >> pkg_delete -fa && pkg_add -r $all >> > >>From my own experience the most stable and reliable as well as the > most simple method > for upgrading all packages is still the old "wipe them all first and > install from scratch", especially when > using binary only packages and recently you just upgraded to the new > FreeBSD RELEASE version. > I used nearly all package managers in the past: 'portupgrade', > 'portmaster' etc. and all of them had > some peculiarities which I did not like, and especially portupgrade > gave me some headaches in the past, so I > decided to write a simple wrapper shell script around the base, rock > solid package tools pkg_add, pkg_delete etc. > On the other note on production systems I usually do not upgrade ALL > packages using any "automated" scripts > as usually all of them fail sooner or later :) > Cleanly upgrading third party packages is still not one of the > FreeBSD's strong points. On the positive note though, because > someone mentioned 'yum' you still can't cleanly upgrade RedHat/CentOS > between major version upgrades.. like RHEL 4 to RHEL 5. > The only recommended method is still to install from scratch. Andy, I agree with everything you said. It is just that that particular simple way of upgrading all packages is not very safe (should I say "very unsafe"?). What happens if script for some reason dies, especially near '&&' point - you are left with no packages at all. If you haven't saved manually your list of packages prior to running bpkg even that wouldn't be saved. The script doesn't automatically account for local/"thirdparty" packages or packages installed from ports with restrictions - those packages will not be available from standard package repository. Your tool is quite good when you know what you are doing, but it can be dangerous otherwise. And manual page doesn't warn about that. P.S. I've recently upgraded FC6 to F7 using yum update/upgrade, however I did have to do rpm magic several times. -- Andriy Gapon