APT Preferences for a specific package

Archived topics about LMDE 1 and LMDE 2
Locked
adam777

APT Preferences for a specific package

Post by adam777 »

Hello all,
Following this thread - http://forums.linuxmint.com/viewtopic.p ... 9&t=101565, and all the advice I received in it, I did some searching.
On the surface, it seems that the APT Preferences file is exactly what I need.
The default one reads:

Code: Select all

Package: *
Pin: release o=linuxmint
Pin-Priority: 700

Package: *
Pin: origin packages.linuxmint.com
Pin-Priority: 700

Package: *
Pin: release o=Debian
Pin-Priority: 500
and the default sources.list reads:

Code: Select all

deb http://packages.linuxmint.com/ debian main upstream import backport romeo
deb http://debian.linuxmint.com/latest testing main contrib non-free
deb http://debian.linuxmint.com/latest/security testing/updates main contrib non-free
deb http://debian.linuxmint.com/latest/multimedia testing main non-free
Now, for the sake of testing, I installed the ati driver from default repositories (version 12.2) and than tried to create a setup in which ONLY this package (fglrx-driver) is being updated from the unstable repository.
First, I added the relevant repository to source.list:

Code: Select all

deb http://ftp.debian.org/debian unstable main contrib non-free
Next, I tried setting up the relevant entry in preferences:

Code: Select all

Package: fglrx-driver
Pin: a=unstable
Pin-Priority: 991
This is where I got stuck, as aptitude upgrade tries to pull a full sid upgrade (~700 packages upgrades).

I even tried removing:

Code: Select all

Package: *
Pin: release o=Debian
Pin-Priority: 500
and adding:

Code: Select all

Package: *
Pin: a=unstable
Pin-Priority: -10
With no success.

I hope the goal is clear - to let this one packages update from unstable (along with its dependencies) while the rest remain with default repositories.
It doesn't seem reasonable that the package dependencies will result in such a massive update, so I must assume something isn't properly configured.

Thanks in advance, Adam.

* EDIT *
Just tried again, this time doing a proper sid upgrade.
There are a little more upgrades available comparing to my attempts above.
So perhaps this one package does trigger that much dependencies?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 4 times in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
craigevil

Re: APT Preferences for a specific package

Post by craigevil »

Apt-Pinning for Beginners - http://jaqque.sbih.org/kplug/apt-pinning.html
AptConf - Debian Wiki - http://wiki.debian.org/AptConf

Howto: Set up and Maintain a Mixed Testing/Unstable System : http://forums.debian.net/viewtopic.php? ... 12&p=76067

smxi - unofficial Debian maintenance script http://smxi.org/site/install.htm


create /etc/apt.conf
add

Code: Select all

APT::Default-Release "testing";
rhodry
Level 4
Level 4
Posts: 343
Joined: Mon Jun 04, 2007 7:32 am

Re: APT Preferences for a specific package

Post by rhodry »

It doesn't seem reasonable that the package dependencies will result in such a massive update
Well, it is the graphics driver for your X system; it might have one or two dependencies:

Code: Select all

$ apt-rdepends fglrx-driver
Reading package lists... Done
Building dependency tree       
Reading state information... Done
fglrx-driver
  Depends: glx-alternative-fglrx (>= 0.2)
  Depends: libc6 (>= 2.3.6-6~)
  Depends: libfglrx (= 1:12-4-1)
  Depends: libgl1
  Depends: libgl1-mesa-glx
  Depends: libx11-6
  Depends: libxext6
  Depends: libxrandr2
  Depends: libxrender1
  Depends: xorg-video-abi-10
  Depends: xorg-video-abi-11
  Depends: xorg-video-abi-6.0
  Depends: xorg-video-abi-8
  Depends: xserver-xorg-core (<< 2:1.11.99)
  PreDepends: dpkg (>= 1.15.7.2)
glx-alternative-fglrx
  Depends: glx-alternative-mesa
  Depends: glx-diversions (= 0.2.1)
glx-alternative-mesa
  Depends: glx-diversions (= 0.2.1)
glx-diversions
  Depends: dpkg (>= 1.15)
  PreDepends: nvidia-installer-cleanup
dpkg
  PreDepends: libbz2-1.0
  PreDepends: libc6 (>= 2.11)
  PreDepends: libselinux1 (>= 1.32)
  PreDepends: tar (>= 1.23)
  PreDepends: xz-utils
  PreDepends: zlib1g (>= 1:1.1.4)
libbz2-1.0
  Depends: libc6 (>= 2.3)
  PreDepends: multiarch-support
libc6
  Depends: libc-bin (= 2.13-32)
  Depends: libgcc1
libc-bin
libgcc1
  Depends: gcc-4.7-base (= 4.7.0-7)
  Depends: libc6 (>= 2.2.4)
  PreDepends: multiarch-support
gcc-4.7-base
multiarch-support
  Depends: libc6 (>= 2.13-5)
libselinux1
  Depends: libc6 (>= 2.8)
  PreDepends: multiarch-support
tar
  PreDepends: libc6 (>= 2.8)
xz-utils
  Depends: libc6 (>= 2.7)
  Depends: liblzma5 (>= 5.1.1alpha+20110809)
liblzma5
  Depends: libc6 (>= 2.3.6-6~)
  PreDepends: multiarch-support
zlib1g
  Depends: libc6 (>= 2.1.3)
  PreDepends: multiarch-support
nvidia-installer-cleanup
  Depends: debconf (>= 0.5)
  Depends: debconf-2.0
debconf
  PreDepends: perl-base (>= 5.6.1-4)
perl-base
  PreDepends: dpkg (>= 1.14.20)
  PreDepends: libc6 (>= 2.11)
debconf-2.0
libfglrx
  Depends: libc6 (>= 2.3.6-6~)
  Depends: libgcc1 (>= 1:4.1.1)
  Depends: libstdc++6 (>= 4.1.1)
  Depends: libx11-6
  Depends: libxext6
  PreDepends: multiarch-support
libstdc++6
  Depends: gcc-4.7-base (= 4.7.0-7)
  Depends: libc6 (>= 2.11)
  Depends: libgcc1 (>= 1:4.1.1)
  PreDepends: multiarch-support
libx11-6
  Depends: libc6 (>= 2.3.2)
  Depends: libx11-data
  Depends: libxcb1 (>= 1.2)
  PreDepends: multiarch-support
libx11-data
libxcb1
  Depends: libc6 (>= 2.4)
  Depends: libxau6
  Depends: libxdmcp6
  PreDepends: multiarch-support
libxau6
  Depends: libc6 (>= 2.1.3)
  PreDepends: multiarch-support
libxdmcp6
  Depends: libc6 (>= 2.1.3)
  PreDepends: multiarch-support
libxext6
  Depends: libc6 (>= 2.1.3)
  Depends: libx11-6
  PreDepends: multiarch-support
libgl1
libgl1-mesa-glx
  Depends: libc6 (>= 2.3.6-6~)
  Depends: libdrm2 (>= 2.3.1)
  Depends: libgcc1 (>= 1:4.1.1)
  Depends: libglapi-mesa (= 8.0.2-2)
  Depends: libstdc++6 (>= 4.1.1)
  Depends: libx11-6 (>= 2:1.4.99.1)
  Depends: libx11-xcb1
  Depends: libxcb-glx0 (>= 1.8)
  Depends: libxcb1
  Depends: libxdamage1 (>= 1:1.1)
  Depends: libxext6
  Depends: libxfixes3
  Depends: libxxf86vm1
  PreDepends: multiarch-support
libdrm2
  Depends: libc6 (>= 2.7)
  PreDepends: multiarch-support
libglapi-mesa
  Depends: libc6 (>= 2.3.6-6~)
  PreDepends: multiarch-support
libx11-xcb1
  Depends: libc6 (>= 2.1.3)
  Depends: libx11-6
  PreDepends: multiarch-support
libxcb-glx0
  Depends: libc6 (>= 2.1.3)
  Depends: libxcb1
  PreDepends: multiarch-support
libxdamage1
  Depends: libc6 (>= 2.1.3)
  Depends: libx11-6
  Depends: libxfixes3
  PreDepends: multiarch-support
libxfixes3
  Depends: libc6 (>= 2.1.3)
  Depends: libx11-6
  PreDepends: multiarch-support
libxxf86vm1
  Depends: libc6 (>= 2.1.3)
  Depends: libx11-6 (>= 2:1.4.99.1)
  Depends: libxext6
  PreDepends: multiarch-support
libxrandr2
  Depends: libc6 (>= 2.1.3)
  Depends: libx11-6
  Depends: libxext6
  Depends: libxrender1
  PreDepends: multiarch-support
libxrender1
  Depends: libc6 (>= 2.1.3)
  Depends: libx11-6 (>= 2:1.4.99.1)
  PreDepends: multiarch-support
xorg-video-abi-10
xorg-video-abi-11
xorg-video-abi-6.0
xorg-video-abi-8
xserver-xorg-core
  Depends: keyboard-configuration
  Depends: libaudit0 (>= 1.7.13)
  Depends: libc6 (>= 2.8)
  Depends: libdrm2 (>= 2.3.1)
  Depends: libgcrypt11 (>= 1.4.5)
  Depends: libpciaccess0 (>= 0.12.902)
  Depends: libpixman-1-0 (>= 0.21.6)
  Depends: libselinux1 (>= 2.0.82)
  Depends: libudev0 (>= 154)
  Depends: libxau6
  Depends: libxdmcp6
  Depends: libxfont1 (>= 1:1.4.2)
  Depends: udev (>= 149)
  Depends: xserver-common (>= 2:1.12.1-2)
keyboard-configuration
  Depends: initscripts
  Depends: liblocale-gettext-perl
  PreDepends: debconf (>= 1.5.34)
initscripts
  Depends: coreutils (>= 5.93)
  Depends: debianutils (>= 4)
  Depends: file-rc
  Depends: libc6 (>= 2.4)
  Depends: lsb-base (>= 3.2-14)
  Depends: mount (>= 2.11x-1)
  Depends: sysv-rc
  Depends: sysvinit-utils (>= 2.86.ds1-64)
  Depends: ucf
coreutils
  Depends: dpkg (>= 1.15.4)
  Depends: install-info
  PreDepends: libacl1 (>= 2.2.51-5)
  PreDepends: libattr1 (>= 1:2.4.46-5)
  PreDepends: libc6 (>= 2.7)
  PreDepends: libselinux1 (>= 1.32)
install-info
  Depends: libc6 (>= 2.3.4)
libacl1
  Depends: libattr1 (>= 1:2.4.46-5)
  Depends: libc6 (>= 2.2)
  PreDepends: multiarch-support
libattr1
  Depends: libc6 (>= 2.2.3)
  PreDepends: multiarch-support
debianutils
  Depends: sensible-utils
  PreDepends: libc6 (>= 2.7)
sensible-utils
file-rc
lsb-base
mount
  PreDepends: libblkid1 (>= 2.20.1)
  PreDepends: libc6 (>= 2.8)
  PreDepends: libmount1 (>= 2.20.1)
  PreDepends: libselinux1 (>= 2.0.15)
  PreDepends: libsepol1 (>= 1.14)
libblkid1
  Depends: libc6 (>= 2.7)
  Depends: libuuid1 (>= 2.16)
  PreDepends: multiarch-support
libuuid1
  Depends: libc6 (>= 2.4)
  Depends: passwd
  PreDepends: multiarch-support
passwd
  Depends: debianutils (>= 2.15.2)
  Depends: libc6 (>= 2.8)
  Depends: libpam-modules
  Depends: libpam0g (>= 0.99.7.1)
  Depends: libselinux1 (>= 1.32)
  Depends: libsemanage1 (>= 2.0.3)
libpam-modules
  PreDepends: debconf (>= 0.5)
  PreDepends: debconf-2.0
  PreDepends: libc6 (>= 2.8)
  PreDepends: libdb5.1
  PreDepends: libpam-modules-bin (= 1.1.3-7.1)
  PreDepends: libpam0g (>= 1.1.3-2)
  PreDepends: libselinux1 (>= 2.0.85)
libdb5.1
  Depends: libc6 (>= 2.4)
  PreDepends: multiarch-support
libpam-modules-bin
  Depends: libc6 (>= 2.4)
  Depends: libpam0g (>= 0.99.7.1)
  Depends: libselinux1 (>= 1.32)
libpam0g
  Depends: debconf (>= 0.5)
  Depends: debconf-2.0
  Depends: libc6 (>= 2.8)
  PreDepends: multiarch-support
libsemanage1
  Depends: libbz2-1.0
  Depends: libc6 (>= 2.8)
  Depends: libselinux1 (>= 1.32)
  Depends: libsemanage-common (= 2.1.6-5)
  Depends: libsepol1 (>= 2.1.4)
  Depends: libustr-1.0-1 (>= 1.0.4)
  PreDepends: multiarch-support
libsemanage-common
libsepol1
  Depends: libc6 (>= 2.4)
  PreDepends: multiarch-support
libustr-1.0-1
  Depends: libc6 (>= 2.2)
libmount1
  Depends: libblkid1 (>= 2.17.2)
  Depends: libc6 (>= 2.8)
  Depends: libselinux1 (>= 1.32)
  Depends: libsepol1 (>= 1.14)
  PreDepends: multiarch-support
sysv-rc
  Depends: debconf (>= 0.5)
  Depends: debconf-2.0
  Depends: insserv (>> 1.12.0-10)
  Depends: sysvinit-utils (>= 2.86.ds1-62)
insserv
  Depends: libc6 (>= 2.7)
sysvinit-utils
  Depends: libc6 (>= 2.4)
  Depends: libselinux1 (>= 1.32)
ucf
  Depends: coreutils (>= 5.91)
  Depends: debconf (>= 1.5.19)
liblocale-gettext-perl
  Depends: libc6 (>= 2.2)
  PreDepends: perl-base (>= 5.14.2-3)
  PreDepends: perlapi-5.14.2
perlapi-5.14.2
libaudit0
  Depends: libc6 (>= 2.3.4)
libgcrypt11
  Depends: libc6 (>= 2.3)
  Depends: libgpg-error0 (>= 1.10)
  PreDepends: multiarch-support
libgpg-error0
  Depends: libc6 (>= 2.1.3)
  PreDepends: multiarch-support
libpciaccess0
  Depends: libc6 (>= 2.7)
  Depends: zlib1g (>= 1:1.2.3.3)
  PreDepends: multiarch-support
libpixman-1-0
  Depends: libc6 (>= 2.3)
  PreDepends: multiarch-support
libudev0
  Depends: libc6 (>= 2.8)
  PreDepends: multiarch-support
libxfont1
  Depends: libbz2-1.0
  Depends: libc6 (>= 2.4)
  Depends: libfontenc1
  Depends: libfreetype6 (>= 2.2.1)
  Depends: zlib1g (>= 1:1.1.4)
libfontenc1
  Depends: libc6 (>= 2.7)
  Depends: zlib1g (>= 1:1.2.6)
  PreDepends: multiarch-support
libfreetype6
  Depends: libc6 (>= 2.11)
  Depends: zlib1g (>= 1:1.1.4)
  PreDepends: multiarch-support
udev
  Depends: libc6 (>= 2.10)
  Depends: libselinux1 (>= 1.32)
  Depends: libudev0 (= 175-3.1)
  Depends: lsb-base (>= 3.0-6)
  Depends: util-linux (>= 2.16)
  PreDepends: debconf (>= 1.4.69)
  PreDepends: debconf-2.0
util-linux
  Depends: debconf (>= 0.5)
  Depends: debconf-2.0
  Depends: dpkg (>= 1.15.4)
  Depends: initscripts
  Depends: install-info
  Depends: lsb-base (>= 3.0-6)
  Depends: tzdata (>= 2006c-2)
  PreDepends: libblkid1 (>= 2.20.1)
  PreDepends: libc6 (>= 2.11)
  PreDepends: libncurses5 (>= 5.5-5~)
  PreDepends: libselinux1 (>= 1.32)
  PreDepends: libslang2 (>= 2.0.7-1)
  PreDepends: libtinfo5
  PreDepends: libuuid1 (>= 2.16)
  PreDepends: zlib1g (>= 1:1.1.4)
tzdata
  Depends: debconf (>= 0.5)
  Depends: debconf-2.0
libncurses5
  Depends: libc6 (>= 2.4)
  Depends: libtinfo5 (= 5.9-7)
  PreDepends: libtinfo5 (>= 5.9-3)
  PreDepends: multiarch-support
libtinfo5
  Depends: libc6 (>= 2.4)
  PreDepends: multiarch-support
libslang2
  Depends: libc6 (>= 2.4)
  PreDepends: multiarch-support
xserver-common
  Depends: x11-common
  Depends: x11-xkb-utils
  Depends: xkb-data
x11-common
  Depends: debconf (>= 0.5)
  Depends: debconf-2.0
  Depends: lsb-base (>= 1.3-9ubuntu2)
x11-xkb-utils
  Depends: libc6 (>= 2.7)
  Depends: libx11-6
  Depends: libxaw7
  Depends: libxkbfile1
  Depends: libxt6
libxaw7
  Depends: libc6 (>= 2.3)
  Depends: libx11-6
  Depends: libxext6
  Depends: libxmu6
  Depends: libxpm4
  Depends: libxt6
  PreDepends: multiarch-support
libxmu6
  Depends: libc6 (>= 2.7)
  Depends: libx11-6
  Depends: libxext6
  Depends: libxt6
  PreDepends: multiarch-support
libxt6
  Depends: libc6 (>= 2.7)
  Depends: libice6 (>= 1:1.0.0)
  Depends: libsm6
  Depends: libx11-6
  PreDepends: multiarch-support
libice6
  Depends: libc6 (>= 2.3)
  Depends: x11-common
  PreDepends: multiarch-support
libsm6
  Depends: libc6 (>= 2.1.3)
  Depends: libice6 (>= 1:1.0.0)
  Depends: libuuid1 (>= 2.16)
  PreDepends: multiarch-support
libxpm4
  Depends: libc6 (>= 2.7)
  Depends: libx11-6
  PreDepends: multiarch-support
libxkbfile1
  Depends: libc6 (>= 2.7)
  Depends: libx11-6
  PreDepends: multiarch-support
xkb-data
cheers,
rhodry.
Life isn't about waiting for the storm to pass...
it's about learning to dance in the rain.
adam777

Re: APT Preferences for a specific package

Post by adam777 »

Thank you both, I'll keep toying with it.
Perhaps I should have tested with a "simpler" package as a sanity check.
adam777

Re: APT Preferences for a specific package

Post by adam777 »

OK, here is the current situation.
I used the following preferences file:

Code: Select all

Package: vlc
Pin: release o=Debian,a=unstable
Pin-Priority: 900

Package: *
Pin: release o=Debian,a=unstable
Pin-Priority: 50

Package: *
Pin: release o=linuxmint
Pin-Priority: 700

Package: *
Pin: origin packages.linuxmint.com
Pin-Priority: 700

Package: *
Pin: release o=Debian
Pin-Priority: 500
Now, apt-cache policy for vlc displays the following, as expected:

Code: Select all

 vlc:
  Installed: 1:2.0.0-0.1
  Candidate: 2.0.1-4+b1
  Package pin: 2.0.1-4+b1
  Version table:
 *** 1:2.0.0-0.1 900
        500 http://debian.linuxmint.com/latest/multimedia/ testing/main amd64 Packages
        100 /var/lib/dpkg/status
     2.0.1-4+b1 900
         50 http://mirror.isoc.org.il/pub/debian/ unstable/main amd64 Packages
     2.0.0-6 900
        500 http://debian.linuxmint.com/latest/ testing/main amd64 Packages
However, once I try to launch an upgrade (even aptitude full-upgrade) operation, I get the following:

Code: Select all

No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
The one "not upgraded" being vlc.
It's more than likely the upgrade cannot proceed because the newer VLC package also requires other newer packages to be obtained from unstable.
However, If I change the unstable to different priority other problems arise:
- more than 100 - gets priority over installed, but not over normal repository, and so the upgrade will still not use the needed packages from unstable.
- more than 500 - gets priority over both installed and normal repository, which will cause a full system upgrade, not what I want.

I'm aware of the fact that the whole pinning scheme is usually done with manual installation of a package stating "unstable", but is there no way of pinning to unstable not a single package (vlc) but a package along with all its dependencies?

Adam.
zerozero

Re: APT Preferences for a specific package

Post by zerozero »

subscribing with interest.

this works here

Code: Select all

zerozero@debian:~$ inxi -Sr
System:    Host: debian Kernel: 3.2.0-2-amd64 x86_64 (64 bit) Desktop Gnome Distro: Debian GNU/Linux wheezy/sid
Repos:     Active apt sources in file: /etc/apt/sources.list
           deb http://ftp.debian.org/debian testing main contrib non-free
           deb http://security.debian.org/ testing/updates main contrib non-free
           deb http://www.debian-multimedia.org testing main non-free
           deb-src http://ftp.debian.org/debian testing main contrib non-free
           deb-src http://security.debian.org/ testing/updates main contrib non-free
           deb-src http://www.debian-multimedia.org testing main non-free
           deb http://ftp.debian.org/debian unstable main contrib non-free
had no preferences file, so made this one for this experiment

Code: Select all

zerozero@debian:~$ cat /etc/apt/preferences
Package: *
Pin: release a=testing
Pin-Priority: 500

Package: *
Pin: release a=unstable
Pin-Priority: 200
and the result is

Code: Select all

zerozero@debian:~$ sudo apt-get update && sudo apt-get dist-upgrade
Ign http://www.debian-multimedia.org testing InRelease
Hit http://www.debian-multimedia.org testing Release.gpg                
Hit http://security.debian.org testing/updates InRelease                
Hit http://www.debian-multimedia.org testing Release    
Hit http://www.debian-multimedia.org testing/main Sources               
Hit http://security.debian.org testing/updates/main Sources             
Hit http://ftp.debian.org testing InRelease                             
Get:1 http://ftp.debian.org unstable InRelease [233 kB]                 
Hit http://security.debian.org testing/updates/contrib Sources          
Hit http://security.debian.org testing/updates/non-free Sources         
Hit http://security.debian.org testing/updates/main amd64 Packages      
Hit http://security.debian.org testing/updates/contrib amd64 Packages   
Hit http://security.debian.org testing/updates/non-free amd64 Packages  
Hit http://www.debian-multimedia.org testing/non-free Sources           
Hit http://www.debian-multimedia.org testing/main amd64 Packages/DiffIndex
Hit http://www.debian-multimedia.org testing/non-free amd64 Packages/DiffIndex
Ign http://www.debian-multimedia.org testing/main TranslationIndex      
Ign http://www.debian-multimedia.org testing/non-free TranslationIndex  
Ign http://security.debian.org testing/updates/contrib TranslationIndex 
Ign http://security.debian.org testing/updates/main TranslationIndex
Ign http://security.debian.org testing/updates/non-free TranslationIndex
Ign http://www.debian-multimedia.org testing/main Translation-en_GB
Ign http://www.debian-multimedia.org testing/main Translation-en
Ign http://www.debian-multimedia.org testing/non-free Translation-en_GB
Ign http://www.debian-multimedia.org testing/non-free Translation-en    
Hit http://ftp.debian.org testing/main Sources/DiffIndex                
Hit http://ftp.debian.org testing/contrib Sources/DiffIndex
Hit http://ftp.debian.org testing/non-free Sources/DiffIndex
Hit http://ftp.debian.org testing/main amd64 Packages/DiffIndex
Hit http://ftp.debian.org testing/contrib amd64 Packages/DiffIndex
Hit http://ftp.debian.org testing/non-free amd64 Packages/DiffIndex
Ign http://ftp.debian.org testing/contrib TranslationIndex
Hit http://ftp.debian.org testing/main TranslationIndex
Ign http://ftp.debian.org testing/non-free TranslationIndex
Ign http://security.debian.org testing/updates/contrib Translation-en_GB
Ign http://security.debian.org testing/updates/contrib Translation-en
Ign http://security.debian.org testing/updates/main Translation-en_GB
Ign http://security.debian.org testing/updates/main Translation-en
Ign http://security.debian.org testing/updates/non-free Translation-en_GB
Get:2 http://ftp.debian.org unstable/main amd64 Packages [5,979 kB]
Ign http://security.debian.org testing/updates/non-free Translation-en
Get:3 http://ftp.debian.org unstable/contrib amd64 Packages [45.8 kB]   
Get:4 http://ftp.debian.org unstable/non-free amd64 Packages [82.0 kB]  
Ign http://ftp.debian.org unstable/contrib TranslationIndex             
Get:5 http://ftp.debian.org unstable/main TranslationIndex [2,295 B]    
Ign http://ftp.debian.org unstable/non-free TranslationIndex            
Hit http://ftp.debian.org testing/contrib Translation-en                
Hit http://ftp.debian.org testing/main Translation-en                   
Hit http://ftp.debian.org testing/non-free Translation-en               
Get:6 http://ftp.debian.org unstable/contrib Translation-en [37.0 kB]   
Get:7 http://ftp.debian.org unstable/main Translation-en [3,952 kB]     
Get:8 http://ftp.debian.org unstable/non-free Translation-en [69.2 kB]  
Ign http://ftp.debian.org testing/contrib Translation-en_GB             
Ign http://ftp.debian.org testing/non-free Translation-en_GB            
Ign http://ftp.debian.org unstable/contrib Translation-en_GB            
Ign http://ftp.debian.org unstable/non-free Translation-en_GB           
Fetched 10.4 MB in 48s (213 kB/s)                                       
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
zerozero@debian:~$ 

testing with vlc (the results here are funny because i have vlc from debian-multimedia (testing) and only added main debian sid (so apt does a couple upgrades and downgrades at the same time) but point being: the pkgs are being pulled from sid

Code: Select all

zerozero@debian:~$ sudo apt-get install -s vlc/unstable
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Selected version '2.0.1-4+b1' (Debian:unstable [amd64]) for 'vlc'
Selected version '2.0.1-4+b1' (Debian:unstable [amd64]) for 'vlc-nox' because of 'vlc'
Selected version '1:1.6.17-1.1' (Debian:unstable [amd64]) for 'libupnp6' because of 'vlc-nox'
Selected version '2.0.1-4+b1' (Debian:unstable [amd64]) for 'vlc-plugin-notify' because of 'vlc'
Selected version '2.0.1-4+b1' (Debian:unstable [amd64]) for 'vlc-plugin-pulse' because of 'vlc'
The following packages were automatically installed and are no longer required:
  libxcb-aux0 libswscale0 libxcb-atom1 libavutil49 libhal-storage1
  tcptraceroute libkpathsea5 libicu44 libboost-date-time1.42.0
  libobrender21 librasqal2 libavcodec52 libobparser21 libxcb-event1
  libdmx1 libpango1.0-common libgmp3c2 libhal1 hal libgtkglext1
  libreadline5 libfm-gtk0 xulrunner-1.9.1 libpoppler5
  libboost-thread1.42.0 libgail-common libfm0 libgs8 libavformat52
  libhunspell-1.2-0 libmozjs2d libjpeg62 libnl1 libraptor1 libgraphite3
  cpp-4.4 hal-info openoffice.org-common openoffice.org-style-galaxy
  defoma libxcb-render-util0 libnet1
Use 'apt-get autoremove' to remove them.
The following extra packages will be installed:
  libupnp6 vlc-nox vlc-plugin-notify vlc-plugin-pulse
Suggested packages:
  videolan-doc
The following packages will be REMOVED:
  libupnp-dev libupnp3 libupnp3-dev
The following NEW packages will be installed:
  libupnp6
The following packages will be DOWNGRADED:
  vlc vlc-nox vlc-plugin-notify vlc-plugin-pulse
0 upgraded, 1 newly installed, 4 downgraded, 3 to remove and 0 not upgraded.
Remv libupnp-dev [1:1.6.6-5.1]
Inst vlc-plugin-pulse [1:2.0.1-0.6] (2.0.1-4+b1 Debian:unstable [amd64]) []
Inst vlc-plugin-notify [1:2.0.1-0.6] (2.0.1-4+b1 Debian:unstable [amd64]) []
Inst vlc [1:2.0.1-0.6] (2.0.1-4+b1 Debian:unstable [amd64]) []
Inst vlc-nox [1:2.0.1-0.6] (2.0.1-4+b1 Debian:unstable [amd64]) []
Remv libupnp3-dev [1:1.6.6-5.1] []
Remv libupnp3 [1:1.6.6-5.1] []
Inst libupnp6 (1:1.6.17-1.1 Debian:unstable [amd64])
Conf libupnp6 (1:1.6.17-1.1 Debian:unstable [amd64])
Conf vlc-nox (2.0.1-4+b1 Debian:unstable [amd64])
Conf vlc-plugin-pulse (2.0.1-4+b1 Debian:unstable [amd64])
Conf vlc-plugin-notify (2.0.1-4+b1 Debian:unstable [amd64])
Conf vlc (2.0.1-4+b1 Debian:unstable [amd64])
zerozero@debian:~$ 
bare in mind a couple warnings:
- this was made in debian proper (where i had no preferences file to start with)
- the apt-pinning lmde already uses has pluses and minus (study it well)
adam777

Re: APT Preferences for a specific package

Post by adam777 »

Appreciated, zerozero.
I think the main problem lies with the fact that I try to get the work flow to go exclusively via upgrades, not explicit installs.
Suppose I do make an explicit install from unstable, I can work the priorities so no downgrade will occur to VLC and its dependencies.
However, I'm back where I started - once a new version comes up in unstable, I will not get updated via the upgrade command, but have to some how learn of the new version and perform another manual install from unstable.
The above is not much different in terms of update convenience to installing from a deb file manually.

Coming to think of it, a "solution" that would work would be to generate a list of all the dependencies for all the packages I want from unstable using apt-rdepends (that is, for example - VLC and its dependencies plus fglrx-driver and its dependencies etc.).
Once I have such list, create a MASSIVE preferences file pinning each of those packages to unstable.
Theoretically that should work.

That being said, this solution is as gentle as a bull in a china shop :D
Considering this is still my trial and error period, I'm still keeping an eye for the upcoming release of Mint 13, where such things are easier to accomplish using PPA's.
Perhaps the disadvantages comparing to LMDE aren't so substantial after all...
zerozero

Re: APT Preferences for a specific package

Post by zerozero »

ok, roger :lol:
back to the drawing table

Code: Select all

Package: *
Pin: release a=testing
Pin-Priority: 500

Package: *
Pin: release a=unstable
Pin-Priority: 200

Package: vlc*
Pin: release a=unstable
Pin-Priority: 600

Code: Select all

zerozero@debian:~$ apt-cache policy vlc
vlc:
  Installed: 1:2.0.1-0.6
  Candidate: 2.0.1-4+b1
  Package pin: 2.0.1-4+b1
  Version table:
 *** 1:2.0.1-0.6 600
        500 http://www.debian-multimedia.org/ testing/main amd64 Packages
        100 /var/lib/dpkg/status
     2.0.1-4+b1 600
        200 http://ftp.debian.org/debian/ unstable/main amd64 Packages
     2.0.1-4 600
        500 http://ftp.debian.org/debian/ testing/main amd64 Packages

Code: Select all

zerozero@debian:~$ sudo apt-get -s dist-upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages will be REMOVED:
  libupnp-dev libupnp3 libupnp3-dev
The following NEW packages will be installed:
  libupnp6
The following packages will be DOWNGRADED:
  vlc vlc-nox vlc-plugin-notify vlc-plugin-pulse
0 upgraded, 1 newly installed, 4 downgraded, 3 to remove and 1 not upgraded.
Remv libupnp-dev [1:1.6.6-5.1]
Inst vlc-plugin-pulse [1:2.0.1-0.6] (2.0.1-4+b1 Debian:unstable [amd64]) []
Inst vlc-plugin-notify [1:2.0.1-0.6] (2.0.1-4+b1 Debian:unstable [amd64]) []
Inst vlc [1:2.0.1-0.6] (2.0.1-4+b1 Debian:unstable [amd64]) []
Inst vlc-nox [1:2.0.1-0.6] (2.0.1-4+b1 Debian:unstable [amd64]) []
Remv libupnp3-dev [1:1.6.6-5.1] []
Remv libupnp3 [1:1.6.6-5.1] []
Inst libupnp6 (1:1.6.17-1.1 Debian:unstable [amd64])
Conf libupnp6 (1:1.6.17-1.1 Debian:unstable [amd64])
Conf vlc-nox (2.0.1-4+b1 Debian:unstable [amd64])
Conf vlc-plugin-pulse (2.0.1-4+b1 Debian:unstable [amd64])
Conf vlc-plugin-notify (2.0.1-4+b1 Debian:unstable [amd64])
Conf vlc (2.0.1-4+b1 Debian:unstable [amd64])
zerozero@debian:~$ 
- again, this needs further adaptation for lmde;
- needs for sure more tweaking (i'm a nOObie regarding this subject)
adam777

Re: APT Preferences for a specific package

Post by adam777 »

Hmmm, wildcards, an interesting idea :D
Will try to work it out and report back how it ended.
adam777

Re: APT Preferences for a specific package

Post by adam777 »

Well, seems like a dead end :(
The use of wildcard isn't that helpful, as VLC depends (on different level of the recursion) on about 200 packages, only 5 of which contains "vlc" in their name.
Granted, from all those 200 packages only about 10 do not meet requirements in current state (that is, most of the packages VLC depends on are installed and have a recent enough version).
While I could pin those 10 packages to make sure they are updated from sid, things are rather dynamic I suppose, and so it will not help much.
Seems like manual installation and updating, complete switch to sid or just switch to Mint 13 are the possible solutions.
Thanks again, zerozero, it has been a good lesson :D

PS. On a more general view, the fact that VLC alone depends on ~200 packages, and considering that it is only one application, really makes me doubt the usefulness on a mixed system in this situation.
zerozero

Re: [~Solved] APT Preferences for a specific package

Post by zerozero »

adam,
well i can see where is the problem here, and why it doesn't work for you but it did for me in testing (even with those upgrades and downgrades)
- you are tracking latest frozen around march/20th
- i'm tracking testing (updated daily and following closely sid)
- you are jumping through 2 months worth of updates (and that probably can be done but is out of my skills)
adam777

Re: [~Solved] APT Preferences for a specific package

Post by adam777 »

I completely forgot about UP, so I have pointed my machine to use the testing repositories, and an aptitude upgrade is on the move as we speak.
Lots of updates, even while using safe-upgrade, once I'm on the other side, I'll see how it goes.

Since I kind of like the idea of UP, mainly in order to make sure all the mint stuff is functioning as it should, a thing that is more likely to break when tracking testing directly, this is mostly a kind of sanity check.
As is the situation this days, the mint repositories can get quite behind the debian ones when the team is busy preparing a release or whatever.
So I'm (in my eyes at least :D ) simulating LMDE with UP5, and see how it goes from there.

Adam.

PS. As a nice bonus, the standard debian repository has a much faster mirror for me comparing with mint servers.
PPS. Your LMDE FAQ has been of great assistance.
zerozero

Re: [~Solved] APT Preferences for a specific package

Post by zerozero »

just a quick note: i don't use aptitude (find apt more reliable, but that's another story), anyway you might want to check if aptitude full-upgrade gives any extra output. you want to be full updated :)

tks about the faq
adam777

Re: [~Solved] APT Preferences for a specific package

Post by adam777 »

full-upgrade will follow.
adam777

Re: APT Preferences for a specific package

Post by adam777 »

Well, upgrade hasn't gone so smoothly - from the top of my head - the LMDE desktop background (which I suppose is part of a more comprehensive package) and the ATI control panel both went missing.
Perhaps it has something to do with the default preferences file not playing so nice with tracking testing directly.
Any idea if I should change something in the default preferences file so upgrade will behave better when tracking testing? (before even attempting any pinning or such thing).
Default reads:
- Mint packages priority - 700
- Debian packages priority - 500
Perhaps I should add something regarding "testing" priority.
At least in the case of the ATI control panel (fglrx-control), there were two dependencies in which the first solution aptitude suggested was to keep as is (thus not installing fglrx-control), while the second solution was to upgrade to a newer version sourced from testing following by the installation of fglrx-control, which is pretty much what I want it to do all the time...
zerozero

Re: APT Preferences for a specific package

Post by zerozero »

adam,
coming to testing has a price see this post
about that particular issue i think it's related with this and this
i have no idea what happened to the ati control panel :oops:

edit: i missed the edit you've made to the post.
zerozero

Re: APT Preferences for a specific package

Post by zerozero »

my opinion: (but it's up to the user) that once you go to testing or sid you should get rid of the preferences file this is from yesterday
adam777

Re: APT Preferences for a specific package

Post by adam777 »

OK, I'll try to begin from a fresh installation, this time using no preferences file.
On a more general note, taking a little detour and that's about it regarding the matter:
When tracking testing directly, is there any significant difference between LMDE and Debian testing, assuming all the mint stuff is still working? (and yes, it's a bit simplistic...).
Locked

Return to “LMDE Archive”