I came back on the proposed patch after Joerg revived the discussion
about this bug.
Quoting Thomas Viehmann (tv@beamnet.de):
> + if (_config->FindB("Acquire::Check-Valid-Until", true)) {
> + if (time(NULL) > MetaIndexParser->GetValidUntil()) {
> + _error->Warning(string("Release file expired, ignoring "+RealURI).c_str());
> + return false;
> + }
> + }
> +
WRT i18n, the patch is incorrect, imho. It assumes that the ignored
URL is to come after the "ignoring" word. Strings concatenation is
nearly always a bad idea as the sentence structure might be different
in other languages.
My programming skills are low enough to not allow me to produce the
right patch, but I think that something using "%s" in the localizable
string would make it. Hopefully, everybody reading this will
understand what I mean here..:-)
It would also be good to put a translators comment to explain
translators that "%s" is a URL.
> + if (! StrValidUntil.empty()) {
> + struct tm atm;
> + string lctimesaved = setlocale(LC_TIME,NULL);
> + setlocale(LC_TIME,"C");
> + if (strptime(StrValidUntil.c_str(),"%a, %d %b %Y %H:%M:%S %Z",&atm) == NULL) {
> + ErrorText = _(("Invalid Valid-Until entry in Release file " + Filename).c_str());
Same problem here.
Attachment:
signature.asc
Description: Digital signature