Results 1 to 2 of 2

Thread: Packaging repo definition and packages in a meta-package

  1. #1
    Join Date
    May 2010

    Packaging repo definition and packages in a meta-package

    I want to create a meta-package that pulls packages from a third party repo, but I'm new to .deb and don't know if I can do what I want in a single package.

    I need to add the PPA to /etc/apt/sources.list.d (simple), then I want to specify a set of packages from that PPA to be installed as dependencies to my package (standard meta-packaging). I thought I could brute force it by creating the repo.list file and doing apt-get update in a preinst script, but then the repo.list file isn't be tracked in the dpkg database and update fails because of the lock held by the install process.

    Is there any way to accomplish this or am I stuck doing it in two steps?


  2. #2
    Join Date
    May 2010
    Ubuntu 14.04 Trusty Tahr

    Re: Packaging repo definition and packages in a meta-package

    Take a look into the preinst script:

    In theory, you could do something like:

    # Double check root...
    if [[ $EUID -ne 0 ]]; then
      echo "This script must be run as root" 1>&2
      exit 1
      # Then add a repository the standard way.
      apt-add-repository <repository>
      # And now you could just install the packages here.
      apt-get install <packages>
    And have the dependencies be apt... However, I don't think you can require an external PPA and have package dependencies from them, as the dependencies download first before preinst or anything else is run...

    However, personally I would advise against this except for private use, as it is definitely not the best way to do things and is quite ugly.

    Cipherboy LOC


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts