Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 434518 - app-admin/eselect-xvmc: please review prefix changes
Summary: app-admin/eselect-xvmc: please review prefix changes
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christoph Junghans (RETIRED)
URL:
Whiteboard:
Keywords: Inclusion, InVCS, PATCH
Depends on:
Blocks: prefix-gx86
  Show dependency tree
 
Reported: 2012-09-09 22:15 UTC by Christoph Junghans (RETIRED)
Modified: 2013-03-11 14:37 UTC (History)
1 user (show)

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


Attachments
patch for eselect-xvmc-0.3.eselect (eselect-xvmc-0.3.eselect.patch,2.10 KB, patch)
2012-09-09 22:15 UTC, Christoph Junghans (RETIRED)
Details | Diff
patch for eselect-xvmc-0.3.eselect (eselect-xvmc-0.3.eselect.patch,2.19 KB, patch)
2012-09-10 04:38 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Christoph Junghans (RETIRED) gentoo-dev 2012-09-09 22:15:06 UTC
Created attachment 323344 [details, diff]
patch for eselect-xvmc-0.3.eselect

Please include the following patch in the next version of eselect-xvmc.
Comment 1 Christoph Junghans (RETIRED) gentoo-dev 2012-09-10 04:38:04 UTC
Created attachment 323370 [details, diff]
patch for eselect-xvmc-0.3.eselect

Updated version of the first patch.
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2012-10-19 08:52:42 UTC
@Ulm: could you incorporate this patch into the eselect repository.
Comment 3 Ulrich Müller gentoo-dev 2012-10-20 09:23:09 UTC
(In reply to comment #2)
> @Ulm: could you incorporate this patch into the eselect repository.

I can do, but cardoe should give his O.K. to this, as he's listed as maintainer of the xvmc module.
Comment 4 Christoph Junghans (RETIRED) gentoo-dev 2012-11-17 03:33:26 UTC
@cardoe: ping
Comment 5 Christoph Junghans (RETIRED) gentoo-dev 2013-03-10 16:45:16 UTC
@ulm: it is nearly 4 months later, how long should we wait for the OK to fix all these eselect-xvmc bugs?
Comment 6 Ulrich Müller gentoo-dev 2013-03-10 18:05:17 UTC
Yes, I think that we should fix it ourselves.

However, I just noticed that there are calls to get_libname and uname in global scope. This should be avoided, see eselect's developer guide:

.. Warning:: In ebuilds, global scope code can cause problems.
  In eselect modules, global scope code is **absolutely forbidden**.
  Your module *will* be sourced for tasks other than running your
  actions. For example, if ``eselect modules list`` is executed, your
  module will be sourced to obtain the description. Any code being run
  here would be a very bad thing.

So, could you move these calls to local scope of some function please? (Probably it would also improve performance if the output was cached in some variable, instead of calling uname a dozen times.)
Comment 7 Christoph Junghans (RETIRED) gentoo-dev 2013-03-10 20:53:01 UTC
(In reply to comment #6)
> So, could you move these calls to local scope of some function please?
> (Probably it would also improve performance if the output was cached in some
> variable, instead of calling uname a dozen times.)
How would one do that? get_libname is used to create the content of XVMCLIBS.
Would it be ok to do something to replace XVMCLIBS by function xvmclibs_options() ?
Comment 8 Ulrich Müller gentoo-dev 2013-03-10 21:36:34 UTC
(In reply to comment #7)
> > So, could you move these calls to local scope of some function please?
> > (Probably it would also improve performance if the output was cached in some
> > variable, instead of calling uname a dozen times.)
> How would one do that? get_libname is used to create the content of XVMCLIBS.
> Would it be ok to do something to replace XVMCLIBS by function
> xvmclibs_options() ?

I'd just move the variable assignment into an init function that is called at the beginning of all do_* functions.
Comment 9 Doug Goldstein (RETIRED) gentoo-dev 2013-03-10 23:49:57 UTC
(In reply to comment #5)
> @ulm: it is nearly 4 months later, how long should we wait for the OK to fix
> all these eselect-xvmc bugs?

Yes please. Go for it, I've been too busy to really look into this.
Comment 10 Christoph Junghans (RETIRED) gentoo-dev 2013-03-11 02:15:55 UTC
@ulm: I added it to proj/eselect.git, please have a look if you agree with the solution.
Comment 11 Ulrich Müller gentoo-dev 2013-03-11 07:37:52 UTC
(In reply to comment #10)
> @ulm: I added it to proj/eselect.git, please have a look if you agree with
> the solution.

I've made a small change, namely replaced the uname -s call by the OSTYPE variable, which is faster (and more reliable):
http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=59a88458c795674b63f5d668695712a2c063d9ab

See also this commit for a similar change elsewhere:
http://git.overlays.gentoo.org/gitweb/?p=proj/eselect.git;a=commit;h=40f82c2ca4450db7fbc70c3e281361deb8fc8e90
Comment 12 Christoph Junghans (RETIRED) gentoo-dev 2013-03-11 14:37:24 UTC
+*eselect-xvmc-0.4 (11 Mar 2013)
+
+  11 Mar 2013; Christoph Junghans <ottxor@gentoo.org> +eselect-xvmc-0.4.ebuild,
+  +files/eselect-xvmc-0.4.eselect, metadata.xml:
+  version bump (fixes bugs #393027, #292120 and #434518)