for (i = 1; i < argc; i++) {
_cleanup_(sd_bus_error_free) sd_bus_error error = SD_BUS_ERROR_NULL;
_cleanup_(sd_bus_message_unrefp) sd_bus_message *m = NULL;
+ _cleanup_free_ char *image = NULL;
+
+ r = determine_image(argv[i], false, &image);
+ if (r < 0)
+ return r;
r = bus_message_new_method_call(bus, &m, bus_portable_mgr, "RemoveImage");
if (r < 0)
return bus_log_create_error(r);
- r = sd_bus_message_append(m, "s", argv[i]);
+ r = sd_bus_message_append(m, "s", image);
if (r < 0)
return bus_log_create_error(r);
cp -a /tmp/minimal_0 /tmp/mismatched-name
portablectl inspect /tmp/mismatched-name | grep -F "minimal-app0.service" >/dev/null
+rm -rf /tmp/remove-relative
+cp -a /tmp/minimal_0 /tmp/remove-relative
+(cd /tmp && portablectl remove ./remove-relative)
+test ! -e /tmp/remove-relative
+
rm -rf /tmp/symlink-unit
cp -a /tmp/minimal_0 /tmp/symlink-unit
printf '[Service]\nExecStart=/bin/true\n' >/tmp/portable-host-unit