Split out of #37344.
#include <linux/loop.h>
+#include "sd-bus.h"
#include "sd-messages.h"
#include "bus-common-errors.h"
#include "bus-locator.h"
#include "chase.h"
#include "conf-files.h"
-#include "constants.h"
#include "copy.h"
#include "data-fd-util.h"
#include "dirent-util.h"
#include "dissect-image.h"
#include "env-file.h"
#include "env-util.h"
-#include "errno-list.h"
+#include "errno-util.h"
#include "escape.h"
#include "extension-util.h"
+#include "extract-word.h"
#include "fd-util.h"
#include "fileio.h"
#include "fs-util.h"
+#include "glyph-util.h"
#include "install.h"
#include "iovec-util.h"
-#include "locale-util.h"
#include "log-context.h"
+#include "log.h"
#include "loop-util.h"
#include "mkdir.h"
-#include "nulstr-util.h"
#include "os-util.h"
#include "path-lookup.h"
#include "portable.h"
#include "string-table.h"
#include "strv.h"
#include "tmpfile-util.h"
-#include "user-util.h"
+#include "unit-name.h"
#include "vpick.h"
/* Markers used in the first line of our 20-portable.conf unit file drop-in to determine, that a) the unit file was
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "sd-bus.h"
-
#include "dissect-image.h"
-#include "hashmap.h"
-#include "macro.h"
+#include "forward.h"
#include "runtime-scope.h"
-#include "set.h"
#include "string-util.h"
typedef struct PortableMetadata {
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include <errno.h>
#include <getopt.h>
#include "sd-bus.h"
#include "bus-unit-util.h"
#include "bus-wait-for-jobs.h"
#include "chase.h"
-#include "constants.h"
-#include "dirent-util.h"
#include "env-file.h"
#include "fd-util.h"
#include "fileio.h"
#include "format-table.h"
#include "fs-util.h"
-#include "locale-util.h"
+#include "install.h"
#include "main-func.h"
#include "os-util.h"
#include "pager.h"
-#include "parse-argument.h"
#include "parse-util.h"
#include "path-util.h"
#include "polkit-agent.h"
#include "pretty-print.h"
#include "string-util.h"
#include "strv.h"
-#include "terminal-util.h"
#include "verbs.h"
static PagerFlags arg_pager_flags = 0;
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include "sd-bus.h"
+
#include "alloc-util.h"
#include "btrfs-util.h"
-#include "bus-common-errors.h"
+#include "bus-error.h"
#include "bus-object.h"
#include "bus-polkit.h"
#include "discover-image.h"
#include "fd-util.h"
+#include "hashmap.h"
#include "io-util.h"
+#include "log.h"
#include "portable.h"
#include "portabled.h"
#include "portabled-bus.h"
#include "portabled-image.h"
#include "portabled-image-bus.h"
#include "strv.h"
-#include "user-util.h"
static int property_get_pool_path(
sd_bus *bus,
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "sd-bus.h"
+#include "sd-bus-vtable.h"
-typedef struct PortableChange PortableChange;
+#include "portabled-forward.h"
extern const sd_bus_vtable manager_vtable[];
--- /dev/null
+/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#pragma once
+
+#include "forward.h" // IWYU pragma: export
+
+typedef struct Manager Manager;
+typedef struct Operation Operation;
+typedef struct PortableChange PortableChange;
#include <fcntl.h>
#include <sys/stat.h>
-#include <sys/types.h>
#include <unistd.h>
+#include "sd-bus.h"
+
#include "alloc-util.h"
#include "bus-common-errors.h"
#include "bus-get-properties.h"
-#include "bus-label.h"
#include "bus-object.h"
#include "bus-polkit.h"
#include "bus-util.h"
#include "discover-image.h"
#include "fd-util.h"
#include "fileio.h"
+#include "hashmap.h"
+#include "image-policy.h"
#include "io-util.h"
#include "os-util.h"
+#include "path-util.h"
#include "portable.h"
#include "portabled.h"
#include "portabled-bus.h"
#include "portabled-image.h"
#include "portabled-image-bus.h"
+#include "portabled-operation.h"
#include "process-util.h"
#include "strv.h"
-#include "user-util.h"
static BUS_DEFINE_PROPERTY_GET_ENUM(property_get_type, image_type, ImageType);
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "sd-bus.h"
+#include "sd-bus-vtable.h"
#include "bus-object.h"
-#include "discover-image.h"
-
-typedef struct Manager Manager;
+#include "portabled-forward.h"
int bus_image_common_get_os_release(Manager *m, sd_bus_message *message, const char *name_or_path, Image *image, sd_bus_error *error);
int bus_image_common_get_metadata(Manager *m, sd_bus_message *message, const char *name_or_path, Image *image, sd_bus_error *error);
/* SPDX-License-Identifier: LGPL-2.1-or-later */
-#include "portable.h"
+#include "sd-event.h"
+
+#include "discover-image.h"
+#include "hashmap.h"
#include "portabled.h"
#include "portabled-image.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "sd-bus.h"
-
-#include "discover-image.h"
-#include "hashmap.h"
-
-typedef struct Manager Manager;
+#include "portabled-forward.h"
Image *manager_image_cache_get(Manager *m, const char *name_or_path);
/* SPDX-License-Identifier: LGPL-2.1-or-later */
+#include <sys/wait.h>
#include <unistd.h>
+#include "sd-bus.h"
+#include "sd-event.h"
+
#include "alloc-util.h"
#include "fd-util.h"
+#include "format-util.h"
#include "log.h"
#include "portabled.h"
#include "portabled-operation.h"
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include <sys/types.h>
-
-#include "sd-bus.h"
-#include "sd-event.h"
-
#include "list.h"
-
-typedef struct Manager Manager;
-typedef struct Operation Operation;
+#include "portabled-forward.h"
#define OPERATIONS_MAX 64
-struct Operation {
+typedef struct Operation {
Manager *manager;
pid_t pid;
sd_bus_message *message;
sd_event_source *event_source;
int (*done)(Operation *o, int ret, sd_bus_error *error);
LIST_FIELDS(Operation, operations);
-};
+} Operation;
int operation_new(Manager *manager, pid_t child, sd_bus_message *message, int errno_fd, Operation **ret);
Operation *operation_free(Operation *o);
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#include <sys/stat.h>
-#include <sys/types.h>
#include "sd-bus.h"
+#include "sd-event.h"
#include "alloc-util.h"
#include "bus-log-control-api.h"
-#include "bus-polkit.h"
#include "bus-util.h"
#include "common-signal.h"
#include "constants.h"
#include "daemon-util.h"
+#include "hashmap.h"
+#include "log.h"
#include "main-func.h"
#include "portabled.h"
-#include "portabled-bus.h"
#include "portabled-image-bus.h"
-#include "process-util.h"
#include "service-util.h"
#include "signal-util.h"
+#include "time-util.h"
static Manager* manager_unref(Manager *m);
DEFINE_TRIVIAL_CLEANUP_FUNC(Manager*, manager_unref);
/* SPDX-License-Identifier: LGPL-2.1-or-later */
#pragma once
-#include "sd-bus.h"
-#include "sd-event.h"
-
#include "bus-object.h"
-#include "hashmap.h"
#include "list.h"
-#include "portabled-operation.h"
+#include "portabled-forward.h"
#include "runtime-scope.h"
typedef struct Manager {