1 |
On Mon, Aug 10, 2015 at 12:10 PM, Dale <rdalek1967@×××××.com> wrote: |
2 |
> Peter Humphrey wrote: |
3 |
>> On Monday 10 August 2015 09:13:01 Dale wrote: |
4 |
>> |
5 |
>>> I might add, sync is taking a LONG time again. Of course, my DSL is a |
6 |
>>> bit slower than some folks. At least the bumpy road got smoothed out |
7 |
>>> tho. It seems to be working again. Maybe next sync will be back to |
8 |
>>> normal. |
9 |
>> I do one sync a day, of my LAN server, and sync anything else to that. I don't |
10 |
>> know how long it took today because I have it on a cron job at night. :-) |
11 |
>> |
12 |
> |
13 |
> |
14 |
> I usually sync about twice a week, sometimes three if I see something I |
15 |
> want or need. I just run my desktop here so updating isn't a huge |
16 |
> deal. Sometimes I forget because I'm busy with other things and I might |
17 |
> go a week or more without a single sync up. |
18 |
> |
19 |
> When I used to run several rigs, I'd sync one rig and then sync the |
20 |
> others to my main rig. I try not to sync to often. |
21 |
|
22 |
I couldn't tell you who I ripped this off of but my cron routine is: |
23 |
|
24 |
ionice -n 7 nice -n 20 emerge --sync (alternatively |
25 |
emerge-webrsync -k - preferred actually if you're using rsync) |
26 |
ionice -n 7 nice -n 20 layman -S |
27 |
emerge -puDv --changed-use world | col -bx | mutt -s "world update" |
28 |
root@localhost |
29 |
eix-update |
30 |
|
31 |
Then I do this: |
32 |
#!/bin/sh |
33 |
|
34 |
LIST=$(mktemp); |
35 |
|
36 |
emerge -puD --changed-use --color=n --columns --quiet=y --with-bdeps=n |
37 |
world | awk '{print $2}' > ${LIST}; |
38 |
|
39 |
for PACKAGE in $(cat ${LIST}); |
40 |
do |
41 |
printf "Building binary package for ${PACKAGE}... " |
42 |
emerge -uN --quiet-build --quiet=y --buildpkgonly ${PACKAGE}; |
43 |
if [[ $? -eq 0 ]]; |
44 |
then |
45 |
echo "ok"; |
46 |
else |
47 |
echo "failed"; |
48 |
fi |
49 |
done |
50 |
|
51 |
That isn't optimally efficient, but works reasonably well. |
52 |
|
53 |
The result is that the next morning I have an email containing a list |
54 |
of the stuff to be merged, and a set of binary packages for most of it |
55 |
(deps of modified packages cannot be pre-built in this way of course). |
56 |
Then I just run an "emerge -uDNkv" world to install all of it, often |
57 |
in minutes. |
58 |
|
59 |
The script could be optimized - if libreoffice and chromium are on the |
60 |
list and I don't install them for a few days, suffice it to say that |
61 |
the heater won't be running as much those nights. |
62 |
|
63 |
-- |
64 |
Rich |