3

In Debian Squeeze I have installed a packageX from debian-backports.

Q1: When I apt-get dist-upgrade or aptitude full-upgrade, what release is checked for updates for packageX? debian-backports or debian-stable?

Q2: Can I use a command to update a single package from a specific release? For example is aptitude -t full-upgrade packageX a valid command? I tried aptitude -st full-upgrade packageX but the output was not helpful.

Q3: For completeness purposes, what are the equivalent answers for RPM based distros?

2

Q1: This depends on your current priorities. You can view the priorities with the apt-cache policy command. Here is an example of a couple of lines from the output:

 500 http://security.debian.org/ stable/updates/main amd64 Packages
     release v=6.0,o=Debian,a=stable,n=squeeze,l=Debian-Security,c=main
     origin security.debian.org

 100 http://backports.debian.org/debian-backports/ squeeze-backports/main amd64 Packages
     release o=Debian Backports,a=squeeze-backports,n=squeeze-backports,l=Debian Backports,c=main
     origin backports.debian.org

You can also use apt-cache policy on a single package:

$ apt-cache policy linux-image-2.6-amd64 
linux-image-2.6-amd64:
  Installed: (none)
  Candidate: 2.6.32+29
  Version table:
     3.2+46~bpo60+1 0
        100 http://backports.debian.org/debian-backports/ squeeze-backports/main amd64 Packages
     2.6.32+29 0
        500 http://apt.magazines.com/debian/ stable/main amd64 Packages

The priorities are explained in apt_preferences(5):

   P > 1000
       causes a version to be installed even if this constitutes a downgrade of the package

   990 < P <=1000
       causes a version to be installed even if it does not come from the target release, unless the installed version is more recent

   500 < P <=990
       causes a version to be installed unless there is a version available belonging to the target release or the installed version is more recent

   100 < P <=500
       causes a version to be installed unless there is a version available belonging to some other distribution or the installed version is more recent

   0 < P <=100
       causes a version to be installed only if there is no installed version of the package

   P < 0
       prevents the version from being installed

In our example, this means that if the given package is already installed from backports, it will be upgraded from backports. If it is not installed from backports, the backports repository will not be used.

Q2: The install command is used for upgrading single packages. If the package is already installed when install is given, it will be upgraded if an upgrade is available.

apt-get install packageX
aptitude install packageX

Q3: For an RPM-based distro, it would depend on the distro. Things like yum are not tied to rpm in the same way that apt is tied to dpkg. The tool used for upgrades and remote management varies depending on distro. The yum (RHEL) and zypper (SLES) commands are the most common.

  • 1
    Also, you may want to add in apt-cache policy PACKAGENAME to check a specific package. – derobert Apr 4 '13 at 16:29
0

Re Q3: RPM itself has no concept of repositories and such, it can fetch and install files as directed only. The yum package manager can be configured to use several repositories, but at least in Fedora, RHEL and clones the package sets in a version of the distribution are more or less tied together, trying to install RHEL 6 packages on RHEL 5 (or viceversa) is a sure recipe for disaster (if the dependencies are even available). But that has nothing whatsoever to to with RPM or yum (or dnf today), that is packaging/repository management policy for the distribution, mostly.

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.