Results 1 to 5 of 5

Thread: Is there a way to get a deb package to add a repository and install a package?

  1. #1
    Join Date
    Apr 2007
    Beans
    235
    Distro
    Ubuntu

    Is there a way to get a deb package to add a repository and install a package?

    See my signature for what I want this for.

    As for why, this way someone would always get the newest version available whenever I update the ppa, sparing me from updating posts, links and/or files.

    I thought I solved it by simply adding a preinst file in the package
    and write this:

    Code:
    #!/bin/bash
    sudo add-apt-repository ppa:ika; sudo apt-get install ika
    But that doesn't work.


    Does anyone know how it is possible?
    I know dropbox does it.

  2. #2
    Join Date
    Mar 2009
    Beans
    927
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Is there a way to get a deb package to add a repository and install a package?

    No. This is a bad idea. Do not do it.

    The user adds your repository:
    Code:
    # add-apt-repository ppa:ika
    Then installs your package through the repository:
    Code:
    # apt-get install ika
    Not the other way round. Instead, post instructions about how to add the repository and install through apt on your website.


    EDIT: Some links:
    Last edited by Penguin Guy; July 29th, 2010 at 12:31 PM.

  3. #3
    Join Date
    Apr 2007
    Beans
    235
    Distro
    Ubuntu

    Re: Is there a way to get a deb package to add a repository and install a package?

    Is there no way then for users to add a repository and install the necessary packages by a click of a button?
    There's a lot of users that rather want to click on something then having to type.

    [EDIT] Never mind trying to use launchers[/EDIT]
    Last edited by _sluimers_; July 23rd, 2010 at 01:47 PM. Reason: not what I was looking for

  4. #4
    Join Date
    Mar 2009
    Beans
    927
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: Is there a way to get a deb package to add a repository and install a package?

    Quote Originally Posted by _sluimers_ View Post
    Is there no way then for users to add a repository and install the necessary packages by a click of a button?
    There's a lot of users that rather want to click on something then having to type.
    You could write a script to do it, but the whole idea of one-click add-repo and install is generally frowned upon as it isn't very transparent. Also, if I understand correctly, this is a game development 'kit' and isn't actually a game in itself, in which case it shouldn't really be a .deb anyway.

    On a side note, it looks like you've got some good code there but little code management, if you started a project on Launchpad and moved the code to a Bazaar branch you'll probably find development much easier and might get a few more people involved.

  5. #5
    Join Date
    Nov 2006
    Location
    Oregon
    Beans
    4,434
    Distro
    Ubuntu Development Release

    Re: Is there a way to get a deb package to add a repository and install a package?

    Totally doable, I'm not sure why penguin guy thinks it's frowned upon. You can't have a package in the official repositories that add another repo, but you could definitely build a package that when it installs it adds the PPA.


    I do it for mythbuntu-repos in postinst, take a look at

    http://bazaar.launchpad.net/~mythbun...ebian/postinst


    It does more than just adds a repo, all you really need to do is something like

    Code:
    echo "deb http://$repo/mythbuntu/$version/ubuntu $release main" >> /etc/apt/sources.list.d/mythbuntu-repos.list
    in postinst. Just make sure you have it remove the file in postrm

Tags for this Thread

Bookmarks

Posting Permissions

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