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

2013-10-12 Thread Christian PERRIER
Quoting Cyril Brulebois (k...@debian.org):
 Hi,
 
 some background: choose-mirror is a bit special in that it fetches
 during the source build (when online) an updated version of the mirror
 list[1] and embeds it into the source package. The Said file is
 .gitignore'd, meaning it doesn't show up in choose-mirror's git repo /
 history. This also means it's difficult to track the differences between
 releases, notice possible issues in the list, etc.
 
  1. 
 http://anonscm.debian.org/viewvc/webwml/webwml/english/mirror/Mirrors.masterlist?revision=HEAD
 
 I'm thinking about removing it from .gitignore, and about tracking it in
 git, committing an update right before a choose-mirror release/upload.
 
 Any objection or comment?


That seems fairexcept that, being a frequent uploader of
choose-mirror, I'm very likely to forget about that when building it
then committing back after the build (as I'm building in pbuilder, the
Mirrors.masterlist file in my local git checkout is not updated...only
the one in the chroot is).

So, please forgive me in advance..:-)



signature.asc
Description: Digital signature


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

2013-10-12 Thread Cyril Brulebois
Christian PERRIER bubu...@debian.org (2013-10-12):
 That seems fairexcept that, being a frequent uploader of
 choose-mirror, I'm very likely to forget about that when building it
 then committing back after the build (as I'm building in pbuilder, the
 Mirrors.masterlist file in my local git checkout is not updated...only
 the one in the chroot is).

After sending the mail I was still wondering how to trigger the sync and
how to make sure the file is committed. Maybe we could just use something
similar to d-i's l10n status file:
 - stop the sync during clean (easily overridable by downstreams if they
   want to keep it);
 - warn if the file is say older than 2 weeks;
 - give appropriate instructions to run the sync (*and commit* ;)) when
   an outdated file is detected.

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?

Mraw,
KiBi.


signature.asc
Description: Digital signature


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

2013-10-12 Thread Christian PERRIER
Quoting Cyril Brulebois (k...@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? :-)



signature.asc
Description: Digital signature


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

2013-10-12 Thread Cyril Brulebois
Christian PERRIER bubu...@debian.org (2013-10-12):
 Quoting Cyril Brulebois (k...@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 21; 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:; \
|   echomake 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. :-)


signature.asc
Description: Digital signature


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

2013-10-12 Thread Joey Hess
Cyril Brulebois wrote:
 [ 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. ]

Have you ever looked at the debian-installer source package's network
use? I'm just saying. If I were throwing arbitrary rules out there, I'd
add:

3. Committing redundant data to version control is wrong.

But I have another rule that superscedes all 3:

0. Ignore arbitrary rules when you have the time to think for yourself.

Personally, I think that the way choose-mirror handled
Mirrors.masterlist was fine. Note that it didn't fail if
there was a network problem.

-- 
see shy jo


signature.asc
Description: Digital signature


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

2013-10-12 Thread Cyril Brulebois
Joey Hess jo...@debian.org (2013-10-12):
 Have you ever looked at the debian-installer source package's network
 use? I'm just saying.

Fetching packages from the same mirror isn't exactly the same as wgetting a
file from an http location without any kind of verification. I'm just saying.

src:debian-installer's being strange doesn't look like a reason for
others to do strange things on their own, at least to me.

 If I were throwing arbitrary rules out there, I'd add:
 
 3. Committing redundant data to version control is wrong.

Having to debdiff source packages to see what the changes were makes me
think that it's actually useful. At least to me. I'm sorry if that looks
wrong, but I can take the blame for doing things that let me work.

 Personally, I think that the way choose-mirror handled
 Mirrors.masterlist was fine.

Noted.

 Note that it didn't fail if there was a network problem.

This was already noted in an earlier mail.

KiBi.


signature.asc
Description: Digital signature


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

2013-10-11 Thread Cyril Brulebois
Hi,

some background: choose-mirror is a bit special in that it fetches
during the source build (when online) an updated version of the mirror
list[1] and embeds it into the source package. The Said file is
.gitignore'd, meaning it doesn't show up in choose-mirror's git repo /
history. This also means it's difficult to track the differences between
releases, notice possible issues in the list, etc.

 1. 
http://anonscm.debian.org/viewvc/webwml/webwml/english/mirror/Mirrors.masterlist?revision=HEAD

I'm thinking about removing it from .gitignore, and about tracking it in
git, committing an update right before a choose-mirror release/upload.

Any objection or comment?

Mraw,
KiBi.


signature.asc
Description: Digital signature