Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 516644 - mercurial.eclass: Provide a variable EHG_CHECKOUT_DIR to override checkout destination
Summary: mercurial.eclass: Provide a variable EHG_CHECKOUT_DIR to override checkout de...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Eclasses (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Christoph Junghans (RETIRED)
URL:
Whiteboard:
Keywords: Inclusion, PATCH
Depends on:
Blocks:
 
Reported: 2014-07-07 21:55 UTC by Matthias Maier
Modified: 2014-07-25 23:18 UTC (History)
1 user (show)

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


Attachments
patch against gx86 version (mercurial.eclass.patch,2.64 KB, patch)
2014-07-14 03:17 UTC, Christoph Junghans (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matthias Maier gentoo-dev 2014-07-07 21:55:59 UTC
The git eclass has a variable EGIT_SOURCEDIR defaulting to ${S} to explicitly override the checkout location.

This is extremely useful for repositories where the actual sources reside under a subdirectory. The normal approach is to set ${S} to the full path to the appropriate subdirectory:

  EHG_REPO_URI="[...]"
  S="${WORKDIR}/${P}/sudirectory_containing_sources"

But with this, the mercurial eclass tries to copy the checkout to ${S} and, consequently, this approach fails. With an EHG_SOURCEDIR variable that explicitly sets the checkout location this would be easily possible:

  EHG_REPO_URI="[...]"
  EHG_SOURCEDIR="${WORKDIR}/${P}"
  S="${WORKDIR}/${P}/sudirectory_containing_sources"

Without, I see no viable solution for this problem except for manual movement of directories in the src_prepare stage, which is clumsy.

Reproducible: Always
Comment 1 Christoph Junghans (RETIRED) gentoo-dev 2014-07-08 14:50:41 UTC
One could call mercurial_fetch in src_unpack, but it might be more useful and consistent with git-r3 to add a EGIT_CHECKOUT_DIR variable.
Comment 2 Christoph Junghans (RETIRED) gentoo-dev 2014-07-14 03:17:18 UTC
Created attachment 380690 [details, diff]
patch against gx86 version

Have a look if you like that.
Comment 3 Christoph Junghans (RETIRED) gentoo-dev 2014-07-25 23:18:34 UTC
+  25 Jul 2014; Christoph Junghans <ottxor@gentoo.org> mercurial.eclass:
+  Added EHG_CHECKOUT_DIR to override checkout destination
+