Gentoo Archives: gentoo-user

From: walt <w41ter@×××××.com>
To: gentoo-user@l.g.o
Subject: [gentoo-user] Re: eselect binutils list not matching
Date: Tue, 26 Jun 2012 22:31:08
Message-Id: jsdd39$b99$1@dough.gmane.org
In Reply to: Re: [gentoo-user] Re: eselect binutils list not matching by Mark Knecht
1 On 06/26/2012 10:51 AM, Mark Knecht wrote:
2 > On Sun, Jun 24, 2012 at 3:18 PM, walt <w41ter@×××××.com> wrote:
3 >> On 06/24/2012 11:27 AM, Mark Knecht wrote:
4 >>> Hi,
5 >>> One of my machines is giving an undesired response in eselect:
6 >>>
7 >>> c2stable ~ # eselect binutils list
8 >>> !!! Error: Pattern does not match any installed version of binutils!
9 >>> exiting
10 >>
11 >> I would start by comparing /usr/share/eselect/* between the bad machine and one of the good ones. I'd probably use scp -r to copy the bad machine's directory to /tmp on the good machine and use diff -r to do the comparison.
12 >> (I just discovered sftp, which is another easy way to copy things.)
13 >>
14 >> I love to hear a better suggestion about how to compare two different machines, though. You could set up an nfs mount of one machine on the other, but that's too complicated for my very limited needs.
15 >>
16 >>
17 >>
18 >>
19 >
20 > Hi Walt,
21 > It isn't anything like fsck, etc. The machine is healthy in all
22 > other respects (that I know of and have tested) and everything is
23 > actually working. It's only the list option that's failing. eselect
24 > actually knows that binutils is set correctly. It just won't like it.
25 >
26 > c2stable ~ # eselect binutils show
27 > x86_64-pc-linux-gnu-2.21.1
28 > c2stable ~ # eselect binutils set x86_64-pc-linux-gnu-2.21.1
29 > !!! Error: Profile "x86_64-pc-linux-gnu-2.21.1" is already active!
30 > exiting
31 > c2stable ~ # eselect binutils list
32 > !!! Error: Pattern does not match any installed version of binutils!
33 > exiting
34 > c2stable ~ #
35 >
36 > Actually, I don't think it's that hard to compare files or
37 > directories that are supposed to be consistent on various machines.
38 > That's what rsync does to decide what to sync. The trick is getting
39 > the options correct which is usually my downfall.
40 >
41 > Anyway, in this case I compare the /usr/share/eselect/modules
42 > directory on my local (failing) machine with one of the other machines
43 > here in the house. In the first compare I look at the binutils file
44 > specifically which passes. In the second compare I look at everything
45 > in the modules directory which shows one mismatch which in this case
46 > is that the remote machine doesn't actually have a wxwidgets.eselect
47 > file. I cannot tell that until I log into the remote machine to
48 > determine the difference.
49 >
50 > mark@c2stable ~ $ rsync --dry-run -crv
51 > /usr/share/eselect/modules/binutils.eselect
52 > mark@k2:/usr/share/eselect/modules/binutils.eselect
53 > Password:
54 > sending incremental file list
55 >
56 > sent 55 bytes received 12 bytes 19.14 bytes/sec
57 > total size is 7796 speedup is 116.36 (DRY RUN)
58 > mark@c2stable ~ $ rsync --dry-run -crv /usr/share/eselect/modules/*
59 > mark@k2:/usr/share/eselect/modules Password:
60 > sending incremental file list
61 > wxwidgets.eselect
62 >
63 > sent 1095 bytes received 15 bytes 246.67 bytes/sec
64 > total size is 147613 speedup is 132.98 (DRY RUN)
65 > mark@c2stable ~ $
66 >
67 > A little bit of Google suggests you can diff the files themselves
68 > using something like:
69 >
70 > diff <(ssh -n me@testserver cat /home/me/source/worksforme.php) <(ssh
71 > -n me@clientserver cat /home/me/source/worksforme.php)
72 >
73 > I have not tested this but suspect it probably works fine once you get
74 > everything right.
75
76 I'd never have thought of those two ideas. Thanks for the tip.
77
78 /usr/bin/eselect is just a shellscript, so adding the line 'set -x' near
79 the top of the script may give you a clue about what part of 'list' it
80 doesn't understand :)