Skip to content

Commit

Permalink
container-encapsulate: build content mapping from rpm fileset
Browse files Browse the repository at this point in the history
  • Loading branch information
tymlipari committed Mar 28, 2024
1 parent 23765ef commit 20762ff
Show file tree
Hide file tree
Showing 7 changed files with 389 additions and 186 deletions.
72 changes: 37 additions & 35 deletions rpmostree-cxxrs.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -1216,6 +1216,11 @@ template <> class impl<Str> final
str.repr = repr;
return str;
}
static repr::Fat
repr (Str str) noexcept
{
return str.repr;
}
};

template <typename T> class impl<Slice<T> > final
Expand Down Expand Up @@ -2811,6 +2816,9 @@ extern "C"
::rust::repr::PtrLen
rpmostreecxx$cxxbridge1$complete_rpm_layering (::std::int32_t rootfs) noexcept;

::rust::repr::PtrLen
rpmostreecxx$cxxbridge1$deduplicate_tmpfiles_entries (::std::int32_t rootfs) noexcept;

::rust::repr::PtrLen rpmostreecxx$cxxbridge1$passwd_cleanup (::std::int32_t rootfs) noexcept;

::rust::repr::PtrLen rpmostreecxx$cxxbridge1$migrate_group_except_root (
Expand Down Expand Up @@ -2940,9 +2948,6 @@ extern "C"
void rpmostreecxx$cxxbridge1$cache_branch_to_nevra (::rust::Str nevra,
::rust::String *return$) noexcept;

::rust::repr::PtrLen
rpmostreecxx$cxxbridge1$deduplicate_tmpfiles_entries (::std::int32_t rootfs) noexcept;

::std::uint32_t
rpmostreecxx$cxxbridge1$CxxGObjectArray$length (::rpmostreecxx::CxxGObjectArray &self) noexcept
{
Expand Down Expand Up @@ -3237,24 +3242,6 @@ extern "C"
return throw$;
}

::rust::repr::PtrLen
rpmostreecxx$cxxbridge1$RpmTs$packages_providing_file (
::rpmostreecxx::RpmTs const &self, ::rust::Str path,
::rust::Vec< ::rust::String> *return$) noexcept
{
::rust::Vec< ::rust::String> (::rpmostreecxx::RpmTs::*packages_providing_file$) (::rust::Str)
const
= &::rpmostreecxx::RpmTs::packages_providing_file;
::rust::repr::PtrLen throw$;
::rust::behavior::trycatch (
[&] {
new (return$)::rust::Vec< ::rust::String> ((self.*packages_providing_file$) (path));
throw$.ptr = nullptr;
},
::rust::detail::Fail (throw$));
return throw$;
}

::rust::repr::PtrLen
rpmostreecxx$cxxbridge1$RpmTs$package_meta (::rpmostreecxx::RpmTs const &self, ::rust::Str name,
::rpmostreecxx::PackageMeta **return$) noexcept
Expand Down Expand Up @@ -3297,12 +3284,28 @@ extern "C"
new (return$)::rust::Vec< ::std::uint64_t> ((self.*changelogs$) ());
}

::std::string const *
::rust::repr::Fat
rpmostreecxx$cxxbridge1$PackageMeta$src_pkg (::rpmostreecxx::PackageMeta const &self) noexcept
{
::std::string const &(::rpmostreecxx::PackageMeta::*src_pkg$) () const
::rust::Str (::rpmostreecxx::PackageMeta::*src_pkg$) () const
= &::rpmostreecxx::PackageMeta::src_pkg;
return &(self.*src_pkg$) ();
return ::rust::impl< ::rust::Str>::repr ((self.*src_pkg$) ());
}

::rust::repr::PtrLen
rpmostreecxx$cxxbridge1$PackageMeta$provided_paths (
::rpmostreecxx::PackageMeta const &self, ::rust::Vec< ::rust::String> *return$) noexcept
{
::rust::Vec< ::rust::String> (::rpmostreecxx::PackageMeta::*provided_paths$) () const
= &::rpmostreecxx::PackageMeta::provided_paths;
::rust::repr::PtrLen throw$;
::rust::behavior::trycatch (
[&] {
new (return$)::rust::Vec< ::rust::String> ((self.*provided_paths$) ());
throw$.ptr = nullptr;
},
::rust::detail::Fail (throw$));
return throw$;
}

::rust::repr::PtrLen
Expand Down Expand Up @@ -5688,6 +5691,16 @@ complete_rpm_layering (::std::int32_t rootfs)
}
}

void
deduplicate_tmpfiles_entries (::std::int32_t rootfs)
{
::rust::repr::PtrLen error$ = rpmostreecxx$cxxbridge1$deduplicate_tmpfiles_entries (rootfs);
if (error$.ptr)
{
throw ::rust::impl< ::rust::Error>::error (error$);
}
}

void
passwd_cleanup (::std::int32_t rootfs)
{
Expand Down Expand Up @@ -6094,16 +6107,6 @@ cache_branch_to_nevra (::rust::Str nevra) noexcept
rpmostreecxx$cxxbridge1$cache_branch_to_nevra (nevra, &return$.value);
return ::std::move (return$.value);
}

void
deduplicate_tmpfiles_entries (::std::int32_t rootfs)
{
::rust::repr::PtrLen error$ = rpmostreecxx$cxxbridge1$deduplicate_tmpfiles_entries (rootfs);
if (error$.ptr)
{
throw ::rust::impl< ::rust::Error>::error (error$);
}
}
} // namespace rpmostreecxx

extern "C"
Expand Down Expand Up @@ -6818,6 +6821,5 @@ Vec< ::rpmostreecxx::LockedPackage>::truncate (::std::size_t len)
{
return cxxbridge1$rust_vec$rpmostreecxx$LockedPackage$truncate (this, len);
}

} // namespace cxxbridge1
} // namespace rust
4 changes: 2 additions & 2 deletions rpmostree-cxxrs.h
Original file line number Diff line number Diff line change
Expand Up @@ -2015,6 +2015,8 @@ bool prepare_rpm_layering (::std::int32_t rootfs, ::rust::Str merge_passwd_dir);

void complete_rpm_layering (::std::int32_t rootfs);

void deduplicate_tmpfiles_entries (::std::int32_t rootfs);

void passwd_cleanup (::std::int32_t rootfs);

void migrate_group_except_root (::std::int32_t rootfs,
Expand Down Expand Up @@ -2057,6 +2059,4 @@ ::rpmostreecxx::GKeyFile *treefile_to_origin (::rpmostreecxx::Treefile const &tf
void origin_validate_roundtrip (::rpmostreecxx::GKeyFile const &kf) noexcept;

::rust::String cache_branch_to_nevra (::rust::Str nevra) noexcept;

void deduplicate_tmpfiles_entries (::std::int32_t rootfs);
} // namespace rpmostreecxx
Loading

0 comments on commit 20762ff

Please sign in to comment.