public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
From: David James <davidjames@google.com>
To: gentoo-portage-dev@lists.gentoo.org
Subject: Re: [gentoo-portage-dev] [PATCH] Implement --newrepo flag.
Date: Mon, 17 Feb 2014 13:44:29 -0800	[thread overview]
Message-ID: <CAGNm6ezEFwRXgCGkC9Usk67-b+ULFGnaYT9Lb2sSYcs3A5M5Gg@mail.gmail.com> (raw)
In-Reply-To: <53026C5E.4080107@gmx.de>

[-- Attachment #1: Type: text/plain, Size: 1800 bytes --]

On Mon, Feb 17, 2014 at 12:09 PM, Sebastian Luther
<SebastianLuther@gmx.de>wrote:

> Am 17.02.2014 18:52, schrieb David James:
> > @@ -96,6 +105,68 @@ class MultirepoTestCase(TestCase):
> <snip>
> > +
> > +                     #--newrepo: pick ebuild if binpkg/ebuild have
> different repo
> > +                     ResolverPlaygroundTestCase(
> > +                             ["dev-libs/C"],
> > +                             options = {"--usepkg": True, "--newrepo":
> True, "--selective": True},
> > +                             success = True,
> > +                             check_repo_names = True,
> > +                             mergelist = ["dev-libs/C-1::repo1"]),
>
> Why should it take the ebuild from the repo with lower priority?
>
> I thought the intend was that the package should be reinstalled if it is
> now pulled from a repo with higher priority than the repo from which the
> installed package came.


Interesting idea -- but no, that's not what I implemented. The intent here
is that a package will be reinstalled if it is now pulled from a different
repo than the repo from which the installed package came. This is actually
an important difference for our use case -- it allows you to switch in both
directions, both to higher priority repos and to lower priority repos.

From a theoretical perspective, the reason why I implemented this is
because "ebuilds" are the source of truth. According to the ebuilds, the
owner repo of dev-libs/C-1 is repo1, so this means that, with --newrepo,
any binpkg for dev-libs/C-1 from repo2 would be invalid.

This functionality is useful in the case where an ebuild changes repos. In
this case, with --newrepo, you would want the package to be rebuilt and any
binaries to be invalidated, and our tests validate this.

Cheers,

David

[-- Attachment #2: Type: text/html, Size: 2557 bytes --]

  reply	other threads:[~2014-02-17 21:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-14 17:31 [gentoo-portage-dev] [PATCH] Implement --newrepo flag David James
2014-02-14 20:31 ` Sebastian Luther
2014-02-14 20:43   ` David James
2014-02-14 21:37     ` Sebastian Luther
2014-02-17  4:57       ` David James
2014-02-17  7:49         ` Mike Frysinger
2014-02-17 16:39           ` Brian Dolbec
2014-02-17 17:52             ` David James
2014-02-17 20:09               ` Sebastian Luther
2014-02-17 21:44                 ` David James [this message]
2014-02-18 17:35                   ` Sebastian Luther
2014-02-17 18:23             ` Sebastian Luther
2014-02-17  7:45 ` Mike Frysinger

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=CAGNm6ezEFwRXgCGkC9Usk67-b+ULFGnaYT9Lb2sSYcs3A5M5Gg@mail.gmail.com \
    --to=davidjames@google.com \
    --cc=gentoo-portage-dev@lists.gentoo.org \
    /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