2 Dependencies
Anagnostakis Ioannis edited this page 2026-06-25 03:39:49 +03:00

Dependencies

slacker resolves dependencies the Slackware way: there is no dependency guessing for official repos and packages. It pulls in dependencies only from a 3rd package's own .dep file when a repository provides one.

If a package has a .dep file next to it in the repository (one dependency package name per line), slacker reads it and pulls in the missing dependencies from the same repository, recursively, before installing.

%%{init: {'theme':'base','themeVariables':{'primaryColor':'#161b22','primaryBorderColor':'#1f6feb','primaryTextColor':'#e6edf3','lineColor':'#6e7781','fontFamily':'monospace'}}}%%
flowchart TB
  S["install a package"]:::blue --> D{".dep file<br/>in the repo?"}
  D -->|no| GO["install it"]:::green
  D -->|yes| L["for each listed dep"]:::grey
  L --> C{"already installed?"}
  C -->|"no"| ADD["add to the plan<br/>(from the same repo)"]:::green
  C -->|"yes, same as repo build"| LEAVE["leave it alone"]:::grey
  C -->|"yes, but differs"| PRI{"installed source priority"}
  PRI -->|lower| ASK["prompt: skip / replace /<br/>skip-all / abort"]:::blue
  PRI -->|higher or equal| KEEP["kept by priority,<br/>surfaced with keep / replace"]:::blue
  ADD --> GO
  classDef grey fill:#0d1117,stroke:#6e7781,color:#8b949e;
  classDef blue fill:#0d1117,stroke:#1f6feb,color:#e6edf3;
  classDef green fill:#0d1117,stroke:#2ea043,color:#e6edf3;

Conflicts are resolved by priority

A dependency already satisfied by that repo's own build is left alone. A dependency that is installed but differs from what the repo offers (for example installed from another source) is handled by source priority:

  • if the installed copy comes from a lower-priority source → you are prompted: skip / replace / skip-all / abort;
  • if it comes from a higher-or-equal priority source → it is kept by the priority rule, but slacker still lists it and lets you keep (the default) or replace it with the version the repo being installed offers.

With --yes, the installed version is kept in both cases.

New dependencies are shown up front, before the confirmation, in the same coloured plan table as everything else — each tagged as a new dep for its parent.


Turning it on and off

On by default. Disable globally with RESOLVE_DEPS=no in slacker.conf, or per-run with --no-deps.

Dependency resolution applies to every command that installs packages: install, upgrade, reinstall, upgrade-all, install-new, and install-template.


Notes

  • One small .dep request is made per package at install time. A 404 simply means "no deps" and slacker proceeds normally.
  • Dependencies are only ever pulled from the same repository as the package that declares them, never guessed or cross-resolved.