Line
Link Here
|
0 |
-- python-updater |
0 |
++ python-updater |
Lines 34-40
Link Here
|
34 |
VERBOSE=0 |
34 |
VERBOSE=0 |
35 |
PKGS_TO_REMERGE="" |
35 |
PKGS_TO_REMERGE="" |
36 |
PKGS_COUNT_REMERGE=0 |
36 |
PKGS_COUNT_REMERGE=0 |
37 |
PORTAGE_PYTHON="/usr/bin/python" |
|
|
38 |
PYTHON_VERSIONS="3.2 3.1 3.0 2.7 2.6 2.5 2.4 2.3 2.2 2.1" |
37 |
PYTHON_VERSIONS="3.2 3.1 3.0 2.7 2.6 2.5 2.4 2.3 2.2 2.1" |
39 |
|
38 |
|
40 |
SUPPORTED_PMS="portage pkgcore paludis" |
39 |
SUPPORTED_PMS="portage pkgcore paludis" |
Lines 132-157
Link Here
|
132 |
return 1 |
131 |
return 1 |
133 |
} |
132 |
} |
134 |
|
133 |
|
135 |
# get_portage_python(oldpy,newpy) |
|
|
136 |
# Find where portage is, in pythonX.Y or somewhere else? |
137 |
get_portage_python() { |
138 |
if [[ $# -lt 2 ]]; then |
139 |
eerror "get_portage_python(): Missing arguments." |
140 |
exit 1 |
141 |
fi |
142 |
local oldpy="$1" newpy="$2" |
143 |
|
144 |
pybin=/usr/bin/python |
145 |
for py in ${pybin} ${pybin}${oldpy} ${pybin}${newpy}; do |
146 |
if ${py} -c "import portage" > /dev/null 2>&1; then |
147 |
echo -n "${py}" |
148 |
return 0 |
149 |
fi |
150 |
done |
151 |
eerror "Couldn't determine portage python" |
152 |
return 1 |
153 |
} |
154 |
|
155 |
# get_portage_portdir() |
134 |
# get_portage_portdir() |
156 |
# Check if portage knows about PORTDIR and return it |
135 |
# Check if portage knows about PORTDIR and return it |
157 |
get_portage_portdir() { |
136 |
get_portage_portdir() { |
Lines 294-304
Link Here
|
294 |
fi |
273 |
fi |
295 |
fi |
274 |
fi |
296 |
|
275 |
|
297 |
# Get portage python |
|
|
298 |
PORTAGE_PYTHON="$(get_portage_python ${OLD_PY_VER} ${NEW_PY_VER})" |
299 |
[[ $? != 0 ]] && exit 1 |
300 |
|
301 |
|
302 |
einfo "Starting Python Updater from ${OLD_PY_VER} to ${NEW_PY_VER} :" |
276 |
einfo "Starting Python Updater from ${OLD_PY_VER} to ${NEW_PY_VER} :" |
303 |
if [[ CHECK_SONAME -ne 0 ]]; then |
277 |
if [[ CHECK_SONAME -ne 0 ]]; then |
304 |
if ! type -P scanelf >/dev/null 2>&1; then |
278 |
if ! type -P scanelf >/dev/null 2>&1; then |