How can I debug/solve gitbuildrecipe.deb_util.NoSuchTag?

Asked by Jason Gross

For the past week or so, my recipe at https://code.launchpad.net/~jgross-h/+recipe/coq-master-daily (also https://code.launchpad.net/~jgross-h/+recipe/coq-master-daily-coqide-no) has not been building, failing at https://launchpadlibrarian.net/627413885/buildlog.txt.gz with error messages like
Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/main.py", line 162, in main
    extract_upstream_tarball(
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/deb_util.py", line 86, in extract_upstream_tarball
    raise NoSuchTag(tag_names[0])
gitbuildrecipe.deb_util.NoSuchTag

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/deb_util.py", line 214, in convert_3_0_quilt_to_native
    subprocess.check_call(
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['quilt', 'push', '-a', '-v']' returned non-zero exit status 1.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/bin/git-build-recipe", line 11, in <module>
    load_entry_point('git-build-recipe==0.1', 'console_scripts', 'git-build-recipe')()
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/main.py", line 172, in main
    force_native_format(working_directory, current_format)
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/deb_util.py", line 236, in force_native_format
    convert_3_0_quilt_to_native(working_tree_path)
  File "/usr/lib/python3/dist-packages/gitbuildrecipe/deb_util.py", line 223, in convert_3_0_quilt_to_native
    raise Exception("Failed to apply quilt patches")
Exception: Failed to apply quilt patches

I don't understand this, since I'm not using a tag (I'm basing it on the branch master), and I'm not using quilt. I seem to recall seeing errors like this before transiently, and having them fix themselves on the next build, but at this point the last successful build was 11 days ago. What's going on? How do I fix this? How do I debug this?

Question information

Language:
English Edit question
Status:
Solved
For:
Launchpad itself Edit question
Assignee:
No assignee Edit question
Solved by:
Jürgen Gmach
Solved:
Last query:
Last reply:
Revision history for this message
Jürgen Gmach (jugmac00) said (last edit ):
#1

Hey Jason,

the very first thing to do when a recipe on Launchpad fails, would be to try it locally, as mentioned in https://help.launchpad.net/Packaging/SourceBuilds/GettingStarted

I tried your recipe and it already fails locally. So this does not seem to be a Launchpad bug.

While I also see your traceback, it is preceeded by a failed attempt to apply a patch.

I am not familiar with `git-build-recipe`, so I am not sure whether this is just a warning or an error - at least it is shown in red color.

```
Applying patch /home/jugmac00/Tests/source-builds/working-dir/recipe/debian/patches/lablgtk3-unspecified-configure.patch
can't find file to patch at input line 5
Perhaps you used the wrong -p or --strip option?
The text leading up to this was:
--------------------------
|diff --git a/tools/configure/coqide.ml b/tools/configure/coqide.ml
|index 9f1aecdadc..7026c05b49 100644
|--- a/tools/configure/coqide.ml
|+++ b/tools/configure/coqide.ml
--------------------------
No file to patch. Skipping patch.
1 out of 1 hunk ignored
```

"Skipping patch" suggests that this is not an error, but when debugging a new tool, it is always a good idea to remove any noise.

So, could you please check whether you can fix the failed patch attempt first?

Anyway, I just stepped through the relevant code of `git-build-recipe`:
https://git.launchpad.net/git-build-recipe/tree/gitbuildrecipe/deb_util.py#n51

As you can see, checking tags only happens as a fallback when `pristine-tar list` cannot list possible tarball checkouts from the git repository.

That is all I can offer now, as I am not very familiar with the whole process.

```
(Pdb++) a
path = 'working-dir/recipe'
package = 'coq'
version = '8.master~git~202210140838+23528-0~daily400'
dest_dir = 'working-dir'

(Pdb++) tag_names
['upstream/8.master~git~202210140838+23528-0~daily400', 'upstream-8.master~git~202210140838+23528-0~daily400']

(Pdb++) prefix
'coq_8.master~git~202210140838+23528-0~daily400.orig.tar.'
```

I will ask a colleague to help with debugging.

Revision history for this message
Best Jürgen Gmach (jugmac00) said :
#2

Hey Jason,

my colleague joined me in order to debug your issue, and actually my initial thoughts were pretty close.

The issue is that your patches can no longer be applied to the upstream target.

And actually, you do use "quilt", while not directly, but via your packaging branch, see
https://git.launchpad.net/~jgross-h/coq/+git/coq-packaging/tree/debian/source/format

I think we can all agree, that the error message was not very helpful.

I will create an issue for that on the bug tracker for `git-build-recipe`.

Jürgen Gmach
Launchpad team

Revision history for this message
Jason Gross (jgross-h) said :
#3

Thanks Jürgen Gmach, that solved my question.