3

Official man sources.list(5) mentions only $(ARCH) placeholder.

I wonder if there are any other placeholders are available, like $(CODENAME).

1
  • 3
    A brief scan of the apt source code. specifically in apt-pkg/sourcelist.cc suggests not, no.
    – popey
    Mar 18 at 16:52

1 Answer 1

3

Only ARCH and VERSION are available (as explained in the man page). VERSION needs to bet set up to work.

Any other alteration is generally done by using sed and appending or replacing a value.

The following variable substitutions are done on sources.list entries:

  • $(ARCH) is substituted with the base architecture of the system.

  • $(VERSION) is substituted with the distribution version if configured automatically via Apt::DistroVerPkg or manually via the Apt::DistroVersion configuration option.

1
  • Confirming: I saw many projects embed code name via sed/bash or other template solutions.
    – gavenkoa
    Mar 19 at 16:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.