Gentoo Archives: gentoo-portage-dev

From: David James <davidjames@××××××.com>
To: gentoo-portage-dev@l.g.o
Subject: Re: [gentoo-portage-dev] [PATCH] Implement --newrepo flag.
Date: Mon, 17 Feb 2014 21:44:52
Message-Id: CAGNm6ezEFwRXgCGkC9Usk67-b+ULFGnaYT9Lb2sSYcs3A5M5Gg@mail.gmail.com
In Reply to: Re: [gentoo-portage-dev] [PATCH] Implement --newrepo flag. by Sebastian Luther
1 On Mon, Feb 17, 2014 at 12:09 PM, Sebastian Luther
2 <SebastianLuther@×××.de>wrote:
3
4 > Am 17.02.2014 18:52, schrieb David James:
5 > > @@ -96,6 +105,68 @@ class MultirepoTestCase(TestCase):
6 > <snip>
7 > > +
8 > > + #--newrepo: pick ebuild if binpkg/ebuild have
9 > different repo
10 > > + ResolverPlaygroundTestCase(
11 > > + ["dev-libs/C"],
12 > > + options = {"--usepkg": True, "--newrepo":
13 > True, "--selective": True},
14 > > + success = True,
15 > > + check_repo_names = True,
16 > > + mergelist = ["dev-libs/C-1::repo1"]),
17 >
18 > Why should it take the ebuild from the repo with lower priority?
19 >
20 > I thought the intend was that the package should be reinstalled if it is
21 > now pulled from a repo with higher priority than the repo from which the
22 > installed package came.
23
24
25 Interesting idea -- but no, that's not what I implemented. The intent here
26 is that a package will be reinstalled if it is now pulled from a different
27 repo than the repo from which the installed package came. This is actually
28 an important difference for our use case -- it allows you to switch in both
29 directions, both to higher priority repos and to lower priority repos.
30
31 From a theoretical perspective, the reason why I implemented this is
32 because "ebuilds" are the source of truth. According to the ebuilds, the
33 owner repo of dev-libs/C-1 is repo1, so this means that, with --newrepo,
34 any binpkg for dev-libs/C-1 from repo2 would be invalid.
35
36 This functionality is useful in the case where an ebuild changes repos. In
37 this case, with --newrepo, you would want the package to be rebuilt and any
38 binaries to be invalidated, and our tests validate this.
39
40 Cheers,
41
42 David

Replies

Subject Author
Re: [gentoo-portage-dev] [PATCH] Implement --newrepo flag. Sebastian Luther <SebastianLuther@×××.de>