Bug 491188 - inconsistent warnings for dangling-symlink
Summary: inconsistent warnings for dangling-symlink
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpmlint
Version: rawhide
Hardware: All
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Ville Skyttä
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-03-19 18:52 UTC by Mamoru TASAKA
Modified: 2009-07-16 07:29 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-03-23 17:45:09 UTC


Attachments (Terms of Use)

Description Mamoru TASAKA 2009-03-19 18:52:38 UTC
Description of problem:
With rpmlint-0.85-4.fc11.noarch, 

when I
- rebuild
  http://stetson.frozenhat.fi/~tpr/fedora/skanlite-0.2-2.fc11.src.rpm
  (on the review request bug 479147 comment 3)
- install skanlite binary rpm
- try "$ rpmlint skanlite" (here trying to check installed rpm)

Then:
On a directory:
------------------------------------------------------
[tasaka1@localhost TMP]$ rpmlint skanlite
/usr/share/rpmlint/Pkg.py:16: DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
  import popen2
skanlite.i586: W: dangling-symlink /usr/share/doc/HTML/sv/skanlite/common /usr/share/doc/HTML/sv//common
skanlite.i586: W: dangling-symlink /usr/share/doc/HTML/uk/skanlite/common /usr/share/doc/HTML/uk//common
skanlite.i586: W: dangling-symlink /usr/share/doc/HTML/pt/skanlite/common /usr/share/doc/HTML/pt//common
skanlite.i586: W: dangling-symlink /usr/share/doc/HTML/en/skanlite/common /usr/share/doc/HTML/en/common
1 packages and 0 specfiles checked; 0 errors, 4 warnings.
------------------------------------------------------

and on the another directory
------------------------------------------------------
[tasaka1@localhost Reviewing]$ rpmlint skanlite
/usr/share/rpmlint/Pkg.py:16: DeprecationWarning: The popen2 module is deprecated.  Use the subprocess module.
  import popen2
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
------------------------------------------------------

The results are inconsistent. Moreover, /usr/share/doc/HTML/en/common
directory exists and is owned by kdelibs-common-4.2.1-8.fc11.i586,
so actually 3 warnings should return.

Version-Release number of selected component (if applicable):
rpmlint-0.85-4.fc11.noarch

How reproducible:
100% ???

Steps to Reproduce:
1. see above
2.
3.

Comment 1 Ville Skyttä 2009-03-19 20:57:52 UTC
What are the contents of the TMP and the Reviewing directories?  If one of them contains a skanlite subdir and you run "rpmlint skanlite" there, you're not checking an installed package but stuff in the skanlite dir.

Comment 2 Mamoru TASAKA 2009-03-21 15:28:31 UTC
Well,
- TMP directory is empty
- Actually  Reviewing directory has "skanlite" directory as its
  subdirectory, along with other 507 subdirectories...

Comment 3 Ville Skyttä 2009-03-22 14:46:32 UTC
Do the other dirs exist, i.e. what does "ls -lad /usr/share/doc/HTML/{sv,uk,pt,en}/common" output?

What are the contents of the Reviewing/skanlite dir?  Could you put it in a tarball and upload somewhere so I can have a look?

Comment 4 Mamoru TASAKA 2009-03-22 16:07:06 UTC
Well,
- /usr/share/doc/HTML/en/common does exist, owned by
  kdelibs-common(-4.2.1-8.fc11). Other 3 do not exist.

- Reviewing/skanlite has one srpm and
------------------------------------------------
$ rpmlint skanlite/skanlite-0.2-2.fc11.src.rpm 
1 packages and 0 specfiles checked; 0 errors, 0 warnings.
------------------------------------------------

Comment 5 Ville Skyttä 2009-03-23 17:45:09 UTC
Ok, this is not a bug.

1) When running "rpmlint skanlite" in TMP, you are checking the installed skanlite package.  rpmlint flags all symlink targets for binary packages as dangling if the symlink's target is not owned by the package being checked, or the target is not listed as an explicit dependency in the package because rpmlint's unit of work is one package and it thus cannot know that something in skanlite's dependency chain (kdelibs in this case) owns the symlink targets, whether they exist on the filesystem or not [0].

2) When running "rpmlint skanlite" in Reviewing, you are checking the specfile and the source rpm in the skanlite dir.  rpmlint does not do symlink checks at all for specfiles or source rpms.

3) The different output between 1) and 2) is expected, because they are different things (binary rpm vs specfile and source rpm).

I intend to add a filter to future (> 0.87-1) rpmlint configs that suppresses the /usr/share/doc/HTML/.../common warnings as there's no better way to handle them at the moment.

[0] Actually it does check if a _relative_ symlink's target exists on the filesystem, but I intend to remove this misfeature for consistency with absolute symlink checks.

Comment 6 Ville Skyttä 2009-03-23 18:15:33 UTC
(In reply to comment #5)
> I intend to add a filter to future (> 0.87-1) rpmlint configs that suppresses
> the /usr/share/doc/HTML/.../common warnings as there's no better way to handle
> them at the moment.

http://cvs.fedoraproject.org/viewvc/devel/rpmlint/rpmlint.config?r1=1.31&r2=1.32

> [0] Actually it does check if a _relative_ symlink's target exists on the
> filesystem, but I intend to remove this misfeature for consistency with
> absolute symlink checks.  

http://rpmlint.zarb.org/cgi-bin/trac.cgi/changeset/1577

Comment 7 Fedora Update System 2009-06-21 22:01:00 UTC
rpmlint-0.89-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/rpmlint-0.89-1.fc11

Comment 8 Fedora Update System 2009-06-21 22:02:17 UTC
rpmlint-0.89-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/rpmlint-0.89-1.fc10

Comment 9 Fedora Update System 2009-06-29 15:46:12 UTC
rpmlint-0.90-1.fc11 has been submitted as an update for Fedora 11.
http://admin.fedoraproject.org/updates/rpmlint-0.90-1.fc11

Comment 10 Fedora Update System 2009-06-29 15:48:31 UTC
rpmlint-0.90-1.fc10 has been submitted as an update for Fedora 10.
http://admin.fedoraproject.org/updates/rpmlint-0.90-1.fc10

Comment 11 Fedora Update System 2009-07-16 07:26:49 UTC
rpmlint-0.90-1.fc11 has been pushed to the Fedora 11 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 12 Fedora Update System 2009-07-16 07:29:24 UTC
rpmlint-0.90-1.fc10 has been pushed to the Fedora 10 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.