October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk5 min

A Dandified Way to Package Management in the Yocto Project

A working Yocto DNF setup requires more than RPM output: configure runtime package management, publish a reachable feed, and give DNF its repository locations.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To use DNF on a Yocto target, build an RPM-based image, retain runtime package-management support, and point DNF at a reachable RPM feed containing repository metadata. These are separate steps: selecting RPM for the build does not, by itself, configure a usable runtime repository.

How Yocto package management fits together

Yocto’s OpenEmbedded build system can generate IPK, RPM, or DEB packages. DNF handles runtime management of RPM packages; IPK and DEB targets use different tools. The build also uses package-management machinery while assembling an image, whether or not the finished target keeps tools for installing packages later.

As an Amazon Associate I earn from qualifying purchases.

Think of a working DNF update path as three components:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Build output: the package format selected for generated packages and the image.
  • Target capability: the package database and runtime tools retained in the image.
  • Repository access: feed locations and metadata that let DNF discover packages.

Choose the package format and retain runtime support

Set P​ACKAGE_CLASSES to select the package backend, for example package_rpm. Yocto documents ipk, rpm, and deb as supported formats. More than one format can be listed, but the first listed format is the one used to create an image or SDK. See the Development Tasks Manual: Working with Packages.

If the target must install or upgrade packages after boot, add package-management to IMAGE_FEATURES. This retains the package database and provides runtime package-management tools. An image that uses RPM but omits runtime package-management support can still be built from packages; it simply is not configured for the same on-device package-management workflow.

Runtime upgrades also need room for downloaded and installed files. Account for that storage in the image and target design rather than sizing the root filesystem only for its initial contents.

Publish a feed DNF can reach

BitBake writes package artifacts into a feed area in the build directory through package-writing tasks such as do_package_write_*. The deploy tree is useful for development, but it is mutable: subsequent builds can change or overwrite its contents. For a production feed, publish a managed copy outside the build area so ordinary builds do not alter the repository being served. The Overview and Concepts Manual: Package Feeds describes feeds as an intermediary step in the build process.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For a simple development setup, the Yocto manual demonstrates serving ${TMPDIR}/deploy/rpm, including with Python’s HTTP server. It cautions that this simple server may not suit production; Apache, lighttpd, or Nginx are possible alternatives. The server choice does not remove the need to publish stable feed contents and valid repository metadata. Consult the Development Tasks Manual for the documented example.

Preconfigure feed locations in the image

Define feed variables before building when the image should know its repositories from first boot. PACKAGE_FEED_URIS, PACKAGE_FEED_BASE_PATHS, and PACKAGE_FEED_ARCHS contribute the components of the resulting feed URLs.

The Reference Manual illustrates the combination with sample values: a URI such as https://example.com/packagerepos/release, base paths such as rpm rpm-dev, and architectures such as all core2-64. Combinations yield paths such as /release/rpm/all and /updates/rpm/core2-64. These are illustrative patterns, not live endpoints; substitute the actual hosted paths and architecture values for your build. See PACKAGE_FEED_URIS, PACKAGE_FEED_BASE_PATHS, and PACKAGE_FEED_ARCHS.

Configure DNF on a target that lacks feed settings

If feed variables were not included when the image was built, configure a repository on the target. The Yocto manual’s example creates /etc/yum.repos.d/oe-packages.repo and defines a repository named oe-packages. Use the real feed locations in its base URL configuration; sample hostnames in documentation are not production settings.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

The manual describes two URL approaches: list architecture-specific locations explicitly, or use one URL for a full package index. Choose one approach rather than combining both. After saving the repository file, refresh DNF’s metadata cache:

dnf makecache

Once refreshed, DNF can find, install, and upgrade packages when the target can reach the repository and the feed contains appropriate packages and metadata. For package selection during image construction, prefer IMAGE_INSTALL; PACKAGE_INSTALL is internal image-construction machinery except for the documented initramfs case. The variable guidance is in the Reference Manual.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose a configuration route

Decision Option When it fits
Target package ecosystem RPM with DNF; IPK with opkg; DEB with apt Choose the format and tooling that fit the project; the documentation does not declare one universally best.
Feed configuration timing Set feed variables before image creation, or configure the repository on the target after boot Preconfiguration suits images that should arrive knowing their feed; target-side setup is an option when the image was built without feed settings.
Repository URL layout Explicit architecture-specific URLs, or one URL for a full package index Use the layout matching the hosted feed; do not combine the two DNF URL approaches shown in the manual.
Feed hosting Serve the build deploy tree for simple development, or publish a managed copy outside it The deploy tree is convenient for development; a managed copy avoids ordinary builds changing production feed contents.

Diagnose an empty DNF package list

  • Check the package format: confirm the image and feed use RPM packages if you expect DNF to manage them.
  • Check runtime support: confirm the image includes package-management if package installation after boot is required.
  • Check repository configuration: verify the target has the intended repository file and that its base URLs point to the real hosted paths.
  • Refresh metadata: run dnf makecache after adding or changing repository configuration.
  • Check feed contents and reachability: DNF needs network access to the feed and repository metadata plus packages appropriate to the target.

Account for Yocto release differences

Commands and component behavior can vary by Yocto release and distribution configuration, so use documentation matching the project’s release. The Yocto 2.7.1 Reference Manual records a historical transition from Smart to DNF and from RPM 5.x to RPM 4.x; it notes that scripts or API clients using the older runtime tool needed changes because commands and options differed. It also records the replacement of createrepo with createrepo_c. Those are historical migration notes, not claims about component versions in current releases: Yocto Project 2.7.1 Reference Manual.

The manuals explain the package-format, image, and feed configuration workflow, but do not prescribe a complete secure update architecture. Authentication, transport security, repository signing, compatibility policy, atomic feed publication, rollback, and fleet update strategy need to be decided for the system being built.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Leave a Reply

Your email address will not be published. Required fields are marked *

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Windows Errors? Fix Them Before They SpreadFree repair scan
Crashes, No Sound, or Screen Glitches?Free driver scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.