public inbox for cygwin-apps@cygwin.com
 help / color / mirror / Atom feed
From: Yaakov Selkowitz <yselkowitz@cygwin.com>
To: cygwin-apps@cygwin.com
Subject: Re: upset, genini: different version ordering
Date: Tue, 20 Oct 2015 17:03:00 -0000	[thread overview]
Message-ID: <1445360608.12108.35.camel@cygwin.com> (raw)
In-Reply-To: <20151020155048.GI5319@calimero.vinschen.de>

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


  reply	other threads:[~2015-10-20 17:03 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-20 18:03 Achim Gratz
2015-07-20 18:10 ` Jon TURNEY
2015-07-20 18:42   ` Achim Gratz
2015-07-20 19:00     ` Corinna Vinschen
2015-07-20 20:09       ` Achim Gratz
2015-07-21  6:56         ` Corinna Vinschen
2015-07-21 16:59           ` Achim Gratz
2015-07-21 18:49             ` Corinna Vinschen
2015-07-21 19:13               ` Achim Gratz
2015-07-22  9:43                 ` Corinna Vinschen
2015-07-22 16:21                   ` Achim Gratz
2015-07-23  9:59                     ` Corinna Vinschen
2015-07-23 17:09                       ` Achim Gratz
2015-07-23 19:17                         ` Corinna Vinschen
2015-07-23 19:29                           ` Corinna Vinschen
2015-07-23 19:38                           ` Achim Gratz
2015-07-23 19:51                             ` Corinna Vinschen
2015-07-23 20:02                               ` Achim Gratz
2015-07-24  9:19                                 ` Corinna Vinschen
2015-07-24 18:09                                   ` Achim Gratz
2015-07-24 18:16                                     ` Achim Gratz
2015-10-09 13:24   ` Jon Turney
2015-10-19 15:42     ` Corinna Vinschen
2015-10-19 17:19       ` Achim Gratz
2015-10-19 17:28         ` Yaakov Selkowitz
2015-10-19 18:13           ` Achim Gratz
2015-10-20 10:27             ` Corinna Vinschen
2015-10-20 13:33               ` Jon Turney
2015-10-20 15:50                 ` Corinna Vinschen
2015-10-20 17:03                   ` Yaakov Selkowitz [this message]
2015-10-20 19:18                     ` Corinna Vinschen
2015-10-20 19:53                     ` Achim Gratz
2015-10-20 20:35                       ` Yaakov Selkowitz
2015-10-21 16:45                         ` Achim Gratz
2015-10-21 17:04                           ` Yaakov Selkowitz
2015-11-20 19:14                 ` Jon Turney
2015-10-20 13:47         ` Jon Turney
2015-10-20 17:29           ` Achim Gratz
2015-08-18 18:34 ` Achim Gratz
2015-08-18 19:06   ` Corinna Vinschen
2015-08-18 20:07     ` Achim Gratz
2015-08-19  8:25       ` Corinna Vinschen
2015-08-21 13:28         ` Corinna Vinschen
2015-08-21 18:35           ` Achim Gratz
2015-08-22 10:48             ` Achim Gratz
2015-08-22 10:51         ` Achim Gratz
2015-08-22 13:29           ` Corinna Vinschen
2015-08-22 15:11             ` Achim Gratz
2015-08-24  7:27               ` Corinna Vinschen
2015-09-03 16:34                 ` Corinna Vinschen
2015-08-20 11:37   ` Jon TURNEY
2015-08-20 19:55     ` Achim Gratz
2015-08-24 11:25     ` Yaakov Selkowitz
2015-08-24 12:29       ` Corinna Vinschen
2015-08-24 17:13         ` Achim Gratz

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1445360608.12108.35.camel@cygwin.com \
    --to=yselkowitz@cygwin.com \
    --cc=cygwin-apps@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).