[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

apt-pinning



Hi,

I have a machine with Wheezy installed, unfortunately I can't use PHP5.4 due to a third party script which isn't compatible yet.

So I added the Squeeze-Sources in my apt sources.list and installed PHP5.3 from Squeeze.

I also created the file "php" in /etc/apt/preferences.d/ containing:

Package: php*
  Pin: release n=squeeze
  Pin-Priority: 900

Package: libapache2-mod-php5
  Pin: release n=squeeze
  Pin-Priority: 900

But when I check the policy it doesn't seem to work:

apt-cache policy php5
php5:
  Installed: 5.3.3-7+squeeze13
  Candidate: 5.4.4-2
  Version table:
     5.4.4-2 0
        500 ftp://mirror.manitu.net/debian/ wheezy/main amd64 Packages
 *** 5.3.3-7+squeeze13 0
        500 http://security.debian.org/ squeeze/updates/main amd64 Packages
        100 /var/lib/dpkg/status
     5.3.3-7+squeeze8 0
        500 ftp://mirror.manitu.net/debian/ squeeze/main amd64 Packages

I tried to lower the priority for the wheezy packages:

Package: php*
    Pin: release n=wheezy
    Pin-Priority: -10

Package: libapache2-mod-php5
    Pin: release n=wheezy
    Pin-Priority: -10

I also tried pinning to "Pin: version 5.3.*" but that didn't helped either.

To prevent upgrading I used echo "php-mail-mime hold" | dpkg --set-selections etc. for now, but sooner or later I will have to run a apt-get dist-upgrade and it would be nice if I hasn't to upgrade first and do a rollback for PHP afterwards.

Thanks in advance.
Bye.


Reply to: