Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 264680 - dev-perl/PortageXS-0.02.09 broken searchPackage in Core.pm
Summary: dev-perl/PortageXS-0.02.09 broken searchPackage in Core.pm
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Perl team
URL: https://github.com/gentoo-perl/Portag...
Whiteboard:
Keywords: PATCH, UPSTREAM
Depends on:
Blocks:
 
Reported: 2009-04-02 19:21 UTC by Ralph Sennhauser (RETIRED)
Modified: 2021-06-06 17:22 UTC (History)
1 user (show)

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


Attachments
fix (search_package.patch,1.90 KB, patch)
2009-04-02 19:21 UTC, Ralph Sennhauser (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Ralph Sennhauser (RETIRED) gentoo-dev 2009-04-02 19:21:00 UTC
Can't call method "read" on an undefined value at /usr/lib64/perl5/vendor_perl/5.8.8/PortageXS/Core.pm line 309.

Reproducible: Always

Steps to Reproduce:
Copy the example packageSearch.pl to a userdir, remove the "use lib" line and execute the script.
Comment 1 Ralph Sennhauser (RETIRED) gentoo-dev 2009-04-02 19:21:52 UTC
Created attachment 187131 [details, diff]
fix
Comment 2 Christian Hartmann (RETIRED) gentoo-dev 2009-04-03 19:27:55 UTC
Not really sure why this happens on your system. The function reads the directory and passes the current work-path do the inner loop that should exist at the time of execution. (Yep.. there might be a problem when a second task deletes directories in the directory the program currently walks thru.. that should be fixed - no doubt.)

Could you please elaborate? I fail to see why this happens on your system. As you wrote a patch that fixes the problem for you I guess at least you do. :)

Thanks in advance!
Comment 3 Ralph Sennhauser (RETIRED) gentoo-dev 2009-04-04 16:48:59 UTC
(In reply to comment #2)
> Not really sure why this happens on your system. The function reads the
> directory and passes the current work-path do the inner loop that should exist
> at the time of execution. 
It does exist. But /usr/portage/package doesn't allow read access to normal user. So that's why it fails in my case.

>(Yep.. there might be a problem when a second task
> deletes directories in the directory the program currently walks thru.. that
> should be fixed - no doubt.)
That's another possible error that may arise.

> Could you please elaborate? I fail to see why this happens on your system. As
> you wrote a patch that fixes the problem for you I guess at least you do. :)
Even not knowing the cause writing this patch was simple.:)
So if you think just skipping is not appropriate than implement a proper error handling here.

> 
> Thanks in advance!
> 

I have to thank you for putting energy into a portage perl api.
Comment 4 Kent Fredric (IRC: kent\n) (RETIRED) gentoo-dev 2013-07-24 06:54:38 UTC
A partial fix for this problem has been implemented in yet-to-hit portage 0.2.12. 

Its not perfect, but its a better solution for "now" than "just bail out for no good reason".

I know there's probably still some objections, because $categories should still do *something* if they can't be traversed, however, thats not the dominant case, and will implement something better when the code is in better shape.
Comment 5 Larry the Git Cow gentoo-dev 2021-06-06 17:22:38 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b5678f9452dff2c54da4a50cad1ff81ce097fddf

commit b5678f9452dff2c54da4a50cad1ff81ce097fddf
Author:     Jakov Smolic <jakov.smolic@sartura.hr>
AuthorDate: 2021-06-06 17:21:57 +0000
Commit:     David Seifert <soap@gentoo.org>
CommitDate: 2021-06-06 17:21:57 +0000

    dev-perl/PortageXS: Remove last-rited pkg
    
    Closes: https://github.com/gentoo/gentoo/pull/21103
    Closes: https://bugs.gentoo.org/264680
    Closes: https://bugs.gentoo.org/289524
    Closes: https://bugs.gentoo.org/332611
    Closes: https://bugs.gentoo.org/473394
    Closes: https://bugs.gentoo.org/613114
    Closes: https://bugs.gentoo.org/625536
    Closes: https://bugs.gentoo.org/671244
    Closes: https://bugs.gentoo.org/688238
    Signed-off-by: Jakov Smolic <jakov.smolic@sartura.hr>
    Signed-off-by: David Seifert <soap@gentoo.org>

 dev-perl/PortageXS/Manifest                        |   2 -
 dev-perl/PortageXS/PortageXS-0.02.10-r4.ebuild     |  54 ------
 dev-perl/PortageXS/PortageXS-0.2.10-r5.ebuild      |  60 -------
 dev-perl/PortageXS/PortageXS-0.2.12-r1.ebuild      |  63 -------
 .../files/0.02.12/PortageXS-0.02.12-prefix.patch   | 198 ---------------------
 .../files/PortageXS-0.02.10-portage_path_fix.patch |  86 ---------
 .../PortageXS/files/PortageXS-0.02.10-prefix.patch | 137 --------------
 dev-perl/PortageXS/metadata.xml                    |  17 --
 profiles/package.mask                              |  11 --
 9 files changed, 628 deletions(-)