Almost solved :-( - Re: [gentoo-user] Help : mc and ln mixup

2006-04-15 Thread Rohit Sharma
Dear all,

Unfortunately there have been no responses on my question below - since
most likely none of us have faced/solve this bloody problem before.  A
conflict between mc and ln [part of coreutils] would be fatal to my
system - I would assume. God knows what may have already broken down there.

I am very tempted to do the following:

   1. reiserfs --rebuildtree for all of my partitions, especially for /
  and /usr [by booting off a gentoo install CD]
   2. Rebuild it from scratch with the latest Gentoo ISO [but it is a
  HELL of work, getting USB internet modem and nVIDIA module
  rebuild.. working again etc etc]

If anyone has a better idea, kindly let me know.

Rohit

Rohit Sharma wrote:

Bo Andresen wrote:
Rohit replies --

Thanks, both of you, for your response. I am re-emerging coreutils, just
in case.  Done.
The commands are below - and in summary here is what happens.
- PATH is shown. My own .bin directory has two mp3 ripping scripts. That
is all. /usr/bin comes before /bin in PATH
- /bin/ln is a proper executable. /usr/bin/ln and /usr/bin/mc are
both symlinks to /bin/ln [Not good]
- Removed mc from /usr/bin and /usr/bin/ln disappears as well [Not
good] Then which ln shoes /bin/ln and which mc shows no mc.
-  Creation of symlink /usr/bin/ln automatically creates symlink
/usr/bin/mc - pointing to /bin/ln [thus affecting my midnight
commander]. Both symlinks have same inode number on my filesystem. Also
note that I do not have another definition of ln as an alias.

This may be a filesystem inconsistency. I would consider an fsck for
reiserfs and may be a rebuiltree. What do you say?

Please help.
Thanks,
Rohit
Ps - Commands follow.

Please look at the following.

[EMAIL PROTECTED] ~ $ echo $PATH
/home/rohit/.bin:/usr/games/bin:/usr/kde/3.5/bin:/home/rohit/.bin:/usr/games/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.5:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/kde/3.4/bin:/usr/games/bin:/opt/limewire:/home/oracle/product/10.1.0.3/bin
[EMAIL PROTECTED] ~ $ cd /bin
[EMAIL PROTECTED] /bin $ md5sum ln
95d3db99e446dfe4cf95abbd04b60c75  ln
[EMAIL PROTECTED] /bin $ ls -l ln
-rwxr-xr-x 1 root root 27756 Apr 14 12:39 ln
[EMAIL PROTECTED] /bin $ cd /usr/bin
[EMAIL PROTECTED] /usr/bin $ md5sum ln
95d3db99e446dfe4cf95abbd04b60c75  ln
[EMAIL PROTECTED] /usr/bin $ ls -l ln
lrwxrwxrwx 1 root root 7 Apr 14 12:39 ln - /bin/ln
[EMAIL PROTECTED] /usr/bin $ md5sum mc
95d3db99e446dfe4cf95abbd04b60c75  mc
[EMAIL PROTECTED] /usr/bin $ ls -l mc
lrwxrwxrwx 1 root root 7 Apr 14 12:39 mc - /bin/ln
[EMAIL PROTECTED] /usr/bin $
[EMAIL PROTECTED] /usr/bin $ file mc
mc: symbolic link to `/bin/ln'
[EMAIL PROTECTED] /usr/bin $ rm mc
rm: remove symbolic link `mc'? y
rm: cannot remove `mc': Permission denied
[EMAIL PROTECTED] /usr/bin $ sudo rm mc
[EMAIL PROTECTED] /usr/bin $ls -l mc
ls: mc: No such file or directory
[EMAIL PROTECTED] /usr/bin $ ls -l ln
ls: ln: No such file or directory
[EMAIL PROTECTED] /usr/bin $ which ln
/bin/ln
[EMAIL PROTECTED] /usr/bin $ which mc
which: no mc in
(/home/rohit/.bin:/usr/games/bin:/usr/kde/3.5/bin:/home/rohit/.bin:/usr/games/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.5:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/kde/3.4/bin:/usr/games/bin:/opt/limewire:/home/oracle/product/10.1.0.3/bin)
[EMAIL PROTECTED] /usr/bin $ sudo /bin/ln -s /bin/ln ./ln
[EMAIL PROTECTED] /usr/bin $ sudo /bin/ln -s /bin/ln ./ln
[EMAIL PROTECTED] /usr/bin $ which mc
/usr/bin/mc
[EMAIL PROTECTED] /usr/bin $ which ln
/usr/bin/ln
[EMAIL PROTECTED] /usr/bin $ ls -i ln mc
300 ln  300 mc
[EMAIL PROTECTED] /usr/bin $ ls -li ln mc
300 lrwxrwxrwx 1 root root 7 Apr 14 12:48 ln - /bin/ln
300 lrwxrwxrwx 1 root root 7 Apr 14 12:48 mc - /bin/ln
[EMAIL PROTECTED] /usr/bin $ ls -li /bin/ln
34560 -rwxr-xr-x 1 root root 27756 Apr 14 12:39 /bin/ln
[EMAIL PROTECTED] ~ $ alias ln
bash: alias: ln: not found

  



-- 
Best regards,
Rohit Sharma

Senior Technical Associate with Mahindra British Telecom
Onsite co-ordinator with British Telecom, United Kingdom
Certified Linux, networking professional, UNIX systems consultant  EAI
Specialist

Contacts:  [EMAIL PROTECTED]
mailto:[EMAIL PROTECTED] : Mobile +44 777 0917 951


-- 
gentoo-user@gentoo.org mailing list



Re: Almost solved :-( - Re: [gentoo-user] Help : mc and ln mixup

2006-04-15 Thread Richard Fish
On 4/15/06, Rohit Sharma [EMAIL PROTECTED] wrote:
 Dear all,

 Unfortunately there have been no responses on my question below - since
 most likely none of us have faced/solve this bloody problem before.  A
 conflict between mc and ln [part of coreutils] would be fatal to my
 system - I would assume. God knows what may have already broken down there.

 I am very tempted to do the following:

1. reiserfs --rebuildtree for all of my partitions, especially for /
   and /usr [by booting off a gentoo install CD]
2. Rebuild it from scratch with the latest Gentoo ISO [but it is a
   HELL of work, getting USB internet modem and nVIDIA module
   rebuild.. working again etc etc]

 If anyone has a better idea, kindly let me know.

You can use equery to figure out packages are messed up and how.  You
need gentoolkit if you don't already have it:

cd /var/db/pkg
for x in */* ; do equery check $x ; done

-Richard

-- 
gentoo-user@gentoo.org mailing list



Re: Almost solved :-( - Re: [gentoo-user] Help : mc and ln mixup

2006-04-15 Thread Boyd Stephen Smith Jr.
On Saturday 15 April 2006 14:57, Rohit Sharma [EMAIL PROTECTED] wrote 
about 'Almost solved :-( - Re: [gentoo-user] Help : mc and ln mixup':
1. reiserfs --rebuildtree for all of my partitions, especially for /
   and /usr [by booting off a gentoo install CD]

Do a reiserfs --check, first.  It is usually pretty good at telling you 
which fix option to use.  If it doesn't think there's a problem at all, 
then yes, do a rebuild tree.

2. Rebuild it from scratch with the latest Gentoo ISO [but it is a
   HELL of work, getting USB internet modem and nVIDIA module
   rebuild.. working again etc etc]

After you get your filesystem in order, and doubly verify that you hw isn't 
going south, just repair the packages that are broken, using Richard 
Fish's technique.

-- 
If there's one thing we've established over the years,
it's that the vast majority of our users don't have the slightest
clue what's best for them in terms of package stability.
-- Gentoo Developer Ciaran McCreesh


pgpUVnC5X6myu.pgp
Description: PGP signature


Re: Almost solved :-( - Re: [gentoo-user] Help : mc and ln mixup

2006-04-15 Thread Rohit Sharma
Boyd Stephen Smith Jr. wrote:

After you get your filesystem in order, and doubly verify that you hw isn't 
going south, just repair the packages that are broken, using Richard 
Fish's technique.
  

Thanks - but I am frustrated now.
Did --check, then --fix-fixable, and ultimately a --rebuild-tree as well.
Still the same problem. When I emerge mc [only], /usr/bin/ln appears in
/usr/bin and has the same inode number as /usr/bin/mc and both are
symlinks.  Weird.

So did what Richard F suggested .. Loads of notifications about  and 
etc.  - looks like it shall take time.
Rohit
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Help : mc and ln mixup

2006-04-14 Thread Rohit Sharma
Bo Andresen wrote:
Rohit replies --

Thanks, both of you, for your response. I am re-emerging coreutils, just
in case.  Done.
The commands are below - and in summary here is what happens.
- PATH is shown. My own .bin directory has two mp3 ripping scripts. That
is all. /usr/bin comes before /bin in PATH
- /bin/ln is a proper executable. /usr/bin/ln and /usr/bin/mc are
both symlinks to /bin/ln [Not good]
- Removed mc from /usr/bin and /usr/bin/ln disappears as well [Not
good] Then which ln shoes /bin/ln and which mc shows no mc.
-  Creation of symlink /usr/bin/ln automatically creates symlink
/usr/bin/mc - pointing to /bin/ln [thus affecting my midnight
commander]. Both symlinks have same inode number on my filesystem. Also
note that I do not have another definition of ln as an alias.

This may be a filesystem inconsistency. I would consider an fsck for
reiserfs and may be a rebuiltree. What do you say?

Please help.
Thanks,
Rohit
Ps - Commands follow.

Please look at the following.

[EMAIL PROTECTED] ~ $ echo $PATH
/home/rohit/.bin:/usr/games/bin:/usr/kde/3.5/bin:/home/rohit/.bin:/usr/games/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.5:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/kde/3.4/bin:/usr/games/bin:/opt/limewire:/home/oracle/product/10.1.0.3/bin
[EMAIL PROTECTED] ~ $ cd /bin
[EMAIL PROTECTED] /bin $ md5sum ln
95d3db99e446dfe4cf95abbd04b60c75  ln
[EMAIL PROTECTED] /bin $ ls -l ln
-rwxr-xr-x 1 root root 27756 Apr 14 12:39 ln
[EMAIL PROTECTED] /bin $ cd /usr/bin
[EMAIL PROTECTED] /usr/bin $ md5sum ln
95d3db99e446dfe4cf95abbd04b60c75  ln
[EMAIL PROTECTED] /usr/bin $ ls -l ln
lrwxrwxrwx 1 root root 7 Apr 14 12:39 ln - /bin/ln
[EMAIL PROTECTED] /usr/bin $ md5sum mc
95d3db99e446dfe4cf95abbd04b60c75  mc
[EMAIL PROTECTED] /usr/bin $ ls -l mc
lrwxrwxrwx 1 root root 7 Apr 14 12:39 mc - /bin/ln
[EMAIL PROTECTED] /usr/bin $
[EMAIL PROTECTED] /usr/bin $ file mc
mc: symbolic link to `/bin/ln'
[EMAIL PROTECTED] /usr/bin $ rm mc
rm: remove symbolic link `mc'? y
rm: cannot remove `mc': Permission denied
[EMAIL PROTECTED] /usr/bin $ sudo rm mc
[EMAIL PROTECTED] /usr/bin $ls -l mc
ls: mc: No such file or directory
[EMAIL PROTECTED] /usr/bin $ ls -l ln
ls: ln: No such file or directory
[EMAIL PROTECTED] /usr/bin $ which ln
/bin/ln
[EMAIL PROTECTED] /usr/bin $ which mc
which: no mc in
(/home/rohit/.bin:/usr/games/bin:/usr/kde/3.5/bin:/home/rohit/.bin:/usr/games/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/i686-pc-linux-gnu/gcc-bin/3.4.5:/opt/blackdown-jdk-1.4.2.03/bin:/opt/blackdown-jdk-1.4.2.03/jre/bin:/usr/bin:/usr/kde/3.5/bin:/usr/qt/3/bin:/usr/kde/3.4/bin:/usr/games/bin:/opt/limewire:/home/oracle/product/10.1.0.3/bin)
[EMAIL PROTECTED] /usr/bin $ sudo /bin/ln -s /bin/ln ./ln
[EMAIL PROTECTED] /usr/bin $ sudo /bin/ln -s /bin/ln ./ln
[EMAIL PROTECTED] /usr/bin $ which mc
/usr/bin/mc
[EMAIL PROTECTED] /usr/bin $ which ln
/usr/bin/ln
[EMAIL PROTECTED] /usr/bin $ ls -i ln mc
300 ln  300 mc
[EMAIL PROTECTED] /usr/bin $ ls -li ln mc
300 lrwxrwxrwx 1 root root 7 Apr 14 12:48 ln - /bin/ln
300 lrwxrwxrwx 1 root root 7 Apr 14 12:48 mc - /bin/ln
[EMAIL PROTECTED] /usr/bin $ ls -li /bin/ln
34560 -rwxr-xr-x 1 root root 27756 Apr 14 12:39 /bin/ln
[EMAIL PROTECTED] ~ $ alias ln
bash: alias: ln: not found

-- 
gentoo-user@gentoo.org mailing list



[gentoo-user] Help : mc and ln mixup

2006-04-13 Thread Rohit Sharma
Hi there,

Please see the following. Both /usr/bin/ln and /usr/bin/mc on my system
seem to launch mc.
if I delete one, the other disappears as well.
if I emerge mc, /usr/bin/ln also appears.
Even if /usr/bin/ln is deleted, which ln returns /usr/bin/ln

What is happening. I am completely baffled.
-- 
Best regards,
Rohit Sharma
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Help : mc and ln mixup

2006-04-13 Thread Willie Wong
On Fri, Apr 14, 2006 at 01:06:57AM +0100, Penguin Lover Rohit Sharma squawked:
 Hi there,
 
 Please see the following. Both /usr/bin/ln and /usr/bin/mc on my system
 seem to launch mc.
 if I delete one, the other disappears as well.
 if I emerge mc, /usr/bin/ln also appears.
 Even if /usr/bin/ln is deleted, which ln returns /usr/bin/ln
 
 What is happening. I am completely baffled.

Is it a bad symlink? On my box /usr/bin/ln is a symlink to /bin/ln

 [09:31 PM]wwong man $ ls -l `which ln`
 lrwxrwxrwx 1 root root 7 Apr 13 16:55 /usr/bin/ln - /bin/ln

W
-- 
Smart man + Smart woman = romance
Smart man + Dumb woman  = affair
Dumb man  + Smart woman = marriage
Dumb man  + Dumb woman  = pregnancy
Sortir en Pantoufles: up 152 days, 17:57
-- 
gentoo-user@gentoo.org mailing list



Re: [gentoo-user] Help : mc and ln mixup

2006-04-13 Thread Bo Andresen
On Friday 14 April 2006 02:06, Rohit Sharma wrote:
 Hi there,

 Please see the following. Both /usr/bin/ln and /usr/bin/mc on my system
 seem to launch mc.
 if I delete one, the other disappears as well.
 if I emerge mc, /usr/bin/ln also appears.
 Even if /usr/bin/ln is deleted, which ln returns /usr/bin/ln

 What is happening. I am completely baffled.

Sounds weird..

# cd /usr/bin/
# which ln
/usr/bin/ln
# mv ln ..
# which ln
/bin/ln
# mv ../ln .
# which ln
/usr/bin/ln

If you run

# echo $PATH

you will see that /usr/bin is listed before /bin. which searches the 
directories in $PATH and stops at the first match so since /usr/bin comes 
before /bin it returns /usr/bin/ln.

If you delete /usr/bin/ln it should return /bin/ln which should be unaffected. 
If you delete /bin/ln then /usr/bin/ln will become a dangling symbolic link 
pointing at a file which doesn't exist..

Which version of coreutils do you have?

 # equery b ln
[ Searching for file(s) ln in *... ]
[...]
sys-apps/coreutils-5.94-r1 (/bin/ln)
sys-apps/coreutils-5.94-r1 (/usr/bin/ln - /bin/ln)

If you are still having problems with this then show us the commands that you 
are running and the output that leads you to your conclusions..

HtH

-- 
Bo Andresen


pgpXwqrbekMu4.pgp
Description: PGP signature