Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 389691 - app-misc/hivex-1.3.2: needs cleanup and wrong deps, QA issues
Summary: app-misc/hivex-1.3.2: needs cleanup and wrong deps, QA issues
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Andreis Vinogradovs ( slepnoga )
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-06 05:45 UTC by Peter Volkov (RETIRED)
Modified: 2012-02-24 12:35 UTC (History)
2 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Volkov (RETIRED) gentoo-dev 2011-11-06 05:45:52 UTC
Maxim, please, do thorough review of ebuilds you commit into tree. Don't expect users to check for everything and thus at very least review ebuild itself! Also make sure to open package's readme, review configure.ac and other stuff you were warned about during doing quizzes ;)

So.
1. Drop redundant space in inherit line
2. Fix quotation in DESCRIPTION.
3. PYTHON_DEPEND="python? 2:2.6"

pkg_config() {
    python_set_active_version 2
    python_need_rebuild
}

Call only required functions when required.
4. 
inherit base autotools-utils  perl-app python

PYTHON_DEPEND="python? 2:2.6"

This construction is completely broken and ebuild will never depend on python:2.6. Also nevertheless of broken dependency this package builds fine with python:2.7. Why we need dependency on 2.6?

Also please, fix this QA:

 * QA Notice: command not found:
 * 
 * 	./run-python-tests: line 25: srcdir: command not found
 * QA Notice: make jobserver unavailable:
 * 
 * 	make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.
 * 	make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent make rule.


Really simple ebuild review and emerge test is a MUST!
Comment 1 Maxim Koltsov (RETIRED) gentoo-dev 2011-11-06 07:45:11 UTC
(In reply to comment #0)
> Maxim, please, do thorough review of ebuilds you commit into tree. Don't expect
> users to check for everything and thus at very least review ebuild itself! Also
> make sure to open package's readme, review configure.ac and other stuff you
> were warned about during doing quizzes ;)

I always do that, but my attention needs improvement :)

> So.
> 1. Drop redundant space in inherit line
Done
> 2. Fix quotation in DESCRIPTION.
Done

> pkg_config() {
>     python_set_active_version 2
>     python_need_rebuild
> }
>
> Call only required functions when required.

Hivex installs it's library only for active python, so it must be rebuilt after changing of default python interpreter. Do you think we must implement building for multiple python ABIS?

> 4. 
> inherit base autotools-utils  perl-app python
> 
> PYTHON_DEPEND="python? 2:2.6"
> 
> This construction is completely broken and ebuild will never depend on
> python:2.6. Also nevertheless of broken dependency this package builds fine
> with python:2.7. Why we need dependency on 2.6?

This is completely valid. Look at python.eclass:
#   PYTHON_DEPEND:             [[!]USE_flag? ]<version_components_group>[ version_components_group]
#   version_components_group:  <major_version[:[minimal_version][:maximal_version]]>
So 2.6 here is minimal version for depend. The only issue with it is that it must be placed before inherit. Fixed that now.

> Also please, fix this QA:
> 
>  * QA Notice: command not found:
>  * 
>  *     ./run-python-tests: line 25: srcdir: command not found
>  * QA Notice: make jobserver unavailable:
>  * 
>  *     make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent
> make rule.
>  *     make[3]: warning: jobserver unavailable: using -j1.  Add `+' to parent
> make rule.

Hm, i don't get this errors. You probably have FEATURES="test"?
Comment 2 Peter Volkov (RETIRED) gentoo-dev 2011-11-06 07:51:56 UTC
(In reply to comment #1)
> > So.
> > 1. Drop redundant space in inherit line
> Done
> > 2. Fix quotation in DESCRIPTION.
> Done
> 
> > pkg_config() {
> >     python_set_active_version 2
> >     python_need_rebuild
> > }

No need to run python functions in case python is not in DEPEND:
PYTHON_DEPEND="python? 2:2.6"

> > 4. 
> > inherit base autotools-utils  perl-app python
> > 
> > PYTHON_DEPEND="python? 2:2.6"
> 
> This is completely valid. 

Not at all. PYTHON_DEPEND must be defined before eclass inheritance. In this case it wont work at all.

> > Also please, fix this QA:

> Hm, i don't get this errors. You probably have FEATURES="test"?

Sure.
Comment 3 Maxim Koltsov (RETIRED) gentoo-dev 2011-11-06 08:14:04 UTC
(In reply to comment #2)
> (In reply to comment #1)
> > > So.
> > > 1. Drop redundant space in inherit line
> > Done
> > > 2. Fix quotation in DESCRIPTION.
> > Done
> > 
> > > pkg_config() {
> > >     python_set_active_version 2
> > >     python_need_rebuild
> > > }
> 
> No need to run python functions in case python is not in DEPEND:
> PYTHON_DEPEND="python? 2:2.6"

All right, i fixed that.

> > > 4. 
> > > inherit base autotools-utils  perl-app python
> > > 
> > > PYTHON_DEPEND="python? 2:2.6"
> > 
> > This is completely valid. 
> 
> Not at all. PYTHON_DEPEND must be defined before eclass inheritance. In this
> case it wont work at all.

Already fixed.

> > > Also please, fix this QA:
> 
> > Hm, i don't get this errors. You probably have FEATURES="test"?
> 
> Sure.

This remains an open issue, as i can't reproduce, even with FEATURES="test".
Comment 4 Arfrever Frehtes Taifersar Arahesis 2011-11-06 08:37:59 UTC
Call python_set_active_version() in pkg_setup(), not pkg_config().
Call python_need_rebuild() in any phase (e.g. src_install()) different than pkg_pretend(), src_test(), pkg_config(), pkg_info(), pkg_prerm() and pkg_postrm().
Comment 5 Maxim Koltsov (RETIRED) gentoo-dev 2011-11-06 09:09:42 UTC
(In reply to comment #4)
> Call python_set_active_version() in pkg_setup(), not pkg_config().
> Call python_need_rebuild() in any phase (e.g. src_install()) different than
> pkg_pretend(), src_test(), pkg_config(), pkg_info(), pkg_prerm() and
> pkg_postrm().

Fixed, thanks.
Comment 6 Arfrever Frehtes Taifersar Arahesis 2011-11-06 17:12:33 UTC
(In reply to comment #5)

You haven't tested your change. You are calling python_need_rebuild() without calling python_pkg_setup(), which triggers "python_pkg_setup() not called" error.
(python_pkg_setup() should be called after potential call to python_set_active_version().)

--- hivex-1.3.2.ebuild
+++ hivex-1.3.2.ebuild
@@ -43,6 +43,7 @@
 pkg_setup() {
        if use python; then
                python_set_active_version 2
+               python_pkg_setup
                python_need_rebuild
        fi
 }
Comment 7 Maxim Koltsov (RETIRED) gentoo-dev 2011-11-10 12:53:08 UTC
(In reply to comment #6)
> (In reply to comment #5)
> 
> You haven't tested your change. You are calling python_need_rebuild() without
> calling python_pkg_setup(), which triggers "python_pkg_setup() not called"
> error.
> (python_pkg_setup() should be called after potential call to
> python_set_active_version().)
> 
> --- hivex-1.3.2.ebuild
> +++ hivex-1.3.2.ebuild
> @@ -43,6 +43,7 @@
>  pkg_setup() {
>         if use python; then
>                 python_set_active_version 2
> +               python_pkg_setup
>                 python_need_rebuild
>         fi
>  }

Done, thanks.
Comment 8 Andreis Vinogradovs ( slepnoga ) 2011-11-16 22:00:12 UTC
Peter, please test and reopen If you find errors.
Thanks to Arfrever for more fix and comment.