* Simon McVittie <simon.mcvit...@collabora.co.uk> [131126 18:03]:
> (Deliberately not tagging this +patch right now, since Debian doesn't
> officially support ddebs yet, and the archive layout looks likely to change.)
> 
> Ubuntu has a semi-separate archive for separate debug symbols, and
> <https://wiki.debian.org/AutomaticDebugPackages> is the proposal to
> add the same thing to Debian. It would be great if reprepro could
> support them, too.
> 
> The attached patch is a proof-of-concept implementation: it treats them
> as a mixture of .deb and .ddeb. It seems to work OK in conjunction with
> Ubuntu's pkg-create-dbgsym.

Thanks. That fits the coding style of reprepro quite well. If you'd
have claimed I had written it and just forgotten about about, I'd
have had a hard time arguing against that.

> diff --git a/checkin.c b/checkin.c
> index 02ba279..ba5331f 100644
> --- a/checkin.c
> +++ b/checkin.c
> @@ -130,7 +130,7 @@ static void freeentries(/*@only@*/struct fileentry 
> *entry) {
>               free(entry->section);
>               free(entry->priority);
>               free(entry->name);
> -             if (entry->type == fe_DEB || entry->type == fe_UDEB)
> +             if (FE_BINARY(entry->type))
>                       deb_free(entry->pkg.deb);
>                else if (entry->type == fe_DSC) {
>                        strlist_done(&entry->needed_filekeys);

I've already applied this one. As it makes sense anyway.


> @@ -1164,8 +1169,7 @@ static retvalue changes_checkpkgs(struct distribution 
> *distribution, struct chan
>       e = changes->files;
>       while (e != NULL) {
>               char *fullfilename;
> -             if (e->type != fe_DEB && e->type != fe_DSC
> -                             && e->type != fe_UDEB) {
> +             if (!FE_PACKAGE (e->type)) {
>                       e = e->next;
>                       continue;
>               }

This, too. But without the space between E and (.

> +             /* we use the deb overrides for ddebs too - ddebs aren't
> +              * meant to have overrides so this is probably fine */
>               binoverride = distribution->overrides.deb;
>               components = &distribution->components;

I think if those packages will finally come without a Priority or
Section in the package, there will be a more complex solution needed,
as without no Section at all, reprepro will not accept the package
yet (unless there is one in the override file).


> @@ -173,20 +176,36 @@ static retvalue gentargetcontents(struct target 
> *target, struct release *release
>       struct filetorelease *file;
>       struct filelist_list *contents;
>       struct target_cursor iterator;
> +     const char *suffix;
> +     const char *symlink_prefix;
>  
>       if (onlyneeded && target->saved_wasmodified)
>               onlyneeded = false;
>  
> +     switch (target->packagetype) {
> +             case pt_ddeb:
> +                     symlink_prefix = "d";
> +                     suffix = "-ddeb";
> +                     break;
> +             case pt_udeb:
> +                     symlink_prefix = "s";
> +                     suffix = "-udeb";
> +                     break;
> +             default:
> +                     symlink_prefix = "";
> +                     suffix = "";
> +     }
> +
>       contentsfilename = mprintf("%s/Contents%s-%s",
>                       atoms_components[target->component],
> -                     (target->packagetype == pt_udeb)?"-udeb":"",
> +                     suffix,
>                       atoms_architectures[target->architecture]);

Will there even be Contents files for ddebs?


> +/* This is pretty close to duplicating the enum typedef'd to filetype
> + * in changes.h, but its order corresponds to typesuffix[]. Do not
> + * confuse them. */
>  enum filetype { ft_UNKNOWN,


uh, oh. Indeed, I should probably rename one of those two.

        Bernhard R. Link
-- 
F8AC 04D5 0B9B 064B 3383  C3DA AFFC 96D1 151D FFDC


-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to