Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Dependency with RDEPEND -> depclean problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
Wuodan
n00b
n00b


Joined: 21 May 2012
Posts: 23

PostPosted: Mon Jun 25, 2012 3:41 pm    Post subject: Dependency with RDEPEND -> depclean problem Reply with quote

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
View user's profile Send private message
gienah
Developer
Developer


Joined: 24 Nov 2010
Posts: 60
Location: AU

PostPosted: Tue Jun 26, 2012 4:18 am    Post subject: Reply with quote

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
View user's profile Send private message
Wuodan
n00b
n00b


Joined: 21 May 2012
Posts: 23

PostPosted: Wed Jun 27, 2012 9:00 pm    Post subject: Reply with quote

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
View user's profile Send private message
Genone
Retired Dev
Retired Dev


Joined: 14 Mar 2003
Posts: 8861
Location: beyond the rim

PostPosted: Thu Jun 28, 2012 6:52 am    Post subject: Reply with quote

Maybe post your ebuilds, with just fractional pieces of information helping is complicated.
Back to top
View user's profile Send private message
dol-sen
Developer
Developer


Joined: 30 Jun 2002
Posts: 2367
Location: Richmond, BC, Canada

PostPosted: Thu Jun 28, 2012 2:38 pm    Post subject: Reply with quote

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
View user's profile Send private message
gienah
Developer
Developer


Joined: 24 Nov 2010
Posts: 60
Location: AU

PostPosted: Thu Jun 28, 2012 2:57 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum