2

I'm a bit confused about how getdeb.net works now. The last time I got a package from there was a while ago; at that point the procedure was that you would just download a .deb for each package that you wanted to install/upgrade and then install it using dpkg -i. However the inexorable march of progress has lent its trumpets to this system as well, and getdeb installs are now done via their repo, which is registered with apt in /etc/apt/sources.list.d, after you install a single package that makes the changes to the apt database.

I've installed that package, and I've discovered that aptitude dist-upgrade now wants to upgrade a lot of packages on my system that weren't ready for upgrades prior to the installation of the getdeb package. If I rename the file /etc/apt/sources.list.d/getdeb.list to something with a different extension, then do aptitude update && aptitude dist-upgrade, it stops wanting to upgrade packages.

So I gather that the default behaviour is now to upgrade all packages to the version available at getdeb. This is not particularly appropriate, since these packages are not as well tested as the officially released versions.

Is there a config setting somewhere that will prevent upgrading packages to versions from the getdeb repo unless this action is specifically selected? I'd like to be able to pick and choose what packages are upgraded via getdeb.

Update

As recommended by @~joaopinto, I've created the file /etc/apt/preferences, containing the following:

Package: *
Pin: release o=GetDeb
Pin-Priority: 50

In the process of learning about this, I discovered that there is a bug in apt that prevents the /etc/preferences.d directory from being searched. So... don't try to use that directory.

With the preferences file set up as noted, aptitude dist-upgrade won't try to upgrade packages to their getdeb versions. The priority of 50 basically means that packages will be installed from getdeb only if they are not available from anywhere else.

At this point I'm looking for a convenient way to upgrade a package to the getdeb version or to the most recent version (either is okay) and upgrade/install dependencies as required. I usually do this stuff from the command line, but I found that I needed to go into the curses version of aptitude in order to upgrade a package to a specific version. This is not to say that there's not a way to do this from the command line, but if there is it is not readily discernible from aptitude's quick documentation.

Within aptitude I had to select the desired version of the desired package for upgrade, and then deal with 'conflicts' created because of that package version's dependencies on newer versions of other packages. This was easy enough to resolve —I just had to select the getdeb-originated versions of those packages— but it seems like an unnecessary hassle. Is there a neater way to do this?

update too

As @Ryan Thompson explains, versions can be passed to apt-get —or, as I discovered, aptitude's command-line mode— by suffixing =VERSION to the package name, where VERSION is the same string listed by aptitude or apt-cache show.

So doing something like aptitude install rosegarden=1:10.04-1~getdeb1 will install that package from the getdeb repo even if GetDeb packages are pinned as explained above. I did this and was prompted to confirm upgrade of the depended-upon package rosegarden-data to the version provided by getdeb.

5
  • On the command line, use apt-cache policy PACKAGE-NAME to show the available versions of a package. To install a specific version, use apt-get install PACKAGE-NAME=SPECIFIC-VERSION. May 2, 2010 at 5:58
  • Awesome, thanks @Ryan. I was a bit concerned that a) this wouldn't work with aptitude, which I prefer to use because it tracks explicit vs. automatic installation, and b) that aptitude wouldn't realize that it should install pinned dependencies. However I've just tried it out and it seems to work quite well.
    – intuited
    May 6, 2010 at 1:22
  • Of course, using the PACKAGE=VERSION trick won't stop the system from nagging you to upgrade, so you still want to figure out pinning in the long run. Also, apt-get has been tracking manual and automatic installation since I don't know when. man apt-mark. May 13, 2010 at 10:34
  • @Ryan Thompson: I'm using PACKAGE=VERSION in combination with pinning. Of course this means that I have to upgrade manually if I want newer versions of those packages from the pinned repos, but that's okay. If it gets old I can set a higher pinning for those specific packages. \n\n Is there no advantage to using aptitude? Seems to me I've read recent advice recommending to use it over apt-*.
    – intuited
    May 13, 2010 at 16:18
  • The bug in apt re : /etc/apt/preferences.d has been fixed now. Thank you for your question, and curating answers - this for me, is now the "right" way to use GetDeb - I don't want a blanket update of all the apps it offers.
    – Adrian
    Jan 13, 2016 at 12:08

4 Answers 4

4

apt does not provide an user friendly way to achieve that, you will need to use apt pinning, check the following url: http://jaqque.sbih.org/kplug/apt-pinning.html

To prevent any package to be upgraded from getdeb, you will need to create /etc/apt_preferences with: Package: * Pin: release o=GetDeb Pin-Priority: 50

2
  • Awesome. I discovered that there is a bug preventing preferences in /etc/apt/preferences.d from being recognized: bugs.launchpad.net/ubuntu/+source/aptitude/+bug/… ...this might be why getdeb doesn't set that up with their install package. It seems to be working, although I'm hoping that there is a convenient way to both override pinning for a given package and also update its dependencies as much as is required by the newest version of that given package. See my edit.
    – intuited
    May 2, 2010 at 1:01
  • I realized my question isn't totally answered yet, so I'm gonna hold off on the check mark for now. Sorry for the tease :)
    – intuited
    May 2, 2010 at 1:13
1

it should look like this, but without the empty line after the asteriks. Empty lines are not allowed between package, pin and pin-priority in /etc/apt/preferences. Dont know why, this page changed the layout automaticaly.

Package: *

Pin: origin archive.getdeb.net
Pin-Priority: -1

0

You're looking for something called pinning. I've never been able to figure it out myself, so I'll let others point you in the right direction.

1
  • My understanding of pinning is that it's a way to keep particular packages at a particular version; my goal is to prevent a particular source from being used except in particular instances. Is this an aspect of pinning?
    – intuited
    May 1, 2010 at 21:27
-1

After trying for hours, I finally got the solution:

Package: *
Pin: origin archive.getdeb.net       
Pin-Priority: -1
1
  • Can you explain what this does and add more information?
    – bwDraco
    Mar 4, 2015 at 19:30

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .