#646279 debmirror: Please allow to control mirroring of empty mirrors

#646279#5
Date:
2011-10-22 20:46:56 UTC
From:
To:
Dear Maintainer,

First of all, sorry for my poor English and long report.

The attached patch adds an option to control whether empty mirror should
be checked.

Please review the attached patch, and if satisfactory, consider
including it in the package.

Please refer to the following about circumstances until I came to think
that the option is required.


CIRCUMSTANCES
-------------

In our site, cron mirrors independent squeeze-updates once per day by
the generally following command:

debmirror -v --source --diff=none --getcontents \
  --method=http -h ftp.jp.debian.org -r debian -d squeeze-updates \
  -a i386 debian-updates

* Debian 6.0.3 was released on 2011/10/08.

* After the day, squeeze-updates mirror by cron came to occur the
  following error:

    No packages after parsing Packages and Sources files!

  (This is considered that it is a reason that the mirror source of
  squeeze-updates became empty.)

* Furthermore, several days after, "apt-get update" came to occur the
  following error in the host who accesses the local mirror:

    E: Release file expired, ignoring http://(snip)/debian-updates/dists/squeeze-updates/Release (invalid since (snip))

  (This is considered that it is a reason to have passed over the date
  of the Valid-Until field of the Release file of the local mirror which
  has become old without being updated.)

This time, I was able to mirror empty squeeze-updates only once by
deleting the local mirror directory of squeeze-updates, upgrading
debmirror to 1:2.9 by which BTS#635723 were fixed, and running debmirror
after that.

However, once the empty local mirror was made, squeeze-updates mirror by
cron came to occur the following error again after the next day:

  No packages after parsing Packages and Sources files!

At present, as one or more packages uploaded to squeeze-updates, it
stopped occurring the above-mentioned error.
However, at a future point release of squeeze, I think that the same
problem will surely occur again.

In order to fix this problem fundamentally and to make it not occur
again, the correction added in BTS#635723 is insufficient and the
following two things must become possible.

1. When squeeze-updates becomes empty at a future point release of
squeeze, even if the local mirror which is not empty exists, debmirror
overwrites the local mirror by empty mirror source.

2. After the above, when squeeze-updates continue being empty without
first upload during several days, debmirror overwrites the local mirror
by empty mirror source each time.

  (Even if there is no upload, as it is thought that the meta files
  which include the Release file in which the Valid-Until field is
  updated are distributed in the mirror source, it is necessary to
  mirror them.)

It is good if an empty mirror is not checked after all in order to make
the two above-mentioned things possible.

If an option to control whether empty mirror should be checked is added
to debmirror, I think that the option is helpful for the people who face
the above-mentioned situation to solve the problem.

Thanks,