Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 170702

Summary: wrong result of symbolic link compare in equery check
Product: Portage Development Reporter: Zhixu Liu <zhixu.liu>
Component: ToolsAssignee: Portage Tools Team <tools-portage>
Status: RESOLVED FIXED    
Severity: minor CC: jakub
Priority: High Keywords: InVCS
Version: unspecified   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on:    
Bug Blocks: 170220    

Description Zhixu Liu 2007-03-13 08:56:54 UTC
When I run command 'equery check openssh', it said:
...
!!! /usr/bin/slogin does not point to ssh
...

this is wrong, since /usr/bin/slogin do point to ./ssh!

The code in equery is:
tgt = os.readlink(file) which return "./ssh", we should strip the "./" before compare it with the target which is get by os.path.normpath(t.strip())!

Reproducible: Always

Steps to Reproduce:
1.equery check openssh

Actual Results:  
[ Checking net-misc/openssh-4.5_p1-r1 ]
!!! /usr/bin/slogin does not point to ssh
...

Expected Results:  
should not have !!!
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-03-13 09:19:18 UTC
Hmmm, so why does openssh's Makefile.in create such weird symlinks for slogin stuff at all?

ln -s ./ssh$(EXEEXT) $(DESTDIR)$(bindir)/slogin
ln -s ./ssh.1 $(DESTDIR)$(mandir)/$(mansubdir)1/slogin.1

Nothing else here does.

# ls -lR /bin /sbin /usr/bin /usr/sbin /usr/share/man | grep -- "-> \./"
lrwxrwxrwx 1 root root         5 2007-03-12 17:19 slogin -> ./ssh
lrwxrwxrwx 1 root root     11 2007-03-12 17:19 slogin.1.bz2 -> ./ssh.1.bz2
Comment 2 SpanKY gentoo-dev 2007-03-13 17:27:48 UTC
it may be quite weird, but it isnt invalid, so changing openssh doesnt fix the real problem
Comment 3 Paul Varner (RETIRED) gentoo-dev 2007-03-16 03:13:40 UTC
$ svn commit -m "Fix equery check to not fail for symlinks prefixed with ./ (Bug #170702)"
Sending        ChangeLog
Sending        src/equery/equery
Transmitting file data ..
Committed revision 358.
Comment 4 Paul Varner (RETIRED) gentoo-dev 2007-03-19 17:48:28 UTC
Fixed in gentoolkit-0.2.4_pre2