mirror of
https://github.com/clearlinux/bundle-chroot-builder.git
synced 2026-06-29 17:15:49 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4225b901a9 | |||
| dee894f28d | |||
| 9919c1523f |
@@ -302,15 +302,19 @@ def create_chroots(args, state_dir, bundles, yum_conf):
|
||||
versionurl = conf['VERSIONURL']
|
||||
formatname = conf['FORMAT']
|
||||
|
||||
print("Adding SWUPD default values to '{}' bundle...".format(bundlename))
|
||||
"""Do not add a leading slash on anything except the first variable in os.path.join!"""
|
||||
confpath = os.path.join(out_dir, bundlename, "usr/share/defaults/swupd/")
|
||||
os.makedirs(confpath, exist_ok=True)
|
||||
with open(os.path.join(confpath, "contenturl"), "w") as file:
|
||||
file.writelines(contenturl)
|
||||
print(" contenturl: {}".format(contenturl))
|
||||
with open(os.path.join(confpath, "versionurl"), "w") as file:
|
||||
file.writelines(versionurl)
|
||||
print(" versionurl: {}".format(versionurl))
|
||||
with open(os.path.join(confpath, "format"), "w") as file:
|
||||
file.writelines(formatname)
|
||||
print(" format: {}".format(formatname))
|
||||
|
||||
print("Creating package to file mappings")
|
||||
package_mapping = {}
|
||||
@@ -321,14 +325,14 @@ def create_chroots(args, state_dir, bundles, yum_conf):
|
||||
# real package's filename I'm using it instead of recursing through
|
||||
# temporary per bundle folders
|
||||
package_name = map_file[map_file.find(" * ") + 3:-len(".src.rpm")]
|
||||
with open(out_dir + "/" + map_file, "r") as file:
|
||||
with open(out_dir + "/" + map_file, "rb") as file:
|
||||
path_list = file.readlines()
|
||||
if package_name not in package_mapping:
|
||||
package_mapping[package_name] = set()
|
||||
for path in path_list:
|
||||
package_mapping[package_name].add(path)
|
||||
for package_name, paths in package_mapping.items():
|
||||
with open(out_dir + "/files-{}".format(package_name), "w") as file:
|
||||
with open(out_dir + "/files-{}".format(package_name), "wb") as file:
|
||||
file.writelines(sorted(paths))
|
||||
for map_file in map_files:
|
||||
os.unlink(out_dir + "/" + map_file)
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
AC_PREREQ([2.68])
|
||||
AC_INIT([bundle-chroot-builder],[1.04],[tudor.marcu@intel.com],[bundle-chroot-builder])
|
||||
AC_INIT([bundle-chroot-builder],[1.05],[tudor.marcu@intel.com],[bundle-chroot-builder])
|
||||
AM_INIT_AUTOMAKE([foreign silent-rules color-tests no-dist-gzip dist-xz])
|
||||
AC_CONFIG_FILES(Makefile)
|
||||
AC_PREFIX_DEFAULT(/usr/local)
|
||||
|
||||
Reference in New Issue
Block a user