Announcement

Collapse
No announcement yet.

[solved] apt pinning to a ppa

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [solved] apt pinning to a ppa

    Long story, but the question is, how to pin packages to a ppa repository. The following file in /etc/apt/preferences.d "pins" firefox to a specific repository (so that the betas never get installed):

    Package: firefox firefox-globalmenu firefox-gnome-support
    Pin: release a=natty-updates
    Pin-Priority: 600

    I want to accomplish the same thing on oneiric, but the oneiric repositories have betas in them. So I want to "pin" firefox to the mozilla stable repository. (I am fully aware that I will be installing a version built for natty, prepared for the fact that it might not run, etc etc etc. Oneiric is an experimental OS at this point, so why not experiment?)

    deb h-t-t-p://ppa.launchpad.net/mozillateam/firefox-stable/ubuntu natty main
    (I put the dashes in to keep the board from reformatting it)

    In the pin file, the "a=" part specifies the release (repository) to use.
    The question is, what should go in the "a=" part for the ppa?

    We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

    #2
    Re: apt pinning to a ppa

    My understanding of the apt pinning procedure is that you pin to a version, not to a repo. But I could be wrong about that. However, upon reflection, it would seem to me that the result would be the same -- you keep the version you want and it won't be upgraded by some other version, regardless of the repo sources involved.

    So, immediately after installing the version of the package that you want, you issue:

    Code:
    sudo echo packagename hold|dpkg --set-selections
    and thereafter that package will not be upgraded, regardless of repos added or deleted.

    To "set it free", you issue:

    Code:
    sudo echo packagename install|dpkg --set-selections
    And to list any/all pinned packages on your system:

    Code:
    sudo dpkg --get-selections | grep hold

    Comment


      #3
      Re: apt pinning to a ppa

      Right, but the problem is everything in the oneiric repositories that I can find is a firefox beta.

      root@Wolfenstein:/# apt-cache policy firefox
      firefox:
      Installed: 7.0~b5+build1+nobinonly-0ubuntu1
      Candidate: 7.0~b5+build1+nobinonly-0ubuntu1
      Version table:
      *** 7.0~b5+build1+nobinonly-0ubuntu1 0
      500 http://us.archive.ubuntu.com/ubuntu/ oneiric/main amd64 Packages
      100 /var/lib/dpkg/status

      If I could get a non-beta, yes, holding would work. I have done pinning on debian/aptosid, but they don't use ppa's - specifically to pin iceweasel to a more recent repository (whatever version it might be) than what is in sid itself. My understanding is that pinning is primarily to control the source from which an application is installed -- it probably can be used both ways.

      This file, from aptosid, pins iceweasel to the experimental repo:

      Package: iceweasel xulrunner-1.9.1 xulrunner-1.9.2 xulrunner-1.9.3 libmozjs3d libmozjs4d
      Pin: release a=experimental
      Pin-Priority: 100

      Yeah I think you can "pin version" as well, but since there is no non-beta version in oneiric, this won't help (at the moment).
      We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

      Comment


        #4
        Re: apt pinning to a ppa

        Got this figured out, sort of.

        Used this as a source of information:

        http://marcin.juszkiewicz.com.pl/201...u-natty-11-04/

        So here is what I did:

        1. Add the following lines to /etc/apt/sources.list:

        ## for installing firefox stable
        deb http://us.archive.ubuntu.com/ubuntu/ natty-updates main restricted universe multiverse
        deb http://security.ubuntu.com/ubuntu/ natty-security main restricted universe multiverse

        then apt-get update

        2. Add the file 30pinning to /etc/apt/preferences.d :

        Code:
        Package: *
        Pin: release n=oneiric
        Pin-Priority: 900
        
        Package: *
        Pin: release n=natty
        Pin-Priority: 800
        3. Remove the existing firefox stuff:

        apt-get remove firefox

        This will drag some other firefox stuff out along with it. bye-bye

        4. Install the natty version of firefox:

        apt-get install -t natty firefox

        This will drag in firefox-globalmenu. Forget about the other integration stuff.

        5. Hold the firefox packages:

        sudo -i
        echo "firefox hold" | dpkg --set-selections
        echo "firefox-globalmenu hold" | dpkg --set-selections
        exit

        6. Copy ~/.mozilla from natty to oneiric home directory.

        Away it goes. Be sure to remove the 30pinning file and natty sources.list entries afterwards, and make bloody sure you don't do a dist-upgrade before removing them.

        It seems to be working right, but then, as one who knows once warned, "Nothing is more dangerous than a computer output the looks right..."

        Note that I tried this with thunderbird, no joy. Thunderbird seems to have too many threads lying around the system for this method to work. I wound up installing v6 from the mozilla website in /opt/thunderbird. Works. I don't run flash from inside tb, so no issues so far.

        PS: I still haven't figured out how to pin things to a ppa. That just may not be possible, given the apt system was designed for debian repositories and the ppa thing came later. I would like to get it figured out if it is possible.
        We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

        Comment


          #5
          Re: apt pinning to a ppa

          Originally posted by doctordruidphd

          as one who knows once warned, "Nothing is more dangerous than a computer output the looks right..."
          Hah -- I had never heard it, but how true that is!

          Had I fully understood your problem, I might have suggested a similar work-around. I have done a similar maneuver to install digikam2, showfoto2, and kipi-plugins2 from the philip5/natty PPA (the only place it exists) onto my 11.10 installation, just for experimental purposes. It worked for several weeks, up until today's dist-upgrade :P

          Alternatively you could have just grabbed the debian stable .deb package for iceweasel, and it should work correctly. I've gotten away from firefox/iceweasel in favor of chromium-browser in recent years, which seems a lot happier in a qt/KDE environment. They both have their pluses and minuses.

          Comment


            #6
            Re: [solved] apt pinning to a ppa

            The only reason I stick with firefox is that over the years, I have figured out how to nail it down pretty tight as far as security and ad blocking are concerned. However, with them going to this frequent-update-that-breaks-everything model, it's probably time to start looking elsewhere.
            We only have to look at ourselves to see how intelligent life might develop into something we wouldn't want to meet. -- Stephen Hawking

            Comment


              #7
              Re: [solved] apt pinning to a ppa

              If you have the time and inclination, you might want to check out chromium-browser, with the "ghostery" plugin, and the "duck duck go" search engine. I'm not a browser security expert, but it seems pretty tight. I run it that way on aptosid -- I'd love to hear your opinion if you evaluate it.

              Comment

              Working...
              X