1 |
On Tue, 2015-12-01 at 10:44 -0500, Mike Frysinger wrote: |
2 |
> On 24 Nov 2015 15:41, Joakim Tjernlund wrote: |
3 |
> > Emerging on my embedded gentoo ppc target I see this: |
4 |
> > .... |
5 |
> > dev-lang/python-exec-2.0.1-r1::x-portage |
6 |
> > sys-apps/install-xattr-0.5::x-portage |
7 |
> > sys-libs/timezone-data-2015f::x-portage |
8 |
> > |
9 |
> > Where does the name x-portage come from? I do not have a repo |
10 |
> > named x-portage, it is still named gentoo. |
11 |
> |
12 |
> it has no name so one is auto-created using the path. |
13 |
|
14 |
Ahh, this must be the repos.conf/repo_name conflict/mess. |
15 |
I have a name in repos.conf but I have deleted the profiles/repo_name file in |
16 |
the repo. |
17 |
|
18 |
This inconsistency could use some portage (and related tools) love. There is also a bug |
19 |
https://bugs.gentoo.org/show_bug.cgi?id=563874 |
20 |
|
21 |
> pym/portage/repository/config.py: |
22 |
> @staticmethod |
23 |
> def _read_valid_repo_name(repo_path): |
24 |
> name, missing = RepoConfig._read_repo_name(repo_path) |
25 |
> # We must ensure that the name conforms to PMS 3.1.5 |
26 |
> # in order to avoid InvalidAtom exceptions when we |
27 |
> # use it to generate atoms. |
28 |
> name = _gen_valid_repo(name) |
29 |
> if not name: |
30 |
> # name only contains invalid characters |
31 |
> name = "x-" + os.path.basename(repo_path) |
32 |
> name = _gen_valid_repo(name) |
33 |
> # If basename only contains whitespace then the |
34 |
> # end result is name = 'x-'. |
35 |
> return name, missing |
36 |
> |
37 |
> @staticmethod |
38 |
> def _read_repo_name(repo_path): |
39 |
> """ |
40 |
> Read repo_name from repo_path. |
41 |
> Returns repo_name, missing. |
42 |
> """ |
43 |
> repo_name_path = os.path.join(repo_path, REPO_NAME_LOC) |
44 |
> f = None |
45 |
> try: |
46 |
> f = io.open( |
47 |
> _unicode_encode(repo_name_path, |
48 |
> encoding=_encodings['fs'], errors='strict'), |
49 |
> mode='r', encoding=_encodings['repo.content'], |
50 |
> errors='replace') |
51 |
> return f.readline().strip(), False |
52 |
> except EnvironmentError: |
53 |
> return "x-" + os.path.basename(repo_path), True |
54 |
> finally: |
55 |
> if f is not None: |
56 |
> f.close() |
57 |
> -mike |