SEARCH

Enter your search query in the box above ^, or use the forum search tool.

You are not logged in.

#26 2011-04-25 10:30:26

JmsCrk
Member
Registered: 2010-05-26
Posts: 18

Re: Apt Pinning and You: Living on the Edge with #!

Thanks for the easy to follow instructions!

However I think there's a small typo:

sudo apt-get -t experimental $package_name

should be

sudo apt-get -t experimental install $package_name

or something like that?

Offline

Help fund CrunchBang, donate to the project!

#27 2011-04-25 13:21:01

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 8,904

Re: Apt Pinning and You: Living on the Edge with #!

NIce catch. I edited the post to fix the typo.


Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Offline

#28 2011-04-30 21:35:11

kevdunleavy
New Member
Registered: 2011-04-30
Posts: 6

Re: Apt Pinning and You: Living on the Edge with #!

Great post! Really cool.

It all went fine as far as I can tell except when I did apt-get upgrade there was no packages to upgrade hmm

And then when I tried installing Chromium 10 I had the same problem as donniezazen hmm hmm

Would appreciate any help on this. Thanks smile

Offline

#29 2011-04-30 21:39:01

rstrcogburn
CrunchRanger
From: The Wild West
Registered: 2010-06-12
Posts: 1,796
Website

Re: Apt Pinning and You: Living on the Edge with #!

+1 good post hadran, Besides apt pinning, I think backporting with the use of sid source packages could be a useful one.. Anyone ever go this route?


... and a kind word.  -Duke

Offline

#30 2011-04-30 21:55:08

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 359

Re: Apt Pinning and You: Living on the Edge with #!

kevdunleavy wrote:

Great post! Really cool.

It all went fine as far as I can tell except when I did apt-get upgrade there was no packages to upgrade hmm

And then when I tried installing Chromium 10 I had the same problem as donniezazen hmm hmm

Would appreciate any help on this. Thanks smile

It is because of how Statler is pinned in /etc/apt/preferences

Package: *
Pin: release n=statler
Pin-Priority: 1001

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

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

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

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

Remove this part from /etc/apt/preferences and it should work fine.

Package: *
Pin: release n=statler
Pin-Priority: 1001

I am not sure if this willl have any other consequences, so proceed with caution. If anyone has a more elegant solution please leave a reply.

Offline

#31 2011-04-30 22:11:41

kevdunleavy
New Member
Registered: 2011-04-30
Posts: 6

Re: Apt Pinning and You: Living on the Edge with #!

hardran3 wrote:

Remove this part from /etc/apt/preferences and it should work fine.

Package: *
Pin: release n=statler
Pin-Priority: 1001

I am not sure if this willl have any other consequences, so proceed with caution. If anyone has a more elegant solution please leave a reply.

Awesome man that seems to have worked. Installing like

apt-get install package_name/unstable

didn't work so I had to use

apt-get -t unstable install package_name

but whatever.

Also, is it weird that I got no updates? I find that strange but maybe it's just me.

Also also, there's no mention of the experimental repo in the apt-cache policy of Chromium which is also weird. Hmm.

Offline

#32 2011-04-30 22:17:25

anonymous
The Mystery Member
From: Arch Linux Forums
Registered: 2008-11-29
Posts: 8,904

Re: Apt Pinning and You: Living on the Edge with #!

kevdunleavy wrote:

Awesome man that seems to have worked. Installing like

apt-get install package_name/unstable

didn't work so I had to use

apt-get -t unstable install package_name

but whatever.

That is because the former command tries grabbing dependencies from stable instead of unstable.

kevdunleavy wrote:

Also also, there's no mention of the experimental repo in the apt-cache policy of Chromium which is also weird. Hmm.

Well there is no chromium-browser package in experimental so thats fine.


Note: ** Please read before posting **

BTW if you wish to contact me, send me an e-mail instead of a PM.

Offline

#33 2011-04-30 23:27:23

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 359

Re: Apt Pinning and You: Living on the Edge with #!

@kevdunleavy
I'm glad it worked!

Also, is it weird that I got no updates? I find that strange but maybe it's just me.

That is what should happen. The /etc/apt/preferences file is set up so your system will stay on squeeze packages by default, and only install testing/unstable/experimental packages when you manually tell it to.

@anonymous
You beat me to it smile

Last edited by hardran3 (2011-04-30 23:31:26)

Offline

#34 2011-05-01 10:01:45

kevdunleavy
New Member
Registered: 2011-04-30
Posts: 6

Re: Apt Pinning and You: Living on the Edge with #!

Cool thanks guys. I didn't even know you could do this. Quite happy with this big_smile

Offline

#35 2011-05-02 16:37:36

jotapesse
#! Junkie
From: Algarve, Portugal
Registered: 2009-02-07
Posts: 312

Re: Apt Pinning and You: Living on the Edge with #!

Hi, very nice information about apt-pinning, hardran3! I did a similar apt-pinning preferences to yours and I've studied it a bit. Please let me add my findings. Your preferences file is working partially. Let me explain:

If the target release has not been specified then apt simply assigns the priority:

  • 500 - to all uninstalled package versions, expect versions coming from archives which in their Release files are marked as "NotAutomatic: yes".

  • 100 - to all installed package versions.

  • 1 - to the versions coming from archives which in their Release files are marked as "NotAutomatic: yes" like the debian experimental archive.

Now, we can tell apt to give by default higher priority to the target release, let's say to "statler" release repository sources. This is done on the /etc/apt/apt.conf by adding the line:

APT::Default-Release "statler";

This is the case for #! statler. Corenominal setup "statler" as the target release. Note that this has precedence over any general priority you set in the /etc/apt/preferences file described later, but not over specifically pinned packages.

So, by default, with the target release above setup and without any /etc/apt/preferences apt gives the following priority order:

  • 990 - to the versions that are not installed and belong to the target release.

  • 500 - to the versions that are not installed and do not belong to the target release.

  • 100 - to the version that is already installed (if any).

  • 1 - to the versions coming from archives which in their Release files are marked as "NotAutomatic: yes" like the debian experimental archive.

Now if we want to have several release sources, we may add them, like you and I did, the experimental, unstable, and testing to /etc/apt/sources.list. I also removed stable or squeeze, and made it a rolling release. So, without any apt-pinning or /etc/apt/preferences this would result in the following priority order:

  • 990 - statler win even if lower versions packages.

  • 500 - unstable and testing, higher version packages wins.

  • 100 - to the version that is already installed (if any).

  • 1 - experimental packages lose, even if higher version.

So now we need to differentiate testing and unstable, we can do this with apt-pinning preferences. Now remember that /etc/apt/apt.conf has precedence so, any apt-pinning related to the "statler" release will be discarded, except for explicit packages. Your 1001 priority won't work, that's why you get 990 when you do a policy check. If you wan't it to work you have to remove the default target release from /etc/apt/apt.conf. I'm tracking testing, making it a rolling release. So, to pursue the same objectives you had, we only need to add the following /etc/apt/preferences:

# Track testing relase:

Package: *
Pin: release o=Debian,a=testing
Pin-Priority: 900

This will result in the final priority order:

  • 990 - statler packages win even if lower versions.

  • 900 - testing wins if packages do not exist in statler.

  • 500 - unstable packages will only be installed if desired.

  • 100 - to the version that is already installed (if any).

  • 1 - experimental packages lose, even if higher version, but can be installed if desired.

You should only use above 1000 priority if you want to force downgrades. If for example you forced a testing upgrade to a statler package, you may force it's downgrade this way (remember to remove the target release or apt.conf). No other preferences are required. This gives a simpler /etc/apt/preferences file. smile

Hope this helps anyone.

Last edited by jotapesse (2011-05-02 16:41:10)


On an ASRock VisionX 321B, Asus EeeBoxPC 1501P and EeePC 1000H with Debian Sid/Experimental Xfce 4.10 Linux
How to: Install Xfce 4.10 with upgraded Apps and Plugins

Offline

#36 2011-05-02 17:03:01

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 359

Re: Apt Pinning and You: Living on the Edge with #!

@jotapesse

Awesome info, thanks. I am going to make a couple small changes to the OP, and now I feel the urge to make a rolling debian install smile

Offline

#37 2011-05-02 19:48:16

popslee
#! Member
From: so cal
Registered: 2011-02-11
Posts: 51

Re: Apt Pinning and You: Living on the Edge with #!

@jotapesse

this is exactly what I was looking for! sweet post

rolling + #! = awesome

tbh the contributors here @ #! plus rolling debian is hands down the _best_ distro

Offline

#38 2011-05-02 20:29:35

popslee
#! Member
From: so cal
Registered: 2011-02-11
Posts: 51

Re: Apt Pinning and You: Living on the Edge with #!

would like to add for those that will be using the rolling version that joatpesse mentioned do not forget to update the security in /etc/apt/sources.list which should look like this:

## DEBIAN SECURITY
#TESTING
deb http://security.debian.org/ wheezy/updates main contrib non-free

source:
http://www.debian.org/security/faq#testing

Offline

#39 2011-05-02 20:54:06

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 359

Re: Apt Pinning and You: Living on the Edge with #!

popslee wrote:

would like to add for those that will be using the rolling version that joatpesse mentioned do not forget to update the security in /etc/apt/sources.list which should look like this:

## DEBIAN SECURITY
#TESTING
deb http://security.debian.org/ wheezy/updates main contrib non-free

source:
http://www.debian.org/security/faq#testing

A good idea to add that if you are running testing period. Thanks popslee! I may need to edit the OP again smile

Offline

#40 2011-05-03 19:17:33

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 359

Re: Apt Pinning and You: Living on the Edge with #!

I have been playing around with my /etc/apt/preferences file to fix a couple problems people were having, and to make it much simpler. If anyone who used my guide could test it out and let me know what happens that would be great, I just want to make sure it doesn't break things before I update the main post.

New /etc/apt/preferences

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

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

Offline

#41 2011-05-04 01:59:26

JmsCrk
Member
Registered: 2010-05-26
Posts: 18

Re: Apt Pinning and You: Living on the Edge with #!

I somehow upgraded everything (more than 500 packages) on my system to unstable, even though I was following this tutorial really only wanting to update some nvidia drivers. Subsequently there are some small problems with my system, and although they're not huge I'd like to go back to how things were before.

Here is my sources.list

## CRUNCHBANG
## Compatible with Debian Squeeze, but use at your own risk.
deb http://packages.crunchbanglinux.org/statler statler main

## DEBIAN
deb http://ftp.au.debian.org/debian/ squeeze main contrib non-free
# deb-src http://ftp.de.debian.org/debian/ squeeze main contrib non-free

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

## DEBIAN BACKPORTS
deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free
deb http://ftp.debian.org/debian/ unstable main contrib non-free
deb http://mirrors.kernel.org/debian/ experimental main contrib non-free

But when I check apt-cache for eg php5, even though the number is higher next to the 'squeeze' version it says the candidate for install is from unstable. Is that how it is meant to work?

php5:
  Installed: 5.3.6-8
  Candidate: 5.3.6-10
  Version table:
     5.3.6-10 0
        500 http://ftp.debian.org/debian/ unstable/main amd64 Packages
 *** 5.3.6-8 0
        100 /var/lib/dpkg/status
     5.3.3-7+squeeze1 0
        600 http://security.debian.org/ squeeze/updates/main amd64 Packages
     5.3.3-7 0
        600 http://ftp.au.debian.org/debian/ squeeze/main amd64 Packages

My preferences file is this, not sure if it is relevant:

Package: *
Pin: release n=statler
Pin-Priority: 1001

Package: *
Pin: release n=squeeze
Pin-Priority: 600

Package: *
Pin: release r=squeeze
Pin-Priority: 600

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

Package: *
Pin: release r=experimental
Pin-Priority: 100

I have also used Synaptic to add packages and repositories at some point, not sure if that's relevant either.

Any thoughts?

I'd basically like to go back to statler (not unstable) for everything except for the specific drivers I was trying to upgrade from experimental.

Offline

#42 2011-05-04 03:29:49

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 359

Re: Apt Pinning and You: Living on the Edge with #!

@JmsCrk

Whoa. tongue

Try this.

This is nice.

Install the apt-show-versions command:

apt-get install apt-show-versions

List the unstable and testing packages:

apt-show-versions | grep /testing
apt-show-versions | grep /unstable

Last edited by hardran3 (2011-06-02 01:33:21)

Offline

#43 2011-05-04 04:37:17

JmsCrk
Member
Registered: 2010-05-26
Posts: 18

Re: Apt Pinning and You: Living on the Edge with #!

Thanks hardran3, I followed the advice there and when I check apt-show-versions it shows a lot of them coming from 'unknown' - not sure how that happened, maybe as part of some other tutorial I have upgraded to a release that I have subsequently removed from sources.list ?

Regardless - do you know why it would show the apt-cache numbers correctly but still prefer a candidate that is not the highest number? My (limited)  understanding was that it should install the version with the highest priority number...

Offline

#44 2011-05-04 05:54:59

hardran3
#! Junkie
From: forest town, lake land
Registered: 2011-02-26
Posts: 359

Re: Apt Pinning and You: Living on the Edge with #!

JmsCrk wrote:

Thanks hardran3, I followed the advice there and when I check apt-show-versions it shows a lot of them coming from 'unknown' - not sure how that happened, maybe as part of some other tutorial I have upgraded to a release that I have subsequently removed from sources.list ?

Regardless - do you know why it would show the apt-cache numbers correctly but still prefer a candidate that is not the highest number? My (limited)  understanding was that it should install the version with the highest priority number...

Head to the link in my previous post. It tells you how to fix it. If I were you i would take unstable and experimental out of your sources.list. Then follow the instructions in the link, and pin stable to 1001. This should downgrade all of your packages to stable. When you are done that, here is my sources.list, it should work for you.

## CRUNCHBANG
## Compatible with Debian Squeeze, but use at your own risk.
deb http://packages.crunchbanglinux.org/statler statler main

## DEBIAN
#STABLE
deb http://ftp.ca.debian.org/debian/ squeeze main contrib non-free
deb http://ftp.ca.debian.org/debian squeeze-updates main contrib non-free
#TESTING
deb http://ftp.ca.debian.org/debian/ testing main contrib non-free
#UNSTABLE
deb http://ftp.ca.debian.org/debian/ unstable main contrib non-free
#EXPERIMENTAL
deb http://ftp.ca.debian.org/debian/ experimental main contrib non-free

## DEBIAN SECURITY
#STABLE
deb http://security.debian.org/ squeeze/updates main contrib non-free
#TESTING
deb http://security.debian.org/ wheezy/updates main contrib non-free

## DEBIAN BACKPORTS
deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free

Add this to your /etc/apt/preferences

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

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

That should fix things.

Offline

#45 2011-05-04 11:02:20

JmsCrk
Member
Registered: 2010-05-26
Posts: 18

Re: Apt Pinning and You: Living on the Edge with #!

@hardran3 Thank you!! That worked. I took out unstable and experimental and 'upgraded' everything, and then put them back in to upgrade the specific packages I wanted to. I feel like I've learnt a lot big_smile

The problem with that linked page the first time was that I'd copied and pasted the source for the preferences file and a rogue </b> made it in and stopped the pin priority from working properly. A second look and I got it right!

Thanks again, my system is back to stable, statler awesomeness.

Offline

#46 2011-05-05 00:27:27

punk_physicist
#! CrunchBanger
From: ~/
Registered: 2011-05-02
Posts: 160

Re: Apt Pinning and You: Living on the Edge with #!

From a person who likes new and shiny, even in a stable system... this thread is awesome!

Offline

#47 2011-05-08 03:46:38

punk_physicist
#! CrunchBanger
From: ~/
Registered: 2011-05-02
Posts: 160

Re: Apt Pinning and You: Living on the Edge with #!

I tried to upgrade my settings to make my #! a rolling release (as per jotapesse's description), and I can't seem to pull any info from the testing, unstable or experimental repositories (no matter what mirror I use) getting the error:

W: Failed to fetch Mirror/dists/testing/main/binary-i386/Packages.bz2  Hash Sum mismatch

W: Failed to fetch Mirror/dists/testing/non-free/binary-i386/Packages.bz2  Hash Sum mismatch

W: Failed to fetch Mirror/dists/unstable/main/binary-i386/Packages.bz2  Hash Sum mismatch

W: Failed to fetch Mirror/dists/unstable/contrib/binary-i386/Packages.bz2  Hash Sum mismatch

W: Failed to fetch Mirror/dists/experimental/main/binary-i386/Packages.bz2  Hash Sum mismatch

Where "Mirror" stands for one of the Debian mirrors (which is http://ftp.us.debian.org/debian/ by my default).

I have been playing with this apt-pinning stuff to become familiar with how it works (upgrading and downgrading, and trying to use the smxi script at http://smxi.org/) and so could very well have done this to myself, but I can't imagine what it could have been.  I did use the downgrade trick in one of the links of the OP (currently my sources.list and preferences back to that described by jotapesse's post, but the last apt-get dist-upgrade was with the defaults set) so I like to think things are roughly back to the standard #!. 

Googling doesn't seem to help, so I submit to the wisdom and mercy of the #! community wink.

Edit: Nevermind, it was a problem with the mirrors.  After a day things seem to work fine.

Last edited by punk_physicist (2011-05-09 02:48:20)

Offline

#48 2011-05-08 10:03:47

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,201

Re: Apt Pinning and You: Living on the Edge with #!

I changed statler into a rolling release with the instructions from jotapesse and popslee.
Now plymouth isn't running anymore. Did anyone else have this problem? How can i fix it?


BTW: i'm not sure i did everything right...: Jotapesse, could you add exact file content for /etc/apt/sources.list, /etc/apt/preferences and /etc/apt/apt.conf  (There's a lot of if's in your post, which doesn't make everything clear for me). Thanks a lot.


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

#49 2011-05-08 22:43:52

popslee
#! Member
From: so cal
Registered: 2011-02-11
Posts: 51

Re: Apt Pinning and You: Living on the Edge with #!

Tunafish wrote:

I changed statler into a rolling release with the instructions from jotapesse and popslee.
Now plymouth isn't running anymore. Did anyone else have this problem? How can i fix it?

here is a how to,you lose plymouth when switching to testing.

Tunafish wrote:

BTW: i'm not sure i did everything right...: Jotapesse, could you add exact file content for /etc/apt/sources.list, /etc/apt/preferences and /etc/apt/apt.conf  (There's a lot of if's in your post, which doesn't make everything clear for me). Thanks a lot.

I don't know about jotapesse's config but I track testing only

apt.conf

APT::Default-Release "wheezy";

preferences

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

Package: *
Pin: release o=Debian,a=experimental
1

sources.list

## CRUNCHBANG
## Compatible with Debian Squeeze, but use at your own risk.
#deb http://packages.crunchbanglinux.org/statler statler main

## DEBIAN
#deb http://ftp.us.debian.org/debian/ squeeze main contrib non-free
#deb-src http://ftp.us.debian.org/debian/ squeeze main contrib non-free
#TESTING
deb http://ftp.us.debian.org/debian/ wheezy main contrib non-free
#UNSTABLE
deb http://ftp.us.debian.org/debian/ unstable main contrib non-free
#EXPERIMENTAL
deb http://ftp.us.debian.org/debian/ experimental main contrib non-free

## DEBIAN SECURITY
deb http://security.debian.org/ squeeze/updates main
#TESTING
deb http://security.debian.org/ wheezy/updates main contrib non-free

## DEBIAN BACKPORTS
#deb http://backports.debian.org/debian-backports squeeze-backports main contrib non-free

# /etc/apt/sources.list.d/liquorix.list
deb http://liquorix.net/debian sid main

so when i run:~$ apt-cache policy
wheezy/testing + security is 990
unstable 500
experimental is 1

hope that helps

Offline

Be excellent to each other!

#50 2011-05-09 07:32:58

Tunafish
#! Die Hard
From: the Netherlands
Registered: 2010-03-07
Posts: 1,201

Re: Apt Pinning and You: Living on the Edge with #!

popslee wrote:

here is a how to,you lose plymouth when switching to testing.

I tried that, but plymouth doesn't run... during boot i get an error: "panic, going back into text mode" and that's it.
Is there a thread in this forums where we can post our experiences with testing? I also have the annoying system beep. And Thunar shows my whole harddrive as a seperate mount (with eject button!).

popslee wrote:

I don't know about jotapesse's config but I track testing only

Thanks a lot, make things clear for me.
The last line of your preferences file, shouldn't that be: 'Pin-Priority: 100' ?

Last edited by Tunafish (2011-05-09 12:57:41)


sed 's/stress/relaxation/g'
Privacy & Security on #!

Offline

Board footer

Powered by FluxBB

Copyright © 2012 CrunchBang Linux.
Proudly powered by Debian. Hosted by Linode.
Debian is a registered trademark of Software in the Public Interest, Inc.

Debian Logo