Import GTK in preparation for rules_python
We currently import GTK libraries as part of the "python_gtk" repo.
That pulls in GTK, but also Python and a bunch of pip packages.
This patch makes it so that GTK is pulled in via a dedicated repo.
That allows us to have dedicated repos for pip packages via
rules_python.
Future patches will make use of the new GTK import.
I had to modify `download_packages.py` in order to ensure that `libc6`
really got excluded from the final tarball. On James' personal
machines, he observed stack smashing crashes when `libc` is in the
tarball. The `force_includes` usage pulled in `libc6` even though we
don't want it to.
Signed-off-by: Philipp Schrader <philipp.schrader@gmail.com>
Change-Id: Ia3ecf51e4bd4c7aa0e72646e4c2af738f6086c01
diff --git a/debian/download_packages.py b/debian/download_packages.py
index 6d548b5..d012ff6 100755
--- a/debian/download_packages.py
+++ b/debian/download_packages.py
@@ -105,12 +105,15 @@
yield package
-def download_deps(apt_args, packages, excludes, force_includes):
+def download_deps(apt_args, packages, excludes, force_includes,
+ force_excludes):
deps = get_all_deps(apt_args, packages)
exclude_deps = get_all_deps(apt_args, excludes)
deps -= exclude_deps
force_include_deps = get_all_deps(apt_args, force_includes)
deps |= force_include_deps
+ force_exclude_deps = get_all_deps(apt_args, force_excludes)
+ deps -= force_exclude_deps
env = dict(os.environ)
del env['LD_LIBRARY_PATH']
subprocess.check_call([b"apt-get"] + [a.encode('utf-8')
@@ -173,6 +176,13 @@
action="append",
help=
"Force include this and its dependencies. Even if listed in excludes.")
+ parser.add_argument(
+ "--force-exclude",
+ type=str,
+ action="append",
+ help=
+ "Force exclude this and its dependencies. Even if listed via --force-include."
+ )
parser.add_argument("--arch",
type=str,
default="amd64",
@@ -214,7 +224,8 @@
# Exclude common packages that don't make sense to include in everything all
# the time.
excludes += _ALWAYS_EXCLUDE
- download_deps(apt_args, args.package, excludes, args.force_include)
+ download_deps(apt_args, args.package, excludes, args.force_include,
+ args.force_exclude)
fixup_files()
print_file_list()
print("Your packages are all in %s" % folder)