package reprepro
tags 697630 - patch
thanks

* Sjoerd Simons <[email protected]> [130107 20:33]:
> With our usage of reprepro we get .changes files form multiple builders
> (different architecture), all of them build arch dependent and arch
> independent. This unfortunately means reprepro will error out as soon as a
> second buld of an arch all package is received.
>
> Attached patch adds the ability to ignore an arch all package included in a
> .changes file if this is already present (from another build).

Thanks for your patch, but I fear it is not that easy.

> diff --git a/checkin.c b/checkin.c
> index e2cf01a..e423b58 100644
> --- a/checkin.c
> +++ b/checkin.c
> @@ -919,6 +919,12 @@ static retvalue changes_checkfiles(const char *filename, 
> struct changes *changes
>                       return RET_ERROR_OOM;
>               /* do not copy yet, but only check if it could be included */
>               r = files_canadd(e->filekey, e->checksums);
> +
> +             if (e->architecture_into == architecture_all &&
> +                     r == RET_ERROR_WRONG_MD5 &&
> +                     IGNORING (updatedarchall,
> +"Trying to update an arch all package with a different checksum\n"))
> +                     r = RET_NOTHING;
>               if (RET_WAS_ERROR(r))
>                       return r;
>               /* If is was already there, remember that */

This only does not copy the file, and even takes the contents from the
old file (I don't know if that is good and ugly or bad and ugly, most
likely something of both), but the checksum is still the one from the
new file.
If the old file is already part of the distribution you are adding to,
then the package is not added as it is already there anyway.
But if the package file is already in the pool, because it was added
to another distribution, then the package will be added with the wrong
checksums recorded, resulting in an inconsistent Packages file.

        Bernhard R. Link


-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to