~nacc/git-ubuntu:bug-fixes-3

Last commit made on 2018-01-12
Get this branch:
git clone -b bug-fixes-3 https://git.launchpad.net/~nacc/git-ubuntu
Only Nish Aravamudan can upload to this branch. If you are Nish Aravamudan please log in for upload directions.

Branch merges

Branch information

Name:
bug-fixes-3
Repository:
lp:~nacc/git-ubuntu

Recent commits

db0ddf8... by Nish Aravamudan

git_repository: modify use of TemporaryDirectory to avoid crosstalk

Currently, no matter where the cwd is, all temporary directories are
placed in /tmp. This means when we use the pardir of the temporary
directory, we end up using /tmp and that leads to crosstalk between code
paths and binaries.

We really want each temporary directory to be an isolated env, so use
nested TemporaryDirectories.

LP: #1734137.

46280ff... by Nish Aravamudan

build.fetch_orig: modify API to take repo and commit_hash

There is a false assumption in the fetch_orig() API that assumed
gbp-buildpackage would somehow leverage the changelog object we have as
a parameter. It does not, and additionally, it cannot -- the
gbp-buildpackage subcommand only uses data from HEAD currently. So we
need to:
  a) pass the repo and commit_hash to fetch_orig; and
  b) use a temporary worktree in fetch_orig*() to switch to the
commit_hash in repo so that the remaining commands dtrt.

b) does mean we are using a different GIT_DIR and WORK_TREE, so there
will be uncommitted changes relative to the GIT_DIR. Pass
--git-ignore-new to gbp to avoid this issue (we aren't actually using
gbp-buildpackage to build, and should switch to gbp-export-orig ASAP).

However, using b) breaks fetch_orig_from_parent_dir which does not know
about the Git repository at all. I am not sure how to resolve this yet,
and it's technically a corner case where an experienced developer wants
to provide us orig tarballs.

LP: #1738957

9092a15... by Nish Aravamudan

build: do not intersect changes file and built files

Just use the changes file contents to determine what was built.

d4507f9... by Nish Aravamudan

scripts/scriptutils: refactor srcpkgs_to_import_list to reduce code duplication

We iterate all of Ubuntu main, then all of Ubuntu universe, then Debian,
treating Debian source packages not present in Ubuntu as if they were in
universe.

I would prefer if the Ubuntu iterations were using one
components=['main', 'universe'], but then the caller would not know in
which component the given source package lives. In theory, we can use
src['directory'], but that seems sort of fragile to parse.

07d8b26... by Nish Aravamudan

git_repository.temporary_worktree: always prune worktrees

If an Exception was raised (e.g., ^C'ing git-ubuntu), the worktree would
not be pruned without this change.

53e7bd1... by Nish Aravamudan

git_repository.temporary_worktree: adjust GIT_WORK_TREE variable

gbp is throwing rather odd errors claiming the path for the temporary
work tree is not a Git repository. This appears to be due to having a
GIT_WORK_TREE environment variable and using a git-worktree that is
somewhere else. Properly set the environment variable in our context.

399ca4b... by Nish Aravamudan

scriptutils.pool_map_import_srcpkg: properly handle num_workers=0

Do not create a pool, just run map().

0a657cd... by Nish Aravamudan

git-ubuntu: properly handle symlinked binaries

7581ac8... by Nish Aravamudan

build: orig tarballs do not exist for native source packages

Do not try to push orig tarballs if they do not exist. Found while
investigating LP #1741472.

e7fa818... by Nish Aravamudan

dsc: return a list from orig_tarball_paths

The current Dsc class incorrectly handles native package orig tarballs
and returns None for the orig_tarball_path. It really needs to return
'nothing', as in an empty list (but the current API is a single return
value, not a list). When there is an orig tarball, there will be one
member in the list.

LP: #1741472

---

Note that I would like to use the dsc_builder code to test this, but
it's not yet merged.