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
Created attachment 182649 [details, diff] Patch to show how ebuild can be changed.
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.
(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.
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.
(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
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?
(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.
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.
This bug was fixed by loki_val's commit on 11/04/09, and can now be closed.
(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..