Gentoo Development Guide
VCS-SNAPSHOT.ECLASS
Section: portage (5)Updated: Apr 2018
Index Return to Main Contents
NAME
vcs-snapshot.eclass - support eclass for unpacking VCS snapshot tarballsDESCRIPTION
This eclass provides a convenience src_unpack() which does unpack all the tarballs in SRC_URI to locations matching their (local) names, discarding the original parent directory.The typical use case are VCS snapshots, coming from bitbucket and similar services. They have hash appended to the directory name which makes extracting them a painful experience. But if you just use a SRC_URI arrow to rename it (which you're likely have to do anyway), vcs-snapshot will just extract it into a matching directory.
Please note that this eclass handles only tarballs (.tar, .tar.gz, .tar.bz2 & .tar.xz). For any other file format (or suffix) it will fall back to regular unpack. Support for additional formats may be added at some point so please keep your SRC_URIs clean.
Note: this eclass is no longer needed with the new-style 'archive' GitHub URLs. They have sane directory names and stable contents, so you should really prefer them.
EXAMPLE
EAPI=6 inherit vcs-snapshot SRC_URI="https://github.com/example/${PN}/tarball/v${PV} -> ${P}.tar.gz https://github.com/example/${PN}-otherstuff/tarball/v${PV} -> ${P}-otherstuff.tar.gz"
and however the tarballs were originally packed, all files will appear in ${WORKDIR}/${P} and ${WORKDIR}/${P}-otherstuff respectively.
FUNCTIONS
- vcs-snapshot_src_unpack
- Extract all the archives from ${A}. The .tar, .tar.gz, .tar.bz2 and .tar.xz archives will be unpacked to directories matching their local names. Other archive types will be passed down to regular unpack.
MAINTAINERS
mgorny@gentoo.org
REPORTING BUGS
Please report bugs via https://bugs.gentoo.org/FILES
vcs-snapshot.eclassSEE ALSO
ebuild(5)https://gitweb.gentoo.org/repo/gentoo.git/log/eclass/vcs-snapshot.eclass
Index
This document was created by man2html, using the manual pages.
Time: 03:25:07 GMT, April 20, 2018