File tree Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Expand file tree Collapse file tree 3 files changed +21
-6
lines changed Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ plan on using it multiple times.
79
79
80
80
pkgdiff-mg
81
81
----------
82
- Dependencies: portage
82
+ Dependencies: portage, pkgcore
83
83
84
84
Calls ``ebuild(1) `` to extract archives for two specified ebuilds,
85
85
and then diffs the result. Does not handle ebuilds unpacking multiple
@@ -98,7 +98,7 @@ only the build system files::
98
98
99
99
pkgbump
100
100
-------
101
- Dependencies: portage, gentoolkit (ekeyword), git
101
+ Dependencies: portage, gentoolkit (ekeyword), git, pkgcore
102
102
103
103
Copies ebuild for a version bump, dropping keywords, updating Manifest
104
104
and running pkgdiff-mg _ to compare archives. Typical usage::
Original file line number Diff line number Diff line change 1
1
#! /usr/bin/env bash
2
2
3
+ for arg; do
4
+ if [[ ${arg} != * .ebuild ]]; then
5
+ echo " Incorrect filename: ${arg} "
6
+ exit 1
7
+ fi
8
+
9
+ filename=${arg##*/ }
10
+ version=$( patom -F ' %{fullver}' " =category/${arg% .ebuild} " )
11
+ if [[ -z ${version} ]]; then
12
+ echo " Incorrect filename: ${arg} "
13
+ exit 1
14
+ fi
15
+ done
16
+
3
17
set -e -x
4
18
5
19
scriptdir=${BASH_SOURCE%/* }
@@ -10,7 +24,7 @@ if grep -q "^PYTHON_COMPAT" "${2}" && type -P gpy-impl &>/dev/null; then
10
24
gpy-impl " ${2} " -python3_{8..9} || :
11
25
fi
12
26
# tell ebuilds we don't want everything
13
- export PKGBUMPING=1
27
+ export PKGBUMPING=${version}
14
28
GENTOO_MIRRORS= ebuild " ${2} " manifest
15
29
[[ ! -f Manifest ]] || git add Manifest
16
30
git add " ${2} "
Original file line number Diff line number Diff line change @@ -31,16 +31,17 @@ cat1=$(get_category "${1}")
31
31
cat2=$( get_category " ${2} " )
32
32
fn1=${1##*/ }
33
33
fn2=${2##*/ }
34
+ ver1=$( patom -F ' %{fullver}' " =${cat1} /${fn1% .ebuild} " )
35
+ ver2=$( patom -F ' %{fullver}' " =${cat2} /${fn2% .ebuild} " )
34
36
35
37
export PORTAGE_TMPDIR=" ${TMPDIR:-/ tmp} " /mgorny-dev-scripts
36
38
export USE=" ${USE} test"
37
39
# use noauto to skip pkg_setup
38
40
export FEATURES=" ${FEATURES} noauto"
39
41
# tell ebuilds we don't want everything
40
- export PKGBUMPING=1
41
42
mkdir -p " ${PORTAGE_TMPDIR} "
42
- ebuild " ${1} " unpack
43
- ebuild " ${2} " unpack
43
+ PKGBUMPING= ${ver1} ebuild " ${1} " unpack
44
+ PKGBUMPING= ${ver2} ebuild " ${2} " unpack
44
45
s1=$( sed -nr ' s/^declare -x S="(.*)"/\1/p' " ${PORTAGE_TMPDIR} " /portage/${cat1} /${fn1% .ebuild} /temp/environment)
45
46
s2=$( sed -nr ' s/^declare -x S="(.*)"/\1/p' " ${PORTAGE_TMPDIR} " /portage/${cat2} /${fn2% .ebuild} /temp/environment)
46
47
You can’t perform that action at this time.
0 commit comments