build fails if there is no debian/patches/series

Bug #1801168 reported by Scott Moser on 2018-11-01
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Scott Moser

Bug Description

If there are no patches, then a build will fail.

$ git ubuntu clone requests
$ git checkout pkg/import/2.18.4-2

$ git checkout pkg/import/2.18.4-2 >/dev/null 2>&1

$ git ubuntu build
11/01/2018 17:09:31 - WARNING:pristine-tar data found for both debian and ubuntu, using ubuntu
Traceback (most recent call last):
  File "/snap/git-ubuntu/441/bin/git-ubuntu", line 11, in <module>
    load_entry_point('gitubuntu==0.7.4', 'console_scripts', 'git-ubuntu')()
  File "/snap/git-ubuntu/441/lib/python3.6/site-packages/gitubuntu/", line 243, in main
  File "/snap/git-ubuntu/441/lib/python3.6/site-packages/gitubuntu/", line 711, in cli_main
  File "/snap/git-ubuntu/441/lib/python3.6/site-packages/gitubuntu/", line 496, in main
  File "/snap/git-ubuntu/441/lib/python3.6/site-packages/gitubuntu/", line 1253, in fetch_orig_and_build
  File "/snap/git-ubuntu/441/lib/python3.6/site-packages/gitubuntu/", line 785, in do_build
    tree_hash = repo.quiltify_and_changelogify_tree_hash(commitish)
  File "/snap/git-ubuntu/441/lib/python3.6/site-packages/gitubuntu/", line 2603, in quiltify_and_changelogify_tree_hash
    quiltify_tree_hash = self._maybe_quiltify_tree_hash(commit_hash)
  File "/snap/git-ubuntu/441/lib/python3.6/site-packages/gitubuntu/", line 2393, in _maybe_quiltify_tree_hash
  File "/snap/git-ubuntu/441/usr/lib/python3.6/", line 309, in copytree
    names = os.listdir(src)
FileNotFoundError: [Errno 2] No such file or directory: '.pc'

Related branches

Scott Moser (smoser) on 2018-11-05
description: updated
description: updated
Bryce Harrington (bryce) wrote :

This fix was landed to master last year.

commit dbd94e58c56f871ae56c7ffd13be40b392808068
Author: Scott Moser <email address hidden>
Date: Thu Nov 1 17:10:44 2018 -0400

    build: Fix build when there are no quilt patches.

    If a package did not have any quilt packages, then git-ubuntu build
    would stack trace trying to copy the non-existant .pc directory.

    As an example:
      $ git ubuntu clone requests
      $ git checkout pkg/import/2.18.4-2
      $ git ubuntu build

    LP: #1801168

Changed in usd-importer:
assignee: nobody → Scott Moser (smoser)
importance: Undecided → High
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers