Re: Are two Vcs-{Git|Svn|...} and Vcs-Browser fields sensible?
On Thu, Feb 04, 2016 at 06:54:08PM +0000, Niels Thykier wrote:
> I appreciate this idea and effort. Unfortunately, this is the type of
> information we want in the *source* package (at least AFAICT), and to my
> knowledge you cannot use substitution variables in those.
This surprised me[1], so I checked it out. Turns out that in fact you
can, sortof. From dpkg-source(1):
-Tsubstvars-file
Read substitution variables in substvars-file; the default is to not
read any file. This option can be used multiple times to read
sustitution variables from multiple files (since dpkg 1.15.6).
It works, too:
wouter@gangtai:~/debian$ grep Vcs testingk-0.1/debian/control
Vcs-Git: ${vcs:repo}
Vcs-Browser: ${vcs:browser}
wouter@gangtai:~/debian$ cat testingk-0.1/debian/substvars
vcs:repo=my_repo_url
vcs:browser=my_browser_url
wouter@gangtai:~/debian$ dpkg-source -Ttestingk-0.1/debian/substvars -b testingk-0.1
dpkg-source: warning: no source format specified in
debian/source/format, see dpkg-source(1)
dpkg-source: info: using source format '1.0'
dpkg-source: info: building testingk in testingk_0.1.tar.gz
dpkg-source: info: building testingk in testingk_0.1.dsc
wouter@gangtai:~/debian$ grep Vcs testingk_0.1.dsc
Vcs-Browser: my_browser_url
Vcs-Git: my_repo_url
Unfortunately, the "the default is not to read any file" bit pretty much
kills it; adding it to debian/source/options produces
dpkg-source: warning: short option not allowed in testingk-0.1/debian/source/options, line 1
...so this won't work. Wouldn't require much to make it possible,
though.
Regards,
[1] nice to know that even after fifteen years, there are *still* things
in Debian that surprise me...
--
It is easy to love a country that is famous for chocolate and beer
-- Barack Obama, speaking in Brussels, Belgium, 2014-03-26
Reply to: