Bug 491188 - inconsistent warnings for dangling-symlink
inconsistent warnings for dangling-symlink
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: rpmlint (Show other bugs)
rawhide
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ville Skyttä
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2009-03-19 14:52 EDT by Mamoru TASAKA
Modified: 2009-07-16 03:29 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-03-23 13:45:09 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Mamoru TASAKA 2009-03-19 14:52:38 EDT
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 16:57:52 EDT
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 11:28:31 EDT
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 10:46:32 EDT
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 12:07:06 EDT
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 13:45:09 EDT
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 14:15:33 EDT
(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 18:01:00 EDT
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 18:02:17 EDT
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 11:46:12 EDT
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 11:48:31 EDT
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 03:26:49 EDT
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 03:29:24 EDT
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.