LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Password
Debian This forum is for the discussion of Debian Linux.

Notices


Reply
  Search this Thread
Old 03-29-2012, 01:48 PM   #1
davem7
LQ Newbie
 
Registered: Jun 2010
Distribution: OpenSUSE (tumbleweed), Debian (server)
Posts: 19

Rep: Reputation: 0
Please help me out with my preferences file and apt-get /aptitude. I am at wits end.


Hello. I have a new Debian Squeeze install on a remote server and I must keep php 5.2.x for now even though it is unsupported (I have an old script which is encoded and provided by a 3rd party which I rely on). I have successfully done that by making use of archive (lenny) and pulling from there. But my problem is that now I need to update my codecs and ffmpeg.

What is happening with this now is:

1. php 5.3.x is being held back correctly. (good)
2. It does not seem to be pulling in the newer ffmpeg from the multimedia repo (bad).

Quote:
# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages have been kept back:
ffmpeg libapache2-mod-php5 libavcodec52 libavdevice52 libavformat52 libpostproc51 libswscale0 mencoder mplayer php5-cli php5-common php5-gd php5-mysql php5-suhosin
The following packages will be upgraded:
libdrm-intel1 libdrm-radeon1 libdrm2 libvpx0
4 upgraded, 0 newly installed, 0 to remove and 14 not upgraded.
Need to get 1,543 kB of archives.
After this operation, 41.0 kB disk space will be freed.
Do you want to continue [Y/n]? n
Abort.

What I want it to pull from in order is:

- any php5* (or other related php 5.2.x file) use archive.debian.org

- For ffmpeg and all codecs, use the www.debian-multimedia.org repo.

- For everything else, use Debian Squeeze as normal.

Here's my /etc/apt/sources.list:

Code:
# deb http://ftp.us.debian.org/debian/ squeeze main

deb http://ftp.us.debian.org/debian/ squeeze main
deb-src http://ftp.us.debian.org/debian/ squeeze main

deb http://security.debian.org/ squeeze/updates main
deb-src http://security.debian.org/ squeeze/updates main

# squeeze-updates, previously known as 'volatile'
deb http://ftp.us.debian.org/debian/ squeeze-updates main
deb-src http://ftp.us.debian.org/debian/ squeeze-updates main

#for old php
#deb ftp://ftp2.de.debian.org/debian/ lenny main contrib non-free
#deb-src ftp://ftp2.de.debian.org/debian/ lenny main contrib non-free
#deb ftp://ftp.us.debian.org/debian/ lenny main contrib non-free
#deb-src ftp://ftp.us.debian.org/debian/ lenny main contrib non-free
deb http://archive.debian.org/debian/ lenny main contrib non-free
deb-src http://archive.debian.org/debian/ lenny main contrib non-free

#for multimedia
deb http://www.debian-multimedia.org squeeze main non-free

And my /etc/apt/preferences.d/preferences:

Code:
Package: php5-enchant
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-svn 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-lasso 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-xsl 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-symfony1.0
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-xapian 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-memcached
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-remctl
Pin: release a=lenny
Pin-Priority: 1100

Package: php5 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-sasl
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-sqlite
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-interbase
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-tidy 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-xdebug
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-snmp 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-gd
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-ps
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-exactimage
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-auth-pam
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-curl
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-memcache
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-radius
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-uuid
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-pspell
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-mhash
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-xmlrpc
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-pgsql
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-gpib
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-mcrypt
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-recode
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-tokyo-tyrant
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-ffmpeg 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-imap
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-intl 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-geoip 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-ldap 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-xcache 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-imagick 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-mysql
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-dbg 
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-cgi
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-mapscript
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-cli
Pin: release a=lenny
Pin-Priority: 1100 

Package: php5-dev 
Pin: release a=lenny
Pin-Priority: 1100 

Package: php5-gmp 
Pin: release a=lenny
Pin-Priority: 1100 

Package: php5-adodb
Pin: release a=lenny
Pin-Priority: 1100 

Package: php5-idn
Pin: release a=lenny
Pin-Priority: 1100 

Package: php5-common
Pin: release a=lenny
Pin-Priority: 1100 

Package: php5-librdf
Pin: release a=lenny
Pin-Priority: 1100 

Package: php5-sqlrelay
Pin: release a=lenny
Pin-Priority: 1100 

Package: php5-ming
Pin: release a=lenny
Pin-Priority: 1100 

Package: php5-sybase
Pin: release a=lenny
Pin-Priority: 1100 

Package: php5-odbc
Pin: release a=lenny
Pin-Priority: 1100

Package: php5-suhosin
Pin: release a=lenny
Pin-Priority: 1100

Package: libapache2-mod-php5
Pin: release a=lenny
Pin-Priority: 1100

Package: *
Pin: origin www.debian-multimedia.org
Pin-Priority: 990

Package: *
Pin: release a=stable
Pin-Priority: 600
The preferences file is a monster because evidently wildcards besides a lone '*' do not work (i.e. specifying 'php5*' is not supported) and I need to keep all the php5* files at php 5.2.x. The top lines just repeat different packages. Don't waste your time checking each individually. The bottom ones are for Squeeze and debian-multimedia.

Please let me know where I am going wrong. Thank you for your assistance.

Last edited by davem7; 03-29-2012 at 02:12 PM.
 
Old 03-29-2012, 02:56 PM   #2
davem7
LQ Newbie
 
Registered: Jun 2010
Distribution: OpenSUSE (tumbleweed), Debian (server)
Posts: 19

Original Poster
Rep: Reputation: 0
Well I believe I have everything all messed up.

Here is the output of 'apt-cache policy' after some tinkering:

Code:
# apt-cache policy
Package files:
 100 /var/lib/dpkg/status
     release a=now
 800 http://www.debian-multimedia.org/ squeeze/non-free i386 Packages
     origin www.debian-multimedia.org
 800 http://www.debian-multimedia.org/ squeeze/main i386 Packages
     origin www.debian-multimedia.org
 500 http://archive.debian.org/debian/ lenny/non-free i386 Packages
     release v=5.0.10,o=Debian,a=oldstable,n=lenny,l=Debian,c=non-free
     origin archive.debian.org
 500 http://archive.debian.org/debian/ lenny/contrib i386 Packages
     release v=5.0.10,o=Debian,a=oldstable,n=lenny,l=Debian,c=contrib
     origin archive.debian.org
 500 http://archive.debian.org/debian/ lenny/main i386 Packages
     release v=5.0.10,o=Debian,a=oldstable,n=lenny,l=Debian,c=main
     origin archive.debian.org
 500 http://ftp.us.debian.org/debian/ squeeze-updates/main i386 Packages
     release o=Debian,a=stable-updates,n=squeeze-updates,l=Debian,c=main
     origin ftp.us.debian.org
 600 http://security.debian.org/ squeeze/updates/main i386 Packages
     release v=6.0,o=Debian,a=stable,n=squeeze,l=Debian-Security,c=main
     origin security.debian.org
 600 http://ftp.us.debian.org/debian/ squeeze/main i386 Packages
     release v=6.0.4,o=Debian,a=stable,n=squeeze,l=Debian,c=main
     origin ftp.us.debian.org
Pinned packages:
     php5-enchant -> (not found)
     php5-svn -> (not found)
     php5-lasso -> (not found)
     php5-xsl -> (not found)
     php5-symfony1.0 -> (not found)
     php5-xapian -> (not found)
     php5-memcached -> (not found)
     php5-remctl -> (not found)
     php5 -> (not found)
     php5-sasl -> (not found)
     php5-sqlite -> (not found)
     php5-interbase -> (not found)
     php5-tidy -> (not found)
     php5-xdebug -> (not found)
     php5-snmp -> (not found)
     php5-gd -> (not found)
     php5-ps -> (not found)
     php5-exactimage -> (not found)
     php5-auth-pam -> (not found)
     php5-curl -> (not found)
     php5-memcache -> (not found)
     php5-radius -> (not found)
     php5-uuid -> (not found)
     php5-pspell -> (not found)
     php5-mhash -> (not found)
     php5-xmlrpc -> (not found)
     php5-pgsql -> (not found)
     php5-gpib -> (not found)
     php5-mcrypt -> (not found)
     php5-recode -> (not found)
     php5-tokyo-tyrant -> (not found)
     php5-ffmpeg -> (not found)
     php5-imap -> (not found)
     php5-intl -> (not found)
     php5-geoip -> (not found)
     php5-ldap -> (not found)
     php5-xcache -> (not found)
     php5-imagick -> (not found)
     php5-mysql -> (not found)
     php5-dbg -> (not found)
     php5-cgi -> (not found)
     php5-mapscript -> (not found)
     php5-cli -> (not found)
     php5-dev -> (not found)
     libapache2-mod-php5 -> (not found)
     php5-gmp -> (not found)
     php5-adodb -> (not found)
     php5-idn -> (not found)
     php5-common -> (not found)
     php5-librdf -> (not found)
     php5-sqlrelay -> (not found)
     php5-ming -> (not found)
     php5-sybase -> (not found)
     php5-odbc -> (not found)
     php5-suhosin -> (not found)
I theorize I don't have the preferences for the Lenny archive correctly configured and his is messign it up.

Any help would be appreciated or failing that some really good documentation for pinning. I've found some resources online but they have been lacking in thoroughness. I need something comprehensive and up-to-date.
 
Old 03-29-2012, 03:12 PM   #3
davem7
LQ Newbie
 
Registered: Jun 2010
Distribution: OpenSUSE (tumbleweed), Debian (server)
Posts: 19

Original Poster
Rep: Reputation: 0
Solved this one myself.

Correct /etc/apt/preferences.d/preferences:

Code:
Package: php5-enchant
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-svn 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-lasso 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-xsl 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-symfony1.0
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-xapian 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-memcached
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-remctl
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-sasl
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-sqlite
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-interbase
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-tidy 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-xdebug
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-snmp 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-gd
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-ps
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-exactimage
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-auth-pam
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-curl
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-memcache
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-radius
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-uuid
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-pspell
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-mhash
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-xmlrpc
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-pgsql
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-gpib
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-mcrypt
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-recode
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-tokyo-tyrant
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-ffmpeg 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-imap
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-intl 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-geoip 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-ldap 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-xcache 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-imagick 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-mysql
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-dbg 
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-cgi
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-mapscript
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-cli
Pin: release a=oldstable
Pin-Priority: 1100 

Package: php5-dev 
Pin: release a=oldstable
Pin-Priority: 1100 

Package: php5-gmp 
Pin: release a=oldstable
Pin-Priority: 1100 

Package: php5-adodb
Pin: release a=oldstable
Pin-Priority: 1100 

Package: php5-idn
Pin: release a=oldstable
Pin-Priority: 1100 

Package: php5-common
Pin: release a=oldstable
Pin-Priority: 1100 

Package: php5-librdf
Pin: release a=oldstable
Pin-Priority: 1100 

Package: php5-sqlrelay
Pin: release a=oldstable
Pin-Priority: 1100 

Package: php5-ming
Pin: release a=oldstable
Pin-Priority: 1100 

Package: php5-sybase
Pin: release a=oldstable
Pin-Priority: 1100 

Package: php5-odbc
Pin: release a=oldstable
Pin-Priority: 1100

Package: php5-suhosin
Pin: release a=oldstable
Pin-Priority: 1100

Package: libapache2-mod-php5
Pin: release a=oldstable
Pin-Priority: 1100

Package: *
Pin: origin www.debian-multimedia.org
Pin-Priority: 800

Package: *
Pin: release a=stable
Pin-Priority: 600
'apt-cache policy' now shows:

Quote:
apt-cache policy
Package files:
100 /var/lib/dpkg/status
release a=now
800 http://www.debian-multimedia.org/ squeeze/non-free i386 Packages
origin www.debian-multimedia.org
800 http://www.debian-multimedia.org/ squeeze/main i386 Packages
origin www.debian-multimedia.org
500 http://archive.debian.org/debian/ lenny/non-free i386 Packages
release v=5.0.10,o=Debian,a=oldstable,n=lenny,l=Debian,c=non-free
origin archive.debian.org
500 http://archive.debian.org/debian/ lenny/contrib i386 Packages
release v=5.0.10,o=Debian,a=oldstable,n=lenny,l=Debian,c=contrib
origin archive.debian.org
500 http://archive.debian.org/debian/ lenny/main i386 Packages
release v=5.0.10,o=Debian,a=oldstable,n=lenny,l=Debian,c=main
origin archive.debian.org
500 http://ftp.us.debian.org/debian/ squeeze-updates/main i386 Packages
release o=Debian,a=stable-updates,n=squeeze-updates,l=Debian,c=main
origin ftp.us.debian.org
600 http://security.debian.org/ squeeze/updates/main i386 Packages
release v=6.0,o=Debian,a=stable,n=squeeze,l=Debian-Security,c=main
origin security.debian.org
600 http://ftp.us.debian.org/debian/ squeeze/main i386 Packages
release v=6.0.4,o=Debian,a=stable,n=squeeze,l=Debian,c=main
origin ftp.us.debian.org
Pinned packages:
php5-enchant -> (not found)
php5-svn -> (not found)
php5-lasso -> 2.2.1-2
php5-xsl -> 5.2.6.dfsg.1-1+lenny16
php5-symfony1.0 -> 1.0.17-4
php5-xapian -> 1.0.7-3.1
php5-memcached -> (not found)
php5-remctl -> (not found)
php5 -> 5.2.6.dfsg.1-1+lenny16
php5-sasl -> 0.1.0-1
php5-sqlite -> 5.2.6.dfsg.1-1+lenny16
php5-interbase -> 5.2.6.dfsg.1-1+lenny16
php5-tidy -> 5.2.6.dfsg.1-1+lenny16
php5-xdebug -> 2.0.3-1
php5-snmp -> 5.2.6.dfsg.1-1+lenny16
php5-gd -> 5.2.6.dfsg.1-1+lenny16
php5-ps -> 1.3.6-3
php5-exactimage -> (not found)
php5-auth-pam -> 0.4-10
php5-curl -> 5.2.6.dfsg.1-1+lenny16
php5-memcache -> 3.0.1-1
php5-radius -> 1.2.5-2
php5-uuid -> 1.5.1-1.1+b1
php5-pspell -> 5.2.6.dfsg.1-1+lenny16
php5-mhash -> 5.2.6.dfsg.1-1+lenny16
php5-xmlrpc -> 5.2.6.dfsg.1-1+lenny16
php5-pgsql -> 5.2.6.dfsg.1-1+lenny16
php5-gpib -> 3.2.11-1
php5-mcrypt -> 5.2.6.dfsg.1-1+lenny16
php5-recode -> 5.2.6.dfsg.1-1+lenny16
php5-tokyo-tyrant -> (not found)
php5-ffmpeg -> 0.5.3.1-3
php5-imap -> 5.2.6.dfsg.1-1+lenny16
php5-intl -> (not found)
php5-geoip -> 1.0.3-1
php5-ldap -> 5.2.6.dfsg.1-1+lenny16
php5-xcache -> 1.2.2-3
php5-imagick -> 2.1.1RC1-1
php5-mysql -> 5.2.6.dfsg.1-1+lenny16
php5-dbg -> 5.2.6.dfsg.1-1+lenny16
php5-cgi -> 5.2.6.dfsg.1-1+lenny16
php5-mapscript -> 5.0.3-3+lenny7
php5-cli -> 5.2.6.dfsg.1-1+lenny16
php5-dev -> 5.2.6.dfsg.1-1+lenny16
libapache2-mod-php5 -> 5.2.6.dfsg.1-1+lenny16
php5-gmp -> 5.2.6.dfsg.1-1+lenny16
php5-adodb -> 5.04-3
php5-idn -> 1.2b-5.3
php5-common -> 5.2.6.dfsg.1-1+lenny16
php5-librdf -> 1.0.7.1-1+b1
php5-sqlrelay -> 1:0.39.4-6
php5-ming -> 1:0.3.0-14
php5-sybase -> 5.2.6.dfsg.1-1+lenny16
php5-odbc -> 5.2.6.dfsg.1-1+lenny16
php5-suhosin -> 0.9.27-1
Then:

apt-get update
apt-get -V upgrade
apt-get -V dist-upgrade

did the trick and pulled in what I needed while keeping the old php 5.2.x.

My error was in using 'a=lenny' as opposed to 'a=oldstable'. I also had not realized that I apparently needed to do a 'apt-get -V dist-upgrade' to pull in the new major versions. This was a nice learning experience.

Marking solved.

Last edited by davem7; 03-29-2012 at 03:13 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
apt preferences file? eveningsky339 Debian 8 03-03-2011 08:43 PM
nearing wits end enoch1977 Linux - Networking 19 09-30-2006 07:35 PM
Newbie at wits end. Want to buy help. Child of Wonder Linux - Networking 3 02-08-2005 12:20 PM
@ my wits end .. HEEEEEEEELLLLLLLLPPPPP chemdawg Linux - Newbie 3 01-30-2005 05:16 PM
I'm am completely stumped and at my wits end jtX Linux - General 16 06-25-2003 06:35 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 02:25 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration