[Debian-med-packaging] changes to nanopolish packaging

Steffen Möller steffen_moeller at gmx.de
Sat Nov 11 11:07:38 UTC 2017


Hi Afif,

On 11.11.17 06:44, Afif Elghraoui wrote:
> Hi, Steffen,
>
> I am just about to upload the latest nanopolish release and had a couple
> questions about your changes. First, you have this patch:
>
> ```
> Author: Steffen Moeller
> Last-Updated: 2017-09-16 02:14:07 +0200
> Description: Do not ignore return values of samtool functions
>
> --- nanopolish.orig/src/alignment/nanopolish_eventalign.cpp
> +++ nanopolish/src/alignment/nanopolish_eventalign.cpp
> @@ -229,7 +229,7 @@
>
>  void emit_sam_header(samFile* fp, const bam_hdr_t* hdr)
>  {
> -    sam_hdr_write(fp, hdr);
> +    int r = sam_hdr_write(fp, hdr);
>  }
>
>  std::string cigar_ops_to_string(const std::vector<uint32_t>& ops)
> @@ -368,7 +368,7 @@
>      int stride = alignments.front().event_idx <
> alignments.back().event_idx ? 1 : -1;
>      bam_aux_append(event_record, "ES", 'i', 4,
> reinterpret_cast<uint8_t*>(&stride));
>
> -    sam_write1(fp, base_hdr, event_record);
> +    int r = sam_write1(fp, base_hdr, event_record);
>      bam_destroy1(event_record); // automatically frees malloc'd segment
>  }
> ```
>
> Despite the patch description, it looks to me like the return code is
> still ignored. While it's now not being thrown away, it's not actually
> being checked. Do you want to instead report this as an issue upstream?

These patches are not mine, I hope. May just have refreshed them.
IMHO they are wrong to have since

a) they ony trick the compiler but do not address the check that was omitted

b) they encumber updates of the packages for no good reason

>
> My second question is about the -flto flag you added to the build. Is
> that something we should be adding to more of our packages?

Well, my personal opinion is yes, since this speeds up computations
enormously and saves resources, too.

Not everyone feels this way, though, wary of hidden compiler problems or
other effects.

Please cross-check with https://wiki.debian.org/LTO and
https://lists.debian.org/debian-devel/2016/03/msg00399.html

I there a chance to get you to attend our Sprint in February in Barcelona?

Best,

Steffen








More information about the Debian-med-packaging mailing list