Gentoo Archives: gentoo-dev

From: "Michał Górny" <mgorny@g.o>
To: gentoo-dev@l.g.o
Cc: "Michał Górny" <mgorny@g.o>
Subject: [gentoo-dev] [PATCH 2/5] vcs-snapshot.eclass: Update 'unusage' warning
Date: Thu, 25 Jul 2019 06:25:47
Message-Id: 20190725062504.30140-2-mgorny@gentoo.org
In Reply to: [gentoo-dev] [PATCH 1/5] vcs-snapshot.eclass: Allow EAPI 7 by "Michał Górny"
1 Nowadays both GitHub and GitLab snapshot do not need this eclass,
2 so make it clear it's needed only for BitBucket. Also make the warning
3 uppercase because people still don't read it.
4
5 Signed-off-by: Michał Górny <mgorny@g.o>
6 ---
7 eclass/vcs-snapshot.eclass | 33 ++++++++++++++++++---------------
8 1 file changed, 18 insertions(+), 15 deletions(-)
9
10 diff --git a/eclass/vcs-snapshot.eclass b/eclass/vcs-snapshot.eclass
11 index 321e307b894d..2e734c509d1a 100644
12 --- a/eclass/vcs-snapshot.eclass
13 +++ b/eclass/vcs-snapshot.eclass
14 @@ -7,33 +7,36 @@
15 # @SUPPORTED_EAPIS: 0 1 2 3 4 5 6 7
16 # @BLURB: support eclass for unpacking VCS snapshot tarballs
17 # @DESCRIPTION:
18 +# THIS ECLASS IS NOT NECESSARY FOR MODERN GITHUB AND GITLAB SNAPSHOTS.
19 +# THEIR DIRECTORY STRUCTURE IS ENTIRELY PREDICTABLE, SO UPDATE YOUR
20 +# EBUILD TO USE /ARCHIVE/ URI AND SET S IF NECESSARY.
21 +#
22 # This eclass provides a convenience src_unpack() which does unpack all
23 # the tarballs in SRC_URI to locations matching their (local) names,
24 # discarding the original parent directory.
25 #
26 -# The typical use case are VCS snapshots, coming from bitbucket
27 -# and similar services. They have hash appended to the directory name
28 -# which makes extracting them a painful experience. But if you just use
29 -# a SRC_URI arrow to rename it (which you're likely have to do anyway),
30 -# vcs-snapshot will just extract it into a matching directory.
31 +# The typical use case are VCS tag snapshots coming from BitBucket
32 +# (but not GitHub or GitLab). They have hash appended to the directory
33 +# name which makes extracting them a painful experience. But if you are
34 +# using a SRC_URI arrow to rename them (which quite likely you have to
35 +# do anyway), vcs-snapshot will just extract them into matching
36 +# directories.
37 #
38 # Please note that this eclass handles only tarballs (.tar, .tar.gz,
39 -# .tar.bz2 & .tar.xz). For any other file format (or suffix) it will
40 -# fall back to regular unpack. Support for additional formats may be
41 -# added at some point so please keep your SRC_URIs clean.
42 -#
43 -# Note: this eclass is no longer needed with the new-style 'archive'
44 -# GitHub URLs. They have sane directory names and stable contents,
45 -# so you should really prefer them.
46 +# .tar.bz2 & .tar.xz). For any other file format (or suffix) it will
47 +# fall back to regular unpack. Support for additional formats may be
48 +# added in the future if necessary.
49 #
50 # @EXAMPLE:
51 #
52 # @CODE
53 -# EAPI=6
54 +# EAPI=7
55 # inherit vcs-snapshot
56 #
57 -# SRC_URI="https://github.com/example/${PN}/tarball/v${PV} -> ${P}.tar.gz
58 -# https://github.com/example/${PN}-otherstuff/tarball/v${PV} -> ${P}-otherstuff.tar.gz"
59 +# SRC_URI="
60 +# https://bitbucket.org/foo/bar/get/${PV}.tar.bz2 -> ${P}.tar.bz2
61 +# https://bitbucket.org/foo/bar-otherstuff/get/${PV}.tar.bz2
62 +# -> ${P}-otherstuff.tar.bz2"
63 # @CODE
64 #
65 # and however the tarballs were originally packed, all files will appear
66 --
67 2.22.0