Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 259708 - app-office/gnucash - Use EAPI 2 in place of built_with_use
Summary: app-office/gnucash - Use EAPI 2 in place of built_with_use
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: High minor (vote)
Assignee: GNOME Office (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on: 265154
Blocks:
  Show dependency tree
 
Reported: 2009-02-20 13:15 UTC by Alet Roux
Modified: 2009-04-13 15:52 UTC (History)
1 user (show)

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


Attachments
Patch to show how ebuild can be changed. (gnucash-2.2.7.ebuild.patch,1.57 KB, patch)
2009-02-20 13:17 UTC, Alet Roux
Details | Diff
Correct update to EAPI 2 (gnucash-2.2.7.ebuild.patch,1.56 KB, patch)
2009-02-24 14:09 UTC, Alet Roux
Details | Diff
Patch to remove built_with_use for libgsf, as it is an indirect dep (gnucash-2.2.9.ebuild.patch,818 bytes, patch)
2009-04-06 21:28 UTC, David King
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alet Roux 2009-02-20 13:15:05 UTC
Hi, this is a new version of the gnucash ebuild that lets Portage automagically re-emerge any dependencies with the wrong USE flags. This shortens the ebuild and makes the user's life a lot easier. Hope it's useful.

Reproducible: Always

Steps to Reproduce:
1. USE=-gnome emerge libgsf goffice
2. emerge =sys-apps/portage-2.1.6.4
3. emerge gnucash

Actual Results:  
Had to manually re-emerge gnome-extra/libgsf and x11-libs/goffice with the "gnome" USE flag and re-emerge gnucash.

Expected Results:  
Portage automatically re-emerges libgsf and goffice
Comment 1 Alet Roux 2009-02-20 13:17:35 UTC
Created attachment 182649 [details, diff]
Patch to show how ebuild can be changed.
Comment 2 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-02-20 14:17:18 UTC
you forgot to add EAPI="2" in your diff. Also need to check that all revisions of the ebuilds you want to add USE dependencies on have the use flag on all revisions because otherwise the behavior would be undefined.
Comment 3 Alet Roux 2009-02-20 14:58:34 UTC
(In reply to comment #2)
> you forgot to add EAPI="2" in your diff. Also need to check that all revisions
> of the ebuilds you want to add USE dependencies on have the use flag on all
> revisions because otherwise the behavior would be undefined.
> 

Thanks Gilles for the suggestions. Am afraid I don't know how to implement your second suggestion - probably because this is beyond my Portage expertise.
Comment 4 Alet Roux 2009-02-24 14:09:45 UTC
Created attachment 183012 [details, diff]
Correct update to EAPI 2

Have done some reading, and am now able to address Gilles' suggestions. The corrected patch is attached.

First of all, all packages  satisfying ">=x11-libs/goffice-0.6" have the "gnome" USE flag:

alet@roux ~ $ grep IUSE /usr/portage/x11-libs/goffice/*
/usr/portage/x11-libs/goffice/goffice-0.2.1.ebuild:IUSE="gnome"
/usr/portage/x11-libs/goffice/goffice-0.4.3.ebuild:IUSE="doc gnome"
/usr/portage/x11-libs/goffice/goffice-0.6.4.ebuild:IUSE="doc gnome"
/usr/portage/x11-libs/goffice/goffice-0.6.5.ebuild:IUSE="doc gnome"
/usr/portage/x11-libs/goffice/goffice-0.6.6.ebuild:IUSE="doc gnome"

Second, all packages satisfying ">=dev-scheme/guile-1.8.3" have the "regex" and "deprecated" USE flags:

alet@roux ~ $ grep IUSE /usr/portage/dev-scheme/guile/*
/usr/portage/dev-scheme/guile/guile-1.6.8.ebuild:IUSE=""
/usr/portage/dev-scheme/guile/guile-1.8.2.ebuild:IUSE="networking regex discouraged deprecated elisp nls debug-freelist debug-malloc debug threads"
/usr/portage/dev-scheme/guile/guile-1.8.3.ebuild:IUSE="networking regex discouraged deprecated elisp nls debug-freelist debug-malloc debug threads"
/usr/portage/dev-scheme/guile/guile-1.8.3-r1.ebuild:IUSE="networking regex discouraged deprecated elisp nls debug-freelist debug-malloc debug threads"
/usr/portage/dev-scheme/guile/guile-1.8.3-r2.ebuild:IUSE="networking regex discouraged deprecated elisp nls debug-freelist debug-malloc debug threads"
/usr/portage/dev-scheme/guile/guile-1.8.4.ebuild:IUSE="networking regex discouraged deprecated elisp nls debug-freelist debug-malloc debug threads"
/usr/portage/dev-scheme/guile/guile-1.8.4-r1.ebuild:IUSE="networking regex discouraged deprecated elisp nls debug-freelist debug-malloc debug threads"
/usr/portage/dev-scheme/guile/guile-1.8.5.ebuild:IUSE="networking regex discouraged deprecated elisp nls debug-freelist debug-malloc debug threads"
/usr/portage/dev-scheme/guile/guile-1.8.5-r1.ebuild:IUSE="networking regex discouraged deprecated elisp emacs nls debug-freelist debug-malloc debug threads"
/usr/portage/dev-scheme/guile/guile-1.8.6.ebuild:IUSE="networking regex discouraged deprecated elisp emacs nls debug-freelist debug-malloc debug threads"

Finally, all versions if gnome-extra/libgsf have the "gnome" USE flag:

alet@roux ~ $ grep IUSE /usr/portage/gnome-extra/libgsf/*
/usr/portage/gnome-extra/libgsf/libgsf-1.14.10.ebuild:IUSE="bzip2 doc gnome python"
/usr/portage/gnome-extra/libgsf/libgsf-1.14.11.ebuild:IUSE="bzip2 doc gnome python"
/usr/portage/gnome-extra/libgsf/libgsf-1.14.7.ebuild:IUSE="bzip2 doc gnome python"

However, it is not possible to build goffice with USE="gnome" without having already built libgsf with the USE="gnome", so it appears to me that this dependency is redundant. I have removed it from the ebuild.
Comment 5 Alet Roux 2009-02-24 14:17:10 UTC
(In reply to comment #4)
> However, it is not possible to build goffice with USE="gnome" without having
> already built libgsf with the USE="gnome", so it appears to me that this
> dependency is redundant. I have removed it from the ebuild.

Sorry, I don't normally make a habit of replying to my own comments ;-) I checked that every ebuild in x11-libs/goffice contains either

        if use gnome && ! built_with_use gnome-extra/libgsf gnome; then
                eerror "Please rebuild gnome-extra/libgsf with gnome support enabled"
                eerror "USE=\"gnome\" emerge gnome-extra/libgsf"
                eerror "or add  \"gnome\" to your USE string in /etc/make.conf"
                die "No Gnome support found in libgsf"
        fi

or

        if use gnome && ! built_with_use gnome-extra/libgsf gnome; then
                eerror "Please rebuild gnome-extra/libgsf with gnome support enabled"
                eerror "echo \"gnome-extra/libgsf gnome\" >> /etc/portage/package.use"
                eerror "or add  \"gnome\" to your USE string in /etc/make.conf"
                diemessage="No Gnome support found in libgsf."
        fi


Comment 6 David King 2009-03-12 20:59:47 UTC
gnucash-2.2.9.ebuild (in the tree as ~arch) uses EAPI 2 use-based dependencies. It still needs a couple more weeks in the tree to reach 30 days (26th March) but can 2.2.9 go stable rather than this improvement to 2.2.7?
Comment 7 David King 2009-03-25 17:30:45 UTC
(In reply to comment #6)
> gnucash-2.2.9.ebuild (in the tree as ~arch) uses EAPI 2 use-based dependencies.
> It still needs a couple more weeks in the tree to reach 30 days (26th March)
> but can 2.2.9 go stable rather than this improvement to 2.2.7?

As 2.2.9 with EAPI=2 is in the tree, this bug can now be closed.
Comment 8 David King 2009-04-06 21:28:02 UTC
Created attachment 187489 [details, diff]
Patch to remove built_with_use for libgsf, as it is an indirect dep

This patch removes the built_with_use check for libgsf, as it is not a direct dependency. Further, if goffice is built with USE="gnome", libgsf must have been built with USE="gnome", so just the goffice[gnome] dependency is sufficient.
Comment 9 David King 2009-04-13 07:13:09 UTC
This bug was fixed by loki_val's commit on 11/04/09, and can now be closed.
Comment 10 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-04-13 15:52:35 UTC
(In reply to comment #9)
> This bug was fixed by loki_val's commit on 11/04/09, and can now be closed.
> 

All ebuilds are EAPI=2, closing..