| View previous topic :: View next topic |
| Author |
Message |
Wuodan n00b

Joined: 21 May 2012 Posts: 23
|
Posted: Mon Jun 25, 2012 3:41 pm Post subject: Dependency with RDEPEND -> depclean problem |
|
|
I'm trying to learn how-to write ebuilds and need some help understanding using PDEPEND for a sub-package/plugin.
In my case, this leads to problems depcleaning the package or the sub-package => they must be depcleaned together like:
| Code: | | emerge --depclean package sub-package |
Depcleaning one of them alone will not work.
Example:
My peg-multimarkdown-9999.ebuild has a sub-package peg-multimarkdown-latex-support-9999.ebuild - some LaTeX templates.
These are not in a git sub-repository, thus they require a second ebuild-package (as far as I know).
My primary ebuild uses these LaTeX templates during src_compile() or actually the Makefile itself calls latexmk and then they must be present.
So the sub-package uses PDEPEND to ensure it is installed prior to the main package:
PDEPEND="${DEPEND} ${CATEGORY}/peg-multimarkdown[latex]"
And the main package uses DEPEND and/or RDEPEND, ... I tried both.
This leads to the mentioned problem:
| Code: | | emerge --depclean peg-multimarkdown | or | Code: | | emerge --depclean peg-multimarkdown-latex-support |
will not work, only this works:
| Code: | | emerge --depclean peg-multimarkdown peg-multimarkdown-latex-support |
My questions are:
- Do I really have to use a sub-ebuild? Can I not download from 2 git-repositories in one ebuild?
- How can the depclean problem be avoided while still ensuring that the plugin is installed first?
Thank you for your feedback/ideas! |
|
| Back to top |
|
 |
gienah Developer

Joined: 24 Nov 2010 Posts: 60 Location: AU
|
Posted: Tue Jun 26, 2012 4:18 am Post subject: |
|
|
Use the source, Luke. /usr/portage/eclass/git-2.eclass is easy to follow, and has useful comments like:
| Code: | # Support multiple values:
# EGIT_REPO_URI="git://a/b.git http://c/d.git"
|
|
|
| Back to top |
|
 |
Wuodan n00b

Joined: 21 May 2012 Posts: 23
|
Posted: Wed Jun 27, 2012 9:00 pm Post subject: |
|
|
No luck with that so far.
| Code: | | EGIT_REPO_URI="git://github.com/fletcher/${PN}.git git://github.com/fletcher/${PN}-latex-support.git" |
does only download the first git repo, switching their orders only the other.
I have to include 2 different git repos, seems the "Support multiple values" is for multiple urls for the same repo.
The main repo has submodules, these I can include with | Code: | | EGIT_HAS_SUBMODULES="Y" |
|
|
| Back to top |
|
 |
Genone Retired Dev


Joined: 14 Mar 2003 Posts: 8861 Location: beyond the rim
|
Posted: Thu Jun 28, 2012 6:52 am Post subject: |
|
|
| Maybe post your ebuilds, with just fractional pieces of information helping is complicated. |
|
| Back to top |
|
 |
dol-sen Developer


Joined: 30 Jun 2002 Posts: 2367 Location: Richmond, BC, Canada
|
Posted: Thu Jun 28, 2012 2:38 pm Post subject: |
|
|
Wuodan, forget the EGIT_REPO_URI= bit. IT is for multiple uri's for the same source, NOT for multiple sources. _________________ Brian
Porthole, the Portage GUI frontend irc@freenode: #gentoo-guis, #porthole, Blog
layman, gentoolkit, CoreBuilder, esearch... |
|
| Back to top |
|
 |
gienah Developer

Joined: 24 Nov 2010 Posts: 60 Location: AU
|
Posted: Thu Jun 28, 2012 2:57 pm Post subject: |
|
|
Hmm, I guess I only glanced at the source and thought it might do what you want, sorry. dol-sen just explained that to me on #gentoo-dev:
| Quote: | multiple SRC_URI in git-2.eclass is similar to layman's. It is for one source only and the first one that
works, is the one recorded in the clone. this allows for git: and http: protocol uri's to be listed for the same source.
|
An untested, probably crazy idea comes to mind, you could try calling it twice in your own src_unpack:
| Code: | EGIT_REPO_1="http://repo1.org/repo1.git"
EGIT_REPO_2="http://repo2.org/repo2.git"
# ...
src_unpack() {
EGIT_NONBARE="true"
EGIT_BRANCH="master"
EGIT_REPO_URI="${EGIT_REPO_1}"
git-2_src_unpack
EGIT_REPO_URI="${EGIT_REPO_2}"
git-2_src_unpack
}
|
|
|
| Back to top |
|
 |
|