Louis-Philippe Véronneau - qahttps://veronneau.org/2021-06-27T00:00:00-04:00Writing QA Scripts for Debian Teams2021-06-27T00:00:00-04:002021-06-27T00:00:00-04:00Louis-Philippe Véronneautag:veronneau.org,2021-06-27:/writing-qa-scripts-for-debian-teams.html<p>Since I joined the Debian Python Team, I have had a lot of fun working on
different QA issues. Although I'm still a Perl illiterate<sup id="fnref:perl"><a class="footnote-ref" href="#fn:perl">1</a></sup>, I've for
example contributed to a few Lintian tags.</p>
<p>There are multiple ways to make mass QA changes to team-managed packages.
Projects like the …</p><p>Since I joined the Debian Python Team, I have had a lot of fun working on
different QA issues. Although I'm still a Perl illiterate<sup id="fnref:perl"><a class="footnote-ref" href="#fn:perl">1</a></sup>, I've for
example contributed to a few Lintian tags.</p>
<p>There are multiple ways to make mass QA changes to team-managed packages.
Projects like the <a href="https://janitor.debian.net/">Debian Janitor</a> are more than fantastic: they make
for a robust, thorough and automated way to fix QA issues in the archive and I
don't have enough good words to describe the amazing work of Jelmer Vernooij on
the toolsuite the Janitor uses.</p>
<p>But with robustness comes complexity. The Janitor is currently based on 10
different subtools (<code>silver-platter</code>, <code>ognibuild</code>, <code>lintian-brush</code>, ...) and if
you want to use it to fix a bug, you first need to make sure there's a Lintian
tag that flags the issue you're working on. Then you need to <a href="https://salsa.debian.org/jelmer/lintian-brush/-/blob/master/doc/fixer-writing-guide.rst">write a
lintian-brush fixer</a> to fix said issue. Sadly, sometimes writing a new
Lintian tag to flag a trivial changes is not the appropriate course of action
and only creates clutter.</p>
<p>All this to say until now, I was a missing a "quick and somewhat dirty<sup id="fnref:shell"><a class="footnote-ref" href="#fn:shell">2</a></sup>"
way to make simple one-off changes to a bunch of packages. <a href="https://salsa.debian.org/pollo/qa-scripts/-/blob/master/clojure-new-email.py">200 lines of Python
later</a>, I'm happy to report I have a simple way to replace
the old Clojure Team email in <code>d/control</code> by the new one for all of our
packages. Even better, although this script doesn't aim to be a versatile tool
like the Janitor is, most of the functions can be reused for other similar
one-off scripts.</p>
<p>Many thanks to Felix Lechner showing me the very handy <a href="https://lintian.debian.org/query">Lintian Query JSON
interface</a>!</p>
<div class="footnote">
<hr>
<ol>
<li id="fn:perl">
<p>I don't really enjoy coding in Perl, but it makes up so much of the
current Debian infrastructure that I wish I did. I keep telling myself I
should buy an "Introduction to Perl" book... <a class="footnote-backref" href="#fnref:perl" title="Jump back to footnote 1 in the text">↩</a></p>
</li>
<li id="fn:shell">
<p>A quick and <em>dirty</em> way to make those changes would've been to write
a shell script, but one of my 2021 resolution is to use Python for all my
scripting needs. <a class="footnote-backref" href="#fnref:shell" title="Jump back to footnote 2 in the text">↩</a></p>
</li>
</ol>
</div>