View previous topic :: View next topic |
Author |
Message |
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Tue Oct 24, 2006 8:37 pm Post subject: forever inject |
|
|
so you have few packages which you never wanna install and you are tired of adding those to /etc/portage/profile/package.provided every time you sync and have a new version. Help is here! Create /etc/cron.daily/inject with: Code: |
#!/bin/bash
emerge --sync
for i in app-admin/sabayon app-admin/pessulus www-client/epiphany media-video/totem mail-client/evolution \
gnome-extra/bug-buddy gnome-extra/yelp gnome-base/gdm net-misc/vino gnome-extra/gucharmap \
gnome-extra/gnome2-user-docs app-editors/gedit kde-base/kdepim kde-base/kdeedu kde-base/kdewebdev ;
do
# remove if an older or duplicate inject already exists
remove=${i/\//\\\/}
sed -i -e "/${remove}/d" /etc/portage/profile/package.provided
# inject a new one
echo "Now Injecting $i..."
pkg_to_inject=`emerge -pvO $i | grep "\[ebuild " | grep -v grep | awk '{print $4}'`
[[ -n $pkg_to_inject ]] && echo $pkg_to_inject >> /etc/portage/profile/package.provided
done |
Code: | chmod +x /etc/cron.daily/inject |
it syncs your tree everyday, removes previous versions you injected and injects the newer version of the packages listed in the for loop. The list there is just a sample (apologies if it contains your favourite app). Change these apps to your liking. Only list end programs. DONOT ever put libraries in there. Use "<category>/<pkg_name>" format.
I wish package.provided had a version-less format so portage could natively support this, but there may be complications in that.
Edit: if you don't mind you manual syncs to take a bit longer, you can also put this script (minus the line containing 'emerge --sync', because that would create an infinite loop) in /etc/portage/postsync.d/ .
Last edited by devsk on Tue Oct 24, 2006 9:24 pm; edited 1 time in total |
|
Back to top |
|
|
ebfe n00b
Joined: 29 Jan 2006 Posts: 20
|
Posted: Tue Oct 24, 2006 9:15 pm Post subject: |
|
|
check /etc/portage/postsync.d |
|
Back to top |
|
|
devsk Advocate
Joined: 24 Oct 2003 Posts: 2995 Location: Bay Area, CA
|
Posted: Tue Oct 24, 2006 9:22 pm Post subject: |
|
|
manual intermediate syncs will feel slow to the users if inject is done thru postsync.d and he has a large list of packages to inject. But I think it can be put there if users feel ok about it. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|