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
Created attachment 170204 [details, diff] patch with the updates
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.
Created attachment 170349 [details, diff] Updated to use a config file.
Created attachment 170350 [details] Example /etc/conf.d/porticron file
Created attachment 170352 [details] Rough documentation
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.
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
(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.
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