packagekit_dart 0.5.0 copy "packagekit_dart: ^0.5.0" to clipboard
packagekit_dart: ^0.5.0 copied to clipboard

PlatformLinux

Dart FFI bindings for PackageKit, the cross-distro Linux package manager. Search, install, update, and remove packages via D-Bus with async streams.

0.5.0 #

  • Breaking: migrate the native build hook from hooks 1.x to 2.x (and code_assets to 1.2.x). hooks 2.x requires Dart >=3.10, so the SDK lower bound rises from 3.6.0 — consumers on Dart 3.6–3.9 should stay on 0.4.x. The hook's behaviour is unchanged (it still builds libpackagekit_nc.so via CMake and skips cleanly when cmake/ninja/sd-bus are absent); the migration is a dependency bump only, verified end to end against a consumer build.
  • Drop the native_toolchain_c dependency: it was declared but never imported (the hook drives CMake directly rather than CBuilder).

0.4.3 #

A build-hook fix so the package installs on hosts that lack the native-bridge toolchain.

  • Skip the native bridge cleanly when its build prerequisites are absent. The bridge needs a C++ toolchain (cmake + ninja) and libsystemd's sd-bus; on Alpine/OpenRC, a minimal image, or any non-systemd host, the build hook now probes for these up front and returns without building — the PackageKit backend is simply unavailable, which is fine where it is unused. Previously a missing tool threw ProcessException (only a present-but-failing tool was handled), failing the whole build hook and blocking dart pub get / install for every consumer on such a host. Probing first also avoids a needless sdbus-cpp clone.

0.4.2 #

Documentation only — no code change.

  • Lead the WSL guidance with the polkit rule rather than running as root. Recommending root to library consumers pushes them to relay that to their own users, and most tools keep caches or configuration under $HOME, where running as root leaves artifacts the user can no longer modify. Keeping the client unprivileged is what PackageKit exists to make possible.
  • Document that the suggested rule covers only install/remove/update. refreshCache maps to system-sources-refresh, which needs no authorization for a caller in a login session but does for one without — the CI and WSL case.

0.4.1 #

Documentation only — no code change. Released so the README rendered on pub.flutter-io.cn stops handing out a polkit rule that does nothing on Debian/Ubuntu.

  • Fix the documented polkit rule, which granted only to wheel — the admin group on Fedora/RHEL/Arch but not on Debian/Ubuntu, where it is sudo. A wheel-only rule silently does nothing on Debian and is hard to diagnose, because the rule looks installed and the error is unchanged. Match both.
  • Document that installing the rule is not sufficient: you must be in the group, passwordless sudo is not the same thing, and usermod does not affect a running session. All three produce the same unchanged denial.

0.4.0 #

  • Send the interactive hint on every transaction. The daemon treats an absent hint as false, which strips ALLOW_USER_INTERACTION from its polkit check — so any transaction needing authorization failed synchronously with PkError.notAuthorized and a 0 ms runtime, on any host where the polkit action is auth_admin and the caller is not root.
  • Add PkClient.connect({bool interactive = true}) and the matching PkClient.interactive getter. Interactive is the default: transactions that need authorization now prompt instead of failing. Pass interactive: false for unattended callers that must fail fast rather than block on a prompt — it suppresses the prompt, it does not grant authorization.
  • Document authorization on WSL, where polkit cannot reliably prompt because a logind session owned by the calling user is often absent. Recommends running as root, with a narrowly scoped polkit rule as an opt-in alternative, plus how to tell a session problem from a real denial.
  • C ABI change: pk_transaction_set_hints takes a third parameter, bool interactive. Consumers linking libpackagekit_nc directly must update their declaration; consumers using the build hook are unaffected, as it compiles the library from source.

0.3.2 #

  • Point repository and issue_tracker at the jwinarske fork, fixing pub.flutter-io.cn repository verification.

0.3.1 #

  • Add WhatProvides (native pk_what_provides, FFI binding, and PkClient.whatProvides) — resolve capabilities / provides / file paths (e.g. pkg-config, provided by pkgconf-pkg-config), matching dnf/apt install behavior. Mirrors the existing Resolve path.
  • Add setPackagekitLibraryPath() to point the native-library loader at a prebuilt libpackagekit_nc.so, taking precedence over PK_NC_LIB. Useful for path/git dependencies that ship or build the .so outside the build hook.

0.3.0 #

  • Extract TransactionDispatcher and dispatchManagerEvent for testable message dispatch without a live daemon
  • 102 unit tests covering all codec discriminators, model constructors, enum round-trips, dispatcher paths, and error handling
  • ~98% coverage on testable Dart code (FFI glue excluded)
  • Remove unused generated sdbus-cpp proxy headers and D-Bus XML interfaces
  • Remove go_router; use index-based navigation for instant screen switching
  • Fix CI: add libclang-rt-19-dev for ASAN, exclude test/ from clang-tidy, add dart pub get before format check, add flutter analyze step
  • Lower Dart coverage threshold to 10% (FFI-heavy package)
  • Add Flutter example screenshot to README
  • Fix detail pane overlay on screen switch and package selection

0.2.0 #

  • Native build hook (hook/build.dart) using package:hooks and package:code_assets — automatically compiles libpackagekit_nc.so via CMake at build time and bundles it as a CodeAsset
  • Auto-clone sdbus-cpp at pinned commit when submodule is unavailable (pub.flutter-io.cn installs)
  • Flutter example app (example/packagekit_catalog/) — Material 3 desktop catalog with Riverpod state management, GoRouter navigation, search, installed packages, updates, and repository views
  • Codecov integration with 60% threshold enforcement
  • Dart and C++ coverage collection in CI

0.1.0 #

  • Initial release
  • PkClient with async stream-based API for PackageKit D-Bus operations
  • Query methods: searchName, searchDetails, searchFiles, resolve, getPackages, getUpdates, getDetails, getUpdateDetail, getFiles, getRepoList, dependsOn, requiredBy, getDistroUpgrades
  • Write methods: installPackages, removePackages, updatePackages, refreshCache, downloadPackages, installFiles, repoEnable, acceptEula
  • Simulate-first pattern: simulateInstall, simulateRemove, simulateUpdate returning PkInstallPlan with full dependency resolution
  • Typed enums: PkFilter, PkTransactionFlag, PkInfo, PkStatus, PkExit, PkError
  • Domain models: PkPackage, PkPackageDetail, PkUpdateDetail, PkRepoDetail, PkFiles, PkProgress, PkInstallPlan
  • Daemon event monitoring: UpdatesChanged, RepoListChanged
  • Native bridge using sdbus-cpp v2 with glaze binary encoding
  • Supports APT, DNF, Zypper, and other PackageKit backends
0
likes
160
points
9.3k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Dart FFI bindings for PackageKit, the cross-distro Linux package manager. Search, install, update, and remove packages via D-Bus with async streams.

Repository (GitHub)
View/report issues

Topics

#linux #packagekit #dbus #package-manager #ffi

License

Apache-2.0 (license)

Dependencies

code_assets, ffi, hooks, path

More

Packages that depend on packagekit_dart