Merge pull request #118 from kinvolk/krnowak/portage-update

portage update: port check_root to python3 and fix SDK bootstrap
This commit is contained in:
Krzesimir Nowak 2021-02-15 12:47:26 +01:00 committed by GitHub
commit 91a85ddc86
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 13 additions and 14 deletions

View File

@ -91,8 +91,8 @@ if [[ "$STAGES" =~ stage4 ]]; then
release_name="${TYPE}-${ARCH}-${FLAGS_version}.tar.bz2"
build_image="${BUILDS}/${build_name}"
release_image="${BUILDS}/${release_name}"
build_contents="${build_image}.CONTENTS"
release_contents="${release_image}.CONTENTS"
build_contents="${build_image}.CONTENTS.gz"
release_contents="${release_image}.CONTENTS.gz"
build_digests="${build_image}.DIGESTS"
release_digests="${release_image}.DIGESTS"
ln -f "${build_image}" "${release_image}"

View File

@ -1,11 +1,9 @@
#!/usr/bin/python
#!/usr/bin/python3
# Copyright (c) 2015 The CoreOS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
from __future__ import unicode_literals
import fnmatch
import os
import stat
@ -106,12 +104,12 @@ IGNORE_MISSING = {
USR_LINKS = ("/bin/", "/sbin/", "/lib/", "/lib32/", "/lib64/")
IGNORE_SHEBANG = (
b"*/python[0-9].[0-9]/cgi.py",
b"*/usr/lib64/modules/*/source/scripts/*",
b"*/usr/share/nova-agent/*/etc/gentoo/nova-agent",
b"*/tmp/*",
b"*/Documentation/*",
b"*/doc/*",
"*/python[0-9].[0-9]/cgi.py",
"*/usr/lib64/modules/*/source/scripts/*",
"*/usr/share/nova-agent/*/etc/gentoo/nova-agent",
"*/tmp/*",
"*/Documentation/*",
"*/doc/*",
)
IGNORE_SYMLINK = (
@ -145,7 +143,7 @@ def provided_sonames():
def ignore_sonames(cpv):
for key in dep.match_to_list(cpv, IGNORE_MISSING.iterkeys()):
for key in dep.match_to_list(cpv, IGNORE_MISSING.keys()):
for atom in IGNORE_MISSING[key]:
yield atom
@ -231,10 +229,11 @@ def check_shebang():
continue
if not is_exe(path):
continue
with open(path, "r") as fd:
with open(path, "rb") as fd:
line = fd.readline(80)
if not line.startswith(b"#!"):
continue
line = line.decode('utf-8')
args = line[2:].rstrip().split(None, 2)
cmd = args.pop(0)
if cmd in ('/usr/bin/env', '/bin/env') and args:

View File

@ -1,5 +1,5 @@
#!/usr/bin/python2
# needs to be python2 for portage
# TODO: This script needs porting to python3, since portage is also in python3 now.
# Prints out a list of all packages in portage-stable and how they stand relative to gentoo upstream