Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 244873 - app-portage/porticron-0.1 eix-sync support, eix-sync -d in report, timestamps for multisite shared portdir, EMERGE_DEFAULT_OPTS support
Summary: app-portage/porticron-0.1 eix-sync support, eix-sync -d in report, timestamps...
Status: RESOLVED FIXED
Alias: None
Product: Portage Development
Classification: Unclassified
Component: Enhancement/Feature Requests (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Benedikt Böhm (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-29 11:33 UTC by Steen Eugen "Miravlix" Poulsen
Modified: 2008-10-31 12:54 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
patch with the updates (porticron-0.1-sep.patch,3.87 KB, patch)
2008-10-29 11:35 UTC, Steen Eugen "Miravlix" Poulsen
Details | Diff
Updated to use a config file. (porticron-0.1-sep-r1.patch,4.87 KB, patch)
2008-10-30 20:54 UTC, Steen Eugen "Miravlix" Poulsen
Details | Diff
Example /etc/conf.d/porticron file (porticron,341 bytes, text/plain)
2008-10-30 20:55 UTC, Steen Eugen "Miravlix" Poulsen
Details
Rough documentation (README,1.58 KB, text/plain)
2008-10-30 20:56 UTC, Steen Eugen "Miravlix" Poulsen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steen Eugen "Miravlix" Poulsen 2008-10-29 11:33:01 UTC
Support using eix-sync instead of emerge --sync

Support for eix-sync -d in the report

Timestamp system for easier detection of when to run updates on clients of a NFS shared portdir.

Support for setting some options based on the make.conf's $EMERGE_DEFAULT_OPTS
 

Reproducible: Always
Comment 1 Steen Eugen "Miravlix" Poulsen 2008-10-29 11:35:53 UTC
Created attachment 170204 [details, diff]
patch with the updates
Comment 2 Steen Eugen "Miravlix" Poulsen 2008-10-29 13:05:50 UTC
Great little script, just what I needed to get started on making a daily sync script.

I'm considering moving the actual script to /usr/bin or /usr/sbin, so people can use whatever cron configuration they prefair. I personally want my daily rsync to happen so it matches when it fits into my work schedule to read and react to the daily report. Since the default of stuffing it in cron.daily is sane for many people, I would still default to creating /etc/cron.daily/porticron that checks /etc/conf.d/porticron for whatever it should run.

Extending the section that detects read only portdir to also handle if we aren't supposed to --sync on this machine even when portdir is read/write. A /etc/conf.d/porticron with a simple sync="yes" option, if it's "legal" portage, maybe a use flags to set whatever it defaults to yes or no on this machine.

BTW: I'm not much of a bash programmer, while the code runs, I'm sure some bash evangelist can clean things up.
Comment 3 Steen Eugen "Miravlix" Poulsen 2008-10-30 20:54:49 UTC
Created attachment 170349 [details, diff]
Updated to use a config file.
Comment 4 Steen Eugen "Miravlix" Poulsen 2008-10-30 20:55:42 UTC
Created attachment 170350 [details]
Example /etc/conf.d/porticron file
Comment 5 Steen Eugen "Miravlix" Poulsen 2008-10-30 20:56:46 UTC
Created attachment 170352 [details]
Rough documentation
Comment 6 Steen Eugen "Miravlix" Poulsen 2008-10-30 21:03:31 UTC
I think thats it, only thing I can think of would be to make the emerge options used to create the report configurable in the config file.
Comment 7 Benedikt Böhm (RETIRED) gentoo-dev 2008-10-31 08:22:01 UTC
i have added a config file with all your changes, but in a different way, to make it even more customizable and commitd 0.2

the timestamp thing does not belong to this script IMO

thanks for your suggestions
Comment 8 Steen Eugen "Miravlix" Poulsen 2008-10-31 09:01:54 UTC
(In reply to comment #7)
> i have added a config file with all your changes, but in a different way, to
> make it even more customizable and commitd 0.2

Yeah, I thought the config file wasn't the best part of the changes, so sounds good if you have something better.

> the timestamp thing does not belong to this script IMO

Hmm, at least give me some exit return values, so a cronjob with porticron && rm /usr/portage/distfiles/timestamp/* only runs when porticron has a good sync run.

Since the reason for including it was that I have no way of detecting if sync runs now it's hidden inside porticron.
Comment 9 Benedikt Böhm (RETIRED) gentoo-dev 2008-10-31 12:54:18 UTC
you can use /usr/portage/metadata/timestamp, e.g. save a copy of it everywhere you mount PORTDIR and compare mtime to detect the sync