~racb/git-ubuntu:dsc-decoding

Last commit made on 2017-06-30
Get this branch:
git clone -b dsc-decoding https://git.launchpad.net/~racb/git-ubuntu
Only Robie Basak can upload to this branch. If you are Robie Basak please log in for upload directions.

Branch merges

Branch information

Name:
dsc-decoding
Repository:
lp:~racb/git-ubuntu

Recent commits

318957e... by Robie Basak

Open dsc in binary mode for better decoding

Prior to Debian policy 3.8.1.0 (around March 2009), dsc files could be
encoded in anything as no encoding was mandated.

ubuntutools.archive.Dsc already has some support for auto-detection. It
appears to work, but the dsc must be opened in binary mode for this to
work.

This may mutate hashes if any other dscs are decoded differently as a
consequence of this change.

LP: #1700846

502dbb3... by Nish Aravamudan

gitubuntu/git_repository: correct search for string in file

We were calling open() on an file-like object, which was already open(). Also,
we need to seek to 0 in order to read in the entire file as written.

Fixes: 62550c080 ('GitUbuntuRepository: properly handle missing
debian/changelog')

38c1859... by Nish Aravamudan

gitubuntu/git_repository: open temporary file in same mode as named file

94d0f79... by Nish Aravamudan

git ubuntu import: leverage raise ... from ... syntax

This provides a bit of a cleaner stacktrace output on errors when we are
propogating/transforming exceptions. Per PEP 3134, this is present in
python 3.0+.

038533a... by Nish Aravamudan

git ubuntu import: remove unnecessary try/catch

We are just going to re-raise an exception in the catch, so don't even
bother try/catch'ing it.

Also clean up some style.

b7c23c6... by Nish Aravamudan

git ubuntu build: correct search for matching upstream version

The loop only makes sense if the publishing records are in version
order. That is not the case before this change, as they are in published
order and leads to false output (e.g., for sssd).

b9eea2c... by Robie Basak

Fix empty directory handling symlink traversal

Fix the recursion to recurse only down real directories, not symlinks.

A symlink to a directory that has under the target directory an empty
directory fails the assertion in _create_replacement_tree_builder
because the provided entry is not a tree (a symlink entry is a blob).
This is non-sensical; we don't want to follow symlinks while traversing
for empty directories anyway.

Nish discovered this when importing websockify 0.5.1+dfsg1-1.

I had assumed that os.path.isdir() would not match on symlinks to
directories, but it does. Instead, use os.lstat() to check st_mode
directly.

76cf83c... by Nish Aravamudan

git ubuntu build: handle building a new upstream version

We need two changes to correctly build:
 - do not attempt to find the orig tarball in Debian or Ubuntu
 - do not attempt to symlink the orig tarball, because we are not
   caching it from another upload

62550c0... by Nish Aravamudan

GitUbuntuRepository: properly handle missing debian/changelog

If debian/changelog does not exist (e.g., on an orphan branch), the
parsing function(s) incorrectly return 'HEAD:debian/changelog missing'
directly from `git cat-file`. Instead, check for this case of not
finding the debian/changelog file and raising a GitUbuntuChangelogError.

45c0ac6... by Nish Aravamudan

git ubuntu import: missing parameter to merge_commit_to_devel_head