Hi,
On Sat, Apr 12, 2014 at 11:14:51AM +0200, Daniel Dehennin wrote:
> Package: git-buildpackage
> Version: 0.6.13
> Severity: wishlist
>
> Dear Maintainer,
>
> git-dch only increases the version found in debian/changelog or uses the
> “--new-version” command line option for native packages.
Should this read non-native packages?
>
> I wonder if the limitation[1] of using upstream-tag to non native
> packages could not be removed.
[1] links to the whole dch.py script which doesn't unconfuse me. I
assume you want to see the changelog updated for _native_ packages as
well? We currently only do this for _non_native_ packages.
> With something like:
>
> #+begin_src python
> if add_section and not version_change:
> # Get version from upstream if none provided
> v = guess_version_from_upstream(repo, options.upstream_tag, cp)
> if v and source.is_native():
> # Strip the non native version part
> version_change['version'] = v.rstrip('-1')
> elif v:
> version_change['version'] = v
> #+end_src
>
> Or adding a “native=False” parameter to “guess_version_from_upstream()”
> and calling it with:
>
> #+begin_src python
> if add_section and not version_change:
> # Get version from upstream if none provided
> v = guess_version_from_upstream(repo, options.upstream_tag, cp,
> native=source.is_native())
> if v:
> version_change['version'] = v
> #+end_src
Both of these won't work since we need to pass in options.debian_tag in
the native case. I think it would be cleaner to just pass
options.debian_tag as well an rename the function to guess_version_from_git.
(The current code is just a thin wrapper around
repo.debian_version_from_upstream).
Since we now have GitVfs we don't need to know if it's native or not
upfront but can handle all the details in
DebianGitRepository.debian_version_from_upstream.
Does this make sense?
Cheers,
-- Guido
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]