Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 537584 - app-portage/pfl misbehaves on systems using sys-apps/paludis
Summary: app-portage/pfl misbehaves on systems using sys-apps/paludis
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Third-Party Tools (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Daniel Pielmeier
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-24 19:55 UTC by Enne Eziarc
Modified: 2015-04-04 11:22 UTC (History)
1 user (show)

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


Attachments
Fix pfl for non-portage (pfl-paludis.patch,274 bytes, patch)
2015-02-05 19:06 UTC, Enne Eziarc
Details | Diff
Fix for paludis (correct patch) (pfl-paludis.patch,492 bytes, patch)
2015-02-05 19:07 UTC, Enne Eziarc
Details | Diff
Paludis Patch - just retry with uppercase (paludis.patch,328 bytes, patch)
2015-02-08 16:29 UTC, bugs
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Enne Eziarc 2015-01-24 19:55:49 UTC
pfl checks that the ebuild was installed from the "gentoo" repository. Okay, that part makes sense.

However, it uses Portage's own API to do this, which is where things break: it stores the repo name in the file /var/db/pkg/*/*/repository. Paludis uses the original, correct uppercase name for that file; Portage doesn't read that at all and returns an empty string for the package's repo name. As a result pfl gets an empty list of files each time.

Please consider adding a workaround to pfl for this, at least until it's fixed in portage.
Comment 1 bugs 2015-02-05 18:08:49 UTC
Hi,
thanks for your report.

This is the failing piece of code, isn't it?

def get_contents(self, c, p, v):
    dbl = dblink(c, '%s-%s' % (p, v), self._settings['ROOT'], self._settings)
    return dbl.getcontents()


And the problem is that the file "repository" is uppercase on paludis and lowercase on portage machines?

If it's like that I don't see a fast workaround here. Because it is a portage internal and I don't see how to change the "outer world" so portage behaves as expected. Do you have an idea? Do you want to attach a "get_contents" method that works on paludis (and may be portage) machines? ;)

regards
Daniel
Comment 2 Enne Eziarc 2015-02-05 19:06:23 UTC
Created attachment 395630 [details, diff]
Fix pfl for non-portage

I'm no Python coder but I tried fixing it anyway; here's a patch, works for me, hopefully I didn't break the Portage side of things.
Comment 3 Enne Eziarc 2015-02-05 19:07:58 UTC
Created attachment 395632 [details, diff]
Fix for paludis (correct patch)

Whoops sorry, I screwed that up. Here's the correct file.
Comment 4 bugs 2015-02-08 16:29:08 UTC
Created attachment 395916 [details, diff]
Paludis Patch - just retry with uppercase
Comment 5 bugs 2015-02-08 16:31:50 UTC
(In reply to Daniel from comment #4)
> Created attachment 395916 [details, diff] [details, diff]
> Paludis Patch - just retry with uppercase

Would you please try this "patch". It just retries with uppercase if the result is empty. This is not very elegant but should work for now. Your patch does not work for me.
Comment 6 Enne Eziarc 2015-02-09 00:05:47 UTC
(In reply to Daniel from comment #5)
> (In reply to Daniel from comment #4)
> > Created attachment 395916 [details, diff] [details, diff] [details, diff]
> > Paludis Patch - just retry with uppercase
> 
> Would you please try this "patch". It just retries with uppercase if the
> result is empty. This is not very elegant but should work for now. Your
> patch does not work for me.

Yep, works fine here.
Comment 7 Daniel Pielmeier gentoo-dev 2015-04-04 11:22:36 UTC
+*pfl-2.4-r4 (04 Apr 2015)
+
+  04 Apr 2015; Daniel Pielmeier <billie@gentoo.org> +pfl-2.4-r4.ebuild,
+  +files/pfl-2.4-reponame.patch:
+  Fix issue with different repository naming between portage/paludis. Thanks to
+  Anthony Parsons in bug #537584.

I have committed a new revision which includes the latest patch. Please thest and reopen if the issue persists.