1 |
On Sun, Jun 24, 2012 at 3:18 PM, walt <w41ter@×××××.com> wrote: |
2 |
> On 06/24/2012 11:27 AM, Mark Knecht wrote: |
3 |
>> Hi, |
4 |
>> One of my machines is giving an undesired response in eselect: |
5 |
>> |
6 |
>> c2stable ~ # eselect binutils list |
7 |
>> !!! Error: Pattern does not match any installed version of binutils! |
8 |
>> exiting |
9 |
> |
10 |
> 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. |
11 |
> (I just discovered sftp, which is another easy way to copy things.) |
12 |
> |
13 |
> 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. |
14 |
> |
15 |
> |
16 |
> |
17 |
> |
18 |
|
19 |
Hi Walt, |
20 |
It isn't anything like fsck, etc. The machine is healthy in all |
21 |
other respects (that I know of and have tested) and everything is |
22 |
actually working. It's only the list option that's failing. eselect |
23 |
actually knows that binutils is set correctly. It just won't like it. |
24 |
|
25 |
c2stable ~ # eselect binutils show |
26 |
x86_64-pc-linux-gnu-2.21.1 |
27 |
c2stable ~ # eselect binutils set x86_64-pc-linux-gnu-2.21.1 |
28 |
!!! Error: Profile "x86_64-pc-linux-gnu-2.21.1" is already active! |
29 |
exiting |
30 |
c2stable ~ # eselect binutils list |
31 |
!!! Error: Pattern does not match any installed version of binutils! |
32 |
exiting |
33 |
c2stable ~ # |
34 |
|
35 |
Actually, I don't think it's that hard to compare files or |
36 |
directories that are supposed to be consistent on various machines. |
37 |
That's what rsync does to decide what to sync. The trick is getting |
38 |
the options correct which is usually my downfall. |
39 |
|
40 |
Anyway, in this case I compare the /usr/share/eselect/modules |
41 |
directory on my local (failing) machine with one of the other machines |
42 |
here in the house. In the first compare I look at the binutils file |
43 |
specifically which passes. In the second compare I look at everything |
44 |
in the modules directory which shows one mismatch which in this case |
45 |
is that the remote machine doesn't actually have a wxwidgets.eselect |
46 |
file. I cannot tell that until I log into the remote machine to |
47 |
determine the difference. |
48 |
|
49 |
mark@c2stable ~ $ rsync --dry-run -crv |
50 |
/usr/share/eselect/modules/binutils.eselect |
51 |
mark@k2:/usr/share/eselect/modules/binutils.eselect |
52 |
Password: |
53 |
sending incremental file list |
54 |
|
55 |
sent 55 bytes received 12 bytes 19.14 bytes/sec |
56 |
total size is 7796 speedup is 116.36 (DRY RUN) |
57 |
mark@c2stable ~ $ rsync --dry-run -crv /usr/share/eselect/modules/* |
58 |
mark@k2:/usr/share/eselect/modules Password: |
59 |
sending incremental file list |
60 |
wxwidgets.eselect |
61 |
|
62 |
sent 1095 bytes received 15 bytes 246.67 bytes/sec |
63 |
total size is 147613 speedup is 132.98 (DRY RUN) |
64 |
mark@c2stable ~ $ |
65 |
|
66 |
A little bit of Google suggests you can diff the files themselves |
67 |
using something like: |
68 |
|
69 |
diff <(ssh -n me@testserver cat /home/me/source/worksforme.php) <(ssh |
70 |
-n me@clientserver cat /home/me/source/worksforme.php) |
71 |
|
72 |
I have not tested this but suspect it probably works fine once you get |
73 |
everything right. |
74 |
|
75 |
HTH you or someone in the future, |
76 |
Mark |