lint fails when multiple orig tarballs exist

Bug #1738957 reported by Robie Basak on 2017-12-19
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
usd-importer
Undecided
Nish Aravamudan

Bug Description

Using: 0.6.2+git49.967f050 (345)

Actual:

robie@xps:/tmp/review/strongswan$ git ubuntu lint paelzer/lp1734207-fix-mulsipsk-xenial
All lint checks passed
robie@xps:/tmp/review/strongswan$ git ubuntu lint paelzer/lp1734207-fix-mulsipsk-zesty
12/19/2017 07:36:34 - WARNING:pristine-tar data found for both debian and ubuntu, using ubuntu
Traceback (most recent call last):
  File "/snap/git-ubuntu/345/bin/git-ubuntu", line 11, in <module>
    load_entry_point('gitubuntu==0.6.2', 'console_scripts', 'git-ubuntu')()
  File "/snap/git-ubuntu/345/lib/python3.6/site-packages/gitubuntu/__main__.py", line 243, in main
    sys.exit(args.func(args))
  File "/snap/git-ubuntu/345/lib/python3.6/site-packages/gitubuntu/lint.py", line 213, in cli_main
    verbose=args.verbose,
  File "/snap/git-ubuntu/345/lib/python3.6/site-packages/gitubuntu/lint.py", line 790, in do_lint
    pkg_remote_branch_string,
  File "/snap/git-ubuntu/345/lib/python3.6/site-packages/gitubuntu/lint.py", line 634, in do_change_lint
    repo.maybe_quiltify_tree_hash(commitish_string),
  File "/snap/git-ubuntu/345/lib/python3.6/site-packages/gitubuntu/git_repository.py", line 2213, in maybe_quiltify_tree_hash
    return self._maybe_quiltify_tree_hash(commit_hash)
  File "/snap/git-ubuntu/345/lib/python3.6/site-packages/gitubuntu/git_repository.py", line 2078, in _maybe_quiltify_tree_hash
    new_tarballs.append(shutil.copy(tarball, tempdir))
  File "/snap/git-ubuntu/345/usr/lib/python3.6/shutil.py", line 241, in copy
    copyfile(src, dst, follow_symlinks=follow_symlinks)
  File "/snap/git-ubuntu/345/usr/lib/python3.6/shutil.py", line 120, in copyfile
    with open(src, 'rb') as fsrc:
FileNotFoundError: [Errno 2] No such file or directory: '../strongswan_5.5.1.orig.tar.bz2'

Expected: no error

I'm assuming that the cause is related to the warning.

Related branches

Nish Aravamudan (nacc) wrote :

Interestingly, I get the backtrace when linting either xenial or zesty.

Nish Aravamudan (nacc) wrote :

Ok, I think I figured out the problem, the fetch_orig_from_pristine_tar logic, which is undergirded by gbp-buildpackage, is using the current branch to determine what to extract. There is no support for using a changelog from a different treeish.

Additionally, we need to use the debian/patches from the commit to build, not from the current commit.

Fixes put up for code review.

Nish Aravamudan (nacc) on 2018-01-06
Changed in usd-importer:
status: New → In Progress
assignee: nobody → Nish Aravamudan (nacc)
milestone: none → future

Note: xenial fails the same way IFF you have the tarball around which explains comment #1.
I'd assume Robie had one tarball around but not the other on the report.

On 10.01.2018 [13:40:03 -0000], ChristianEhrhardt wrote:
> Note: xenial fails the same way IFF you have the tarball around which
> explains comment #1.

To be clear, if there is already a suitably named tarball in the parent
directory (we can't know the hash yet, as we haven't built yet), then
our code assumes it's intended to be used.

I'll review your comments in the MP to see where that (wrong) tarball
came from.

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

Other bug subscribers