[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFC: removing Mirrors.masterlist from .gitignore in choose-mirror



Christian PERRIER <bubulle@debian.org> (2013-10-12):
> Quoting Cyril Brulebois (kibi@debian.org):
> 
> > That should ensure we see the need for an update while we're preparing
> > the source package, and that we take appropriate measures when that
> > happens. What do you think?
> 
> Ack. I'm sure I can still find a way to still fail from time to time
> but, eh...you know that, right? :-)

Here's what happens during clean now:
| if [ -d .git ] && which git >/dev/null 2>&1; then \
| 		last=`git log --format=format:%at -- Mirrors.masterlist|head -1`; \
| 		now=`date +%s`; \
| 		if [ $((now-date)) -gt $((60*60*24*14)) ]; then \
| 			printf "\n\n*** WARNING: Mirrors.masterlist was last committed more\n"; \
| 			printf "*** than 2 weeks ago, maybe it needs an update?"; \
| 			echo; echo; echo "You can try the following command to run a sync, and use git diff/git commit:"; \
| 			echo "   make Mirrors.masterlist";\
| 			sleep 5; \
| 		fi; \
| 	fi
| 
| 
| *** WARNING: Mirrors.masterlist was last committed more
| *** than 2 weeks ago, maybe it needs an update?
| 
| You can try the following command to run a sync, and use git diff/git commit:
|    make Mirrors.masterlist
[ + sleep for a few seconds ]

Of course that only happens during clean from a git repository, when git
is installed, so won't happen on buildds. Speaking of which, refreshing
the masterlist was attempted at build time too, so I've patched rules to
also export ONLINE=n during build, to avoid that entirely.

[ Side notes:
   1. It's a serious bug to depend on the network;
   2. It's also not deterministic to allow failure in doing so. ]

Mraw,
KiBi.


PS: About failures… everyone can fail. Especially those who do a lot.
    Not going to blame you. :-)

Attachment: signature.asc
Description: Digital signature


Reply to: