<feed xmlns='http://www.w3.org/2005/Atom'>
<title>apt-desktop-upgrades, branch main</title>
<subtitle>Automated upgrades for desktop systems</subtitle>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/apt-desktop-upgrades/'/>
<entry>
<title>Add list of upgradeable source packages to notification</title>
<updated>2022-04-11T13:39:18+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-04-11T13:39:18+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/apt-desktop-upgrades/commit/?id=ef128a0d2fb57d752fc71febf6573ba965b077e5'/>
<id>ef128a0d2fb57d752fc71febf6573ba965b077e5</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Split long command over multiple lines</title>
<updated>2022-04-11T13:38:27+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-04-11T13:38:27+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/apt-desktop-upgrades/commit/?id=e7887ec3a6ae680da35c5e4d869be40e1c3e2605'/>
<id>e7887ec3a6ae680da35c5e4d869be40e1c3e2605</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix upgrade count when there are no upgrades</title>
<updated>2022-04-04T14:02:37+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-04-04T14:02:37+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/apt-desktop-upgrades/commit/?id=e69d9645d4525f288a8e2b8a99b2abe582ea92cc'/>
<id>e69d9645d4525f288a8e2b8a99b2abe582ea92cc</id>
<content type='text'>
There's a difference between

    cmd | wc -l

and

    x="$(cmd)"; echo "$x" | wc -l

in that the assignment in the latter removes a trailing newline **if one
exists**, but the "echo" always adds one. This means that if `cmd`
produces no output, the former has 0 lines, and the latter has 1 (empty)
line.

I've not found an easy way to fix this in a way that `wc` can tell the
difference between an empty line and a non-empty one, so I had to find a
separate way to count non-empty lines.

I did try `echo "$x" | grep . | wc -l`, but `shellcheck` complains with
[SC2126](https://github.com/koalaman/shellcheck/wiki/SC2126). The
suggested alternative, `echo "$x" | grep -c .`, causes a failure on
empty inputs (i.e. when there are no upgrades) because `grep` exits with
a failure status if no lines are selected.

My options were then to go with `grep | wc` and silence the warning, or
do `grep -c | cat` to mask the `grep` failure (again). Given that they
both have the same number of commands in the pipe, but `cat` is probably
*slightly* cheaper than `wc`, and the `cat` version doesn't require
adding a `shellcheck`-silencing comment, let's go with that.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
There's a difference between

    cmd | wc -l

and

    x="$(cmd)"; echo "$x" | wc -l

in that the assignment in the latter removes a trailing newline **if one
exists**, but the "echo" always adds one. This means that if `cmd`
produces no output, the former has 0 lines, and the latter has 1 (empty)
line.

I've not found an easy way to fix this in a way that `wc` can tell the
difference between an empty line and a non-empty one, so I had to find a
separate way to count non-empty lines.

I did try `echo "$x" | grep . | wc -l`, but `shellcheck` complains with
[SC2126](https://github.com/koalaman/shellcheck/wiki/SC2126). The
suggested alternative, `echo "$x" | grep -c .`, causes a failure on
empty inputs (i.e. when there are no upgrades) because `grep` exits with
a failure status if no lines are selected.

My options were then to go with `grep | wc` and silence the warning, or
do `grep -c | cat` to mask the `grep` failure (again). Given that they
both have the same number of commands in the pipe, but `cat` is probably
*slightly* cheaper than `wc`, and the `cat` version doesn't require
adding a `shellcheck`-silencing comment, let's go with that.
</pre>
</div>
</content>
</entry>
<entry>
<title>Experimental support for `apt-listbugs` during downloads</title>
<updated>2022-03-21T14:39:03+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-03-21T14:39:03+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/apt-desktop-upgrades/commit/?id=1e1e75f0d5c6e6bfbf67b36266aa97edc7fb8bf1'/>
<id>1e1e75f0d5c6e6bfbf67b36266aa97edc7fb8bf1</id>
<content type='text'>
You have to explicitly enable it though
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
You have to explicitly enable it though
</pre>
</div>
</content>
</entry>
<entry>
<title>Make download timer fire "randomly" one per hour</title>
<updated>2022-03-21T10:50:43+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-03-21T10:50:43+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/apt-desktop-upgrades/commit/?id=50c1afddbc30243a419ddc2786912f9634f3d5e9'/>
<id>50c1afddbc30243a419ddc2786912f9634f3d5e9</id>
<content type='text'>
Not "randomly" per se (see FixedRandomDelay docs in systemd.timer(7) for
more info) but don't have every user of this application all hammer the
repo exactly on the hour, every hour.

See variants on the "Thundering Herd" problem for more info.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Not "randomly" per se (see FixedRandomDelay docs in systemd.timer(7) for
more info) but don't have every user of this application all hammer the
repo exactly on the hour, every hour.

See variants on the "Thundering Herd" problem for more info.
</pre>
</div>
</content>
</entry>
<entry>
<title>I think that's a version 0.1</title>
<updated>2022-03-18T09:17:47+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-03-18T09:17:47+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/apt-desktop-upgrades/commit/?id=474d7a1ea44fc02815ec4ebaabd236de0621d021'/>
<id>474d7a1ea44fc02815ec4ebaabd236de0621d021</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Clarify desktop notification text</title>
<updated>2022-03-17T16:53:26+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-03-17T16:53:26+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/apt-desktop-upgrades/commit/?id=cdec9ddfeb168861f92a202d77b711b4e096c63f'/>
<id>cdec9ddfeb168861f92a202d77b711b4e096c63f</id>
<content type='text'>
The notification is supposed to read "Reboot when it is convenient - to
install the updates", but I kept reading it as "Reboot - when it is
convenient to install the updates.", and I couldn't figure out the
"correct" punctuation to do that while remaining proper English. So move
the wording about instead.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The notification is supposed to read "Reboot when it is convenient - to
install the updates", but I kept reading it as "Reboot - when it is
convenient to install the updates.", and I couldn't figure out the
"correct" punctuation to do that while remaining proper English. So move
the wording about instead.
</pre>
</div>
</content>
</entry>
<entry>
<title>Do not notify systemd if `DESTDIR` differs from `PREFIX`</title>
<updated>2022-03-17T15:32:01+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-03-17T15:32:01+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/apt-desktop-upgrades/commit/?id=643ac6a4815af8bd2dd06c12d3feed492b64c327'/>
<id>643ac6a4815af8bd2dd06c12d3feed492b64c327</id>
<content type='text'>
And document it, along with other installation instructions.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
And document it, along with other installation instructions.
</pre>
</div>
</content>
</entry>
<entry>
<title>Add the `clean` and `distclean` make targets</title>
<updated>2022-03-17T14:43:49+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-03-17T14:43:49+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/apt-desktop-upgrades/commit/?id=08296ef2b88b340c6c012635a39895d8e68276e0'/>
<id>08296ef2b88b340c6c012635a39895d8e68276e0</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Remember the value of PREFIX between runs</title>
<updated>2022-03-17T14:32:13+00:00</updated>
<author>
<name>Adam Spragg</name>
<email>adam@spra.gg</email>
</author>
<published>2022-03-17T14:32:13+00:00</published>
<link rel='alternate' type='text/html' href='https://spragg-ssl.co.uk/projects/cgit.cgi/apt-desktop-upgrades/commit/?id=9d2e75bcfade4accd67685440b832e7143cbedda'/>
<id>9d2e75bcfade4accd67685440b832e7143cbedda</id>
<content type='text'>
So when you do `make PREFIX=/usr` and then `make install`, it installs
to `/usr`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
So when you do `make PREFIX=/usr` and then `make install`, it installs
to `/usr`.
</pre>
</div>
</content>
</entry>
</feed>
