Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 539702 - app-admin/stow: read_a_link() does not propagate error where link cannot be resolved
Summary: app-admin/stow: read_a_link() does not propagate error where link cannot be r...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Proxy Maintainers
URL:
Whiteboard:
Keywords: PATCH
Depends on:
Blocks:
 
Reported: 2015-02-11 03:11 UTC by kfm
Modified: 2015-03-06 13:12 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Handle unreadable links correctly in read_a_link() (stow-read-a-link-error-handling.patch,433 bytes, patch)
2015-02-11 03:11 UTC, kfm
Details | Diff
Fixed ebuild + patch (stow-2.2.0-r2.fixed_ebuild+patch.tgz,1.14 KB, application/x-compressed-tar)
2015-03-05 23:10 UTC, erik falor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description kfm 2015-02-11 03:11:05 UTC
Created attachment 396162 [details, diff]
Handle unreadable links correctly in read_a_link()

After upgrading to Perl 5.20, running stow produces the following warning:-

Possible precedence issue with control flow operator at /usr/lib64/perl5/5.20.1/Stow.pm line 1736.

The offending code is as follows:

    return readlink $path
        or error("Could not read link: $path");

The intention is to raise a fatal error if $path cannot be resolved. What happens instead is that undef is returned, with error() never being called.

The attached patch fixes this bug.
Comment 1 kfm 2015-03-03 12:35:22 UTC
There was an upstream commit that fixes it in the same way.

https://github.com/aspiers/stow/commit/d788ce0
Comment 2 erik falor 2015-03-05 23:10:06 UTC
Created attachment 398194 [details]
Fixed ebuild + patch

I've adapted upstream's development patch to cleanly apply to the latest released source-code. The new ebuild bumps the revision number to -r2.
Comment 3 Maxim Koltsov (RETIRED) gentoo-dev 2015-03-06 12:29:23 UTC
Commited, thanks.
Comment 4 kfm 2015-03-06 13:12:46 UTC
Thanks, Maxim. Can this be put out for stable keywording?