Code review comment for ~michal-maloszewski99/ubuntu/+source/logwatch:logwatch-lp-1890748-focal

Revision history for this message
Bryce Harrington (bryce) wrote :

LGTM. Ran through the test case with and without the PPA, and worked as expected. I'll sponsor the upload.

A couple notes just for general education, but they're not important enough for fixing here:

Watch out for whitespace changes in your patches, especially in SRUs, because they have no functional change. You want the diff to really highlight the specific line(s) necessary for the change, and whitespace delta thus just adds noise, so reviewers have to doublecheck things. In this case it's fine, since this is part of the cleanup of the fix that failed validation anyway. (I do note though the tabbing still seems off, but honestly the entire zz-network script has messy whitespace and tabbing already...)

I notice the patch is moved to the end of debian/series, which I gather is just for cleanup. But be aware in a proper SRU if you move where the patch is listed, it should probably also be noted in the debian/changelog, and should really only be done if it is needed to fix an actual problem. In this case, since it's just a cleanup of the earlier upload it's fine.

The output from running the test case is:

 ------------- Network statistics ---------------

 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
     link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
     inet 127.0.0.1/8 scope host lo
        valid_lft forever preferred_lft forever
     inet6 ::1/128 scope host
        valid_lft forever preferred_lft forever
 56: eth0@if57: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
     link/ether 00:16:3e:a6:2e:24 brd ff:ff:ff:ff:ff:ff link-netnsid 0
     inet 10.69.244.129/24 brd 10.69.244.255 scope global dynamic eth0
        valid_lft 3421sec preferred_lft 3421sec
     inet6 fd42:7d02:9a49:5192:216:3eff:fea6:2e24/64 scope global mngtmpaddr noprefixroute
        valid_lft forever preferred_lft forever
     inet6 fe80::216:3eff:fea6:2e24/64 scope link
        valid_lft forever preferred_lft forever

 sh: 1: netstat: not found

 ------------- Network statistics ---------------

The error about netstat is unrelated to this fix; it comes from a subsequent system() call that the ifconfig/ip issue was hiding.

review: Approve

« Back to merge proposal