From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28364 invoked by alias); 20 Oct 2015 17:03:35 -0000 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 Received: (qmail 28349 invoked by uid 89); 20 Oct 2015 17:03:34 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.8 required=5.0 tests=AWL,BAYES_00,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_PASS autolearn=no version=3.3.2 X-HELO: mx1.redhat.com Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES256-GCM-SHA384 encrypted) ESMTPS; Tue, 20 Oct 2015 17:03:24 +0000 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 04F773DD42 for ; Tue, 20 Oct 2015 17:03:23 +0000 (UTC) Received: from YAAKOV04.redhat.com (ovpn-116-20.rdu2.redhat.com [10.10.116.20]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id t9KH3LeL023102 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Tue, 20 Oct 2015 13:03:22 -0400 Message-ID: <1445360608.12108.35.camel@cygwin.com> Subject: Re: upset, genini: different version ordering From: Yaakov Selkowitz To: cygwin-apps@cygwin.com Date: Tue, 20 Oct 2015 17:03:00 -0000 In-Reply-To: <20151020155048.GI5319@calimero.vinschen.de> References: <87380i671e.fsf@Rainer.invalid> <55AD399D.7020001@dronecode.org.uk> <5617C006.7070908@dronecode.org.uk> <20151019154236.GC18989@calimero.vinschen.de> <87mvvehj3t.fsf@Rainer.invalid> <1445275721.10544.14.camel@cygwin.com> <87a8rehgkg.fsf@Rainer.invalid> <20151020102722.GH5319@calimero.vinschen.de> <562642B2.5030607@dronecode.org.uk> <20151020155048.GI5319@calimero.vinschen.de> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2015-10/txt/msg00045.txt.bz2 On Tue, 2015-10-20 at 17:50 +0200, Corinna Vinschen wrote: > > Adding epoch parsing would be additional work. I'm not sure how much value > > that would have since (a) we are effectively limited to 2 package versions, > > and (b) we can force a given ordering using setup.hint > > Yaakov thinks we need epoch. Yaakov, could you briefly outline why we > should need it? Do we have real-world examples in the distro where we > could need it? I guess Achim's perl packages are particulary nice > examples? First, let's remember that this isn't just about upset getting prev: and curr: right, but also about setup knowing when to upgrade by default. Therefore, simply tweaking setup.hint files is insufficient. Besides sorting out our current discrepancies, here is a perfect example of a use for epoch: https://cygwin.com/ml/cygwin-announce/2015-07/msg00015.html https://cygwin.com/ml/cygwin-announce/2015-07/msg00050.html In short, xdelta was updated from 1.x to 3.x, then it was realized that both were needed, and so xdelta was reverted to 1.x and xdelta3 was created. Instead of saying "oh btw you need to revert xdelta to 1.x yourself" (which is all we could do currently), the solution would be to bump epoch on xdelta-1.x, which would force it to be considered newer than the short-lived xdelta-3.x by both upset and setup. As for implementation, the idea would be to use a special character in the version number of tarballs as so (pseudocode): char epoch[N] = {}, *sep; if ((sep = strchr(version, SEPARATOR))) { strncpy(epoch, version, sep - version); version = sep + 1; } else epoch[0] = "0"; Then compare epochs first, then version and release to determine which is newer. As for the separator, in RPM it is ':' but as we will need to have this character in the tarball name and Windows doesn't allow that in filenames, we will need to pick something else. On the cygport side, this would be triggered by defining EPOCH in the .cygport file, *not* by using this character in VERSION. -- Yaakov