Schlagworte: apt
26.02.11
Puppet definition to add Launchpad PPA repository
Link: https://gist.github.com/844735
The provided puppet definition(s) will allow you to add a PPA repository on a host managed by Puppet, e.g. by means of a class like this:
Code:
class blueyedppa { | |
pparepo { "blueyed/ppa": apt_key => "7CC17CD2" } | |
} |
I have created this to easily add the Current BOINC releases PPA to one of my hosts, and refactored a previously snippet for this.
Since I could not find anything for this, but questions asked about it, I like to share this. The actual code is available at the Gist linked to by this post.
08.05.09
Improving dpkg/apt performance
Thanks to Antti-Juhani Kaijanaho I could improve the performance of dpkg/apt on my old Ubuntu system (upgraded since I've started using Linux/Ubuntu in 2005):
I've written a small script, according to Antti-Juhani's post:
#!/bin/sh
# via http://antti-juhani.kaijanaho.fi/newblog/archives/521
if [ "$(id -u)" != "0" ]; then
echo "You must be root."
exit 1
fi
dpkg --clear-avail
dpkg --forget-old-unavail
sync-available
My results show that /var/lib/dpkg has gone from 195M down to 154M and calling apt-get upgrade (not a good test probably) went down from 10.024s to 5.764s (after dropping all caches, of course - "echo 3 | sudo tee /proc/sys/vm/drop_caches").
Thanks.
This should get considered to be done during Ubuntu upgrades.
