"git ubuntu build" produces false "error" output when no quilt patches are present

Bug #1802295 reported by Robie Basak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
git-ubuntu
Triaged
Medium
Unassigned

Bug Description

11/08/2018 13:03:51 - ERROR:Command exited 2: quilt --quiltrc - push -a
11/08/2018 13:03:51 - ERROR:stdout:
11/08/2018 13:03:51 - ERROR:stderr: No series file found

This is innocuous and should be suppressed.

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

Still reproducible on current git-ubuntu:

02/20/2020 16:44:10 - DEBUG:Executing: git worktree prune
02/20/2020 16:44:10 - DEBUG:Executing: tar -x --strip-components=1 -f /tmp/tmp6dwf986j/rsync_3.1.2.orig.tar.gz
02/20/2020 16:44:10 - DEBUG:Unable to find a series file in <_pygit2.Commit object at 0x7fd0436eef90>
02/20/2020 16:44:10 - DEBUG:Executing: quilt --quiltrc - push -a
02/20/2020 16:44:10 - DEBUG:Executing: git worktree add --detach --force /tmp/tmpje_4hpxj 9d30db948107e5372c107b5b2657dd37df932db1
02/20/2020 16:44:10 - DEBUG:Unable to find a series file in <_pygit2.Commit object at 0x7fd0436eefd0>
02/20/2020 16:44:10 - DEBUG:Executing: quilt --quiltrc - push -a
02/20/2020 16:44:10 - ERROR:Command exited 2: quilt --quiltrc - push -a
02/20/2020 16:44:10 - ERROR:stdout:
02/20/2020 16:44:10 - ERROR:stderr: No series file found

02/20/2020 16:44:10 - DEBUG:Executing: git worktree prune

The call to determine_quilt_series_path() notices that there is no series file, but instead of returning None or throwing an exception, it is returning a default value ('debian/patches/series'), which quilt_env*() sets in the ENV.

GitUbuntuRepository.is_patches_applied() calls run_quilt() to check if patches are applied and if not has some logic to detect whether there are no patches to apply, or there's an extraneous .pc, or a real error has occurred. It's this run_quilt() call that causes the error messages. ("No series file found" comes from quilt itself.)

One possible way to correct this would be to modify determine_quilt_series_path() to return an error indicator of some sort if it did not find the series file. Then we can call this routine directly from GitUbuntuRepository.is_patches_applied() and know immediately when there are no patches and handle accordingly. quilt_env() would then apply the default 'debian/patches/series' when creating the env. The only other user of determine_quilt_series_path() is its test case, which would need adjusted as well.

A more brute force option may be to have run_quilt() capture the stderr and filter out the 'No series file found' error message. This feels hacky to me though.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.