Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
forever inject
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Tue Oct 24, 2006 8:37 pm    Post subject: forever inject Reply with quote

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
View user's profile Send private message
ebfe
n00b
n00b


Joined: 29 Jan 2006
Posts: 20

PostPosted: Tue Oct 24, 2006 9:15 pm    Post subject: Reply with quote

check /etc/portage/postsync.d
Back to top
View user's profile Send private message
devsk
Advocate
Advocate


Joined: 24 Oct 2003
Posts: 2995
Location: Bay Area, CA

PostPosted: Tue Oct 24, 2006 9:22 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Page 1 of 1

 
Jump to:  
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