From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22385 invoked by alias); 22 Aug 2008 09:26:57 -0000 Received: (qmail 22374 invoked by uid 22791); 22 Aug 2008 09:26:57 -0000 X-Spam-Check-By: sourceware.org Received: from dessent.net (HELO dessent.net) (69.60.119.225) by sourceware.org (qpsmtpd/0.31) with ESMTP; Fri, 22 Aug 2008 09:26:22 +0000 Received: from localhost.localdomain ([127.0.0.1] helo=dessent.net) by dessent.net with esmtp (Exim 4.50) id 1KWSuS-0001Wn-P4 for cygwin-apps@cygwin.com; Fri, 22 Aug 2008 09:26:20 +0000 Message-ID: <48AE863C.4FF638D7@dessent.net> Date: Fri, 22 Aug 2008 09:26:00 -0000 From: Brian Dessent Reply-To: cygwin-apps@cygwin.com X-Mailer: Mozilla 4.79 [en] (Windows NT 5.0; U) MIME-Version: 1.0 To: cygwin-apps@cygwin.com Subject: Re: [RFC] 1.7 Packaging: Obsolete packages References: <48880879.5050400@users.sourceforge.net> <20080724094313.GG5251@calimero.vinschen.de> <488913D9.8070809@users.sourceforge.net> <20080725094034.GR5251@calimero.vinschen.de> <20080730121815.GM29031@calimero.vinschen.de> <48ACED44.4060902@users.sourceforge.net> <20080821082602.GE29104@calimero.vinschen.de> <20080821103526.GJ29104@calimero.vinschen.de> <20080821114626.GL29104@calimero.vinschen.de> <48AE1681.87EFAB55@dessent.net> <20080822081956.GB29992@calimero.vinschen.de> <48AE7E50.483A42C0@dessent.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-IsSubscribed: yes Mailing-List: contact cygwin-apps-help@cygwin.com; run by ezmlm Precedence: bulk Sender: cygwin-apps-owner@cygwin.com List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Mail-Followup-To: cygwin-apps@cygwin.com X-SW-Source: 2008-08/txt/msg00235.txt.bz2 Brian Dessent wrote: > - the Replaced-by method would not allow a determined user to continue > using an old version of a package without upgrading. With the current > scheme they can just mark the existing package as "Keep" (or select a > "Prev" version) which has the effect of blocking the upgrade since it > works on the principle of the bumped version triggering the action. But > with a Replaced-by keyword doing the action instead of the presence of a > bumped version, there would be no choice. And thinking about this some more, we could work around that issue by implementing the treatment of the Replaced-by keyword "as-if" the user had manually deselected OLDNAME and selected NEWNAME. Thus if they select "Keep" then that action is undone and the list of operations is cleared as expected, and all packages stay at what they're set to now. Of course we'd need to hook it into the right places so that these "as-if" selections are not just done once but every time that the trust level is set to "Curr". Otherwise, you'd miss the upgrade if you clicked on Keep then clicked again on Curr (or Exp for that matter.) So to sum up an implementation skeleton: - add the keyword to the lexer and parser - add an additional packagedb data member that contains a vector of OLDNAME->NEWNAME pairs found from the result of parsing the ini file - add code that runs after reading the installed.db that changes any occurance of OLDNAME to NEWNAME in any package's dependency spec - add code in the "set global trustval" codepath that runs after all the exising calculations to set the transitions "as-if" the user had deselected OLDNAME and selected NEWNAME for each pair, recomputing full recursive dependencies each time -- but *only* if setting the trustval to curr or exp, not keep. Brian