[Fedora-packaging] dangling symlink vs file dependencies

Toshio Kuratomi a.badger at gmail.com
Thu Jul 2 19:52:02 UTC 2015


On Jul 2, 2015 7:43 AM, "Vít Ondruch" <vondruch at redhat.com> wrote:
>
> Hi,
>
> I am trying to update rubygem-apipie-rails and on that occasion, I'm
> going to unbundle the jquery. I did that by specifying "Requires:
> js-jquery1" and replacing the original file by symlink. And now rpmlint
> complains:
>
> rubygem-apipie-rails.noarch: W: dangling-symlink
>
/usr/share/gems/gems/apipie-rails-0.3.4/app/public/apipie/javascripts/bundled/jquery-1.7.2.js
> /usr/share/javascript/jquery/1/jquery.js
> The target of the symbolic link does not exist within this package or
> its file
> based dependencies.  Verify spelling of the link target and that the
> target is
> included in a package in this package's dependency chain.
>
>
> I could resolve this by "Requires: %{_jsdir}/jquery/1/jquery.js" and I'd
> love to do it, but this practice is discouraged by guidelines. Now I am
> wondering:
>
> 1) Is this reasonable to use the file dependnecy in this case, although
> it is outside of /etc, /bin, /sbin, /usr/bin, or /usr/sbin directories?

Not if you can stop it another way which it appears you do.

> 2) Does this reasoning: "Using file dependencies outside of those
> directories requires yum (and other depsolvers using the repomd format)
> to download and parse a large xml file looking for the dependency."
> still holds with recent move to DNF?

Not unless dnf always downloads the complete filelist repodata.  Since dnf
is supposed to be faster than yum doubt that it does that.  Even if it did
doo that it's likely that a future optimization would reestablish this
behavior as the complete filelist is so big.

> Isn't time to drop this paragraph?

>From the above description it hopefully is apparent that dropping out at
this time would be detrimental.
> Isn't this "large xml" downloaded anyway for some reason?

The large file being downloaded contains the complete mapping of packages
to the files they contain.  This ain't of information is not needed in the
majority of cases.  Usually the much smaller list of files (and package
names and provides) which are contained in the main metadata is sufficient.
The files which are in the main metadata are those which are in the
directories listed in the guidelines.

> Do we know
> what is the real benefit, if there is some?
>

You can look at the sizes of the repo metadata files on a mirror (or in the
yum cache if you were unfortunate enough to have to download the filelist
for a previous transaction).  The savings is avoiding having to download
the filelist.

-Toshio
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.fedoraproject.org/pipermail/packaging/attachments/20150702/27497948/attachment.html>


More information about the packaging mailing list