build fails if there is no debian/patches/series

Bug #1801168 reported by Scott Moser
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
git-ubuntu
Fix Released
High
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/__main__.py", line 243, in main
    sys.exit(args.func(args))
  File "/snap/git-ubuntu/441/lib/python3.6/site-packages/gitubuntu/build.py", line 711, in cli_main
    retry_backoffs=args.retry_backoffs,
  File "/snap/git-ubuntu/441/lib/python3.6/site-packages/gitubuntu/build.py", line 496, in main
    retry_backoffs,
  File "/snap/git-ubuntu/441/lib/python3.6/site-packages/gitubuntu/build.py", line 1253, in fetch_orig_and_build
    retry_backoffs,
  File "/snap/git-ubuntu/441/lib/python3.6/site-packages/gitubuntu/build.py", 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/git_repository.py", 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/git_repository.py", line 2393, in _maybe_quiltify_tree_hash
    regenerated_pc_path,
  File "/snap/git-ubuntu/441/usr/lib/python3.6/shutil.py", line 309, in copytree
    names = os.listdir(src)
FileNotFoundError: [Errno 2] No such file or directory: '.pc'

Related branches

Scott Moser (smoser)
description: updated
description: updated
Revision history for this message
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  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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