[16:12] <smoser> hey...
[16:12] <smoser> i get mails like http://paste.ubuntu.com/23653970/
[16:13] <smoser> for this recipe: https://code.launchpad.net/~cloud-init-dev/+recipe/cloud-init-daily
[16:13] <smoser> i think that occurss basically because the version i have
[16:13] <smoser>  {latest-tag}-{revtime}-g{git-commit}-0ubuntu1~trunk
[16:14] <smoser> will have the same source code version any time this thing runs twice with the same upstream source
[16:14] <smoser> is there any way to avoid this noise ?
[16:16] <smoser> hm...
[16:16] <smoser> maybe i just need to use '{time}' instead of '{revtime}'
[16:19] <dobey> i would recommend not having multiple "-" in the version string there. would suggest + or ~ instead; multiple - can mess things up in the future; and yeah, if {revtime} is the same for two different commits, then g{git-commit} can end up being resolved lower than a previous build
[16:19] <cjwatson> You should probably have {SOMETHINGOROTHER:ubuntu-pkg} in that version
[16:20] <cjwatson> In general there should be some element from all the branches you're assembling
[16:20] <smoser> dobey, i'm sticking with the multiple -. it is debian-valid, and its more like upstream where i use 'git describe'  (which is what i'd rather use).
[16:20] <cjwatson> (probably after the last -, in this case)
[16:21] <cjwatson> I really wouldn't use {time}.  Ideally recipes should be deterministic
[16:21] <smoser> cjwatson, is that what is causing it ?
[16:21] <cjwatson> The lack of any {...:ubuntu-pkg} variables?  Yes.
[16:21] <dobey> smoser: i know it's valid. but from experience it's definitely caused me problems in the past.
[16:22] <smoser> well, i've not seen too many issues in my useage in cloud-init. i  know its non-standard, but git describe is *so* useful.
[16:23] <smoser> so then i get a build failure any time i push to the packaging branch but the upstream branch doesnt change.
[16:24] <cjwatson> Only because your version doesn't contain any elements that depend on the packaging branch.
[16:24] <smoser> cjwatson, you have a suggestion for what to use ?
[16:24] <smoser> bzr revno was nice in all its simplicity
[16:24] <cjwatson> {revno:ubuntu-pkg} works
[16:24] <cjwatson> {revtime:ubuntu-pkg} is more git-ish, but as you say revno is nice and simple
[16:24] <cjwatson> which is why I implemented a shim for it
[16:25] <cjwatson> there's a note about this in https://help.launchpad.net/Packaging/SourceBuilds/Recipes#Version_numbers_and_substitution_variables
[16:25] <cjwatson> specifically about this kind of case
[16:26] <smoser> oh i didnt' know revno works.
[16:26] <smoser> that is really nice.
[16:27] <smoser> oh.
[16:28] <smoser> i'll go with that.
[16:45] <smoser> dobey, oh yeah, i do remember... i had one thing that i was stuck by
[16:45] <smoser>  https://bugs.launchpad.net/git-build-recipe/+bug/1611219
[16:45] <ubot5`> Ubuntu bug 1611219 in git-build-recipe "git build recipe seems not to like multiple - in version" [Undecided,New]
[16:45] <smoser> :)
[16:46] <dobey> not quite the problem i was referring to from my past experience. had version comparison issues in past with dpkg
[16:46] <dobey> anyway, i'm not going to fight you about it :)
[16:47] <cjwatson> I don't think that has anything to do with multiple -
[16:47] <cjwatson> I need to think about what it actually does have to do with
[16:47] <smoser> :)
[16:47] <smoser> git-build-recipe format 0.4 deb-version {latest-tag}-{rev}-g{git-commit}-0ubuntugit-build-recipe format 0.4 deb-version {latest-tag}-{revno}-g{git-commit}-{debversion:ubuntu-pkg}+{revno:ubuntu-pkg}~trunk
[16:47] <smoser> wait.
[16:47] <smoser> git-build-recipe format 0.4 deb-version {latest-tag}-{revno}-g{git-commit}-{debversion:ubuntu-pkg}+{revno:ubuntu-pkg}~trunk
[16:47] <smoser> does that seem to make sense ?
[16:48] <cjwatson> my eyes glazed over, sorry
[16:48] <smoser> yeah i know.
[16:48] <cjwatson> I don't really want to get into sanity-checking versions :)
[16:48] <smoser> thats fime.
[16:48] <smoser> my changes there were
[16:48] <smoser> {revtime} -> {revno}
[16:49] <smoser> 0ubuntu1 -> {debversion:ubuntu-pkg}+{revno:ubuntu-pkg}
[16:49] <smoser> you dont need to help any more, thanks for your help.
[16:49] <dobey> cjwatson: it's because the version comparison splits upstream versus debian version between a single -, and so can get weird in some cases. i guess it's ok though if you're extra careful to ensure you never end up adding extra - chars AFTER the -MubuntuN
[16:50] <cjwatson> dobey: no, it's not
[16:50] <cjwatson> dobey: look at the exception message
[16:50] <cjwatson> Invalid version string '{debupstream:ubuntu-pkg}-0.7.7~git1029-gb56d7a1-0ubuntu1+trunk~ubuntu16.10.1'
[16:50] <dobey> cjwatson: no, i mean the issue i was talking about with having multiple versions
[16:50] <cjwatson> that is indeed not a valid version, and it's because that substitution variable hasn't been expanded for some reason
[16:50] <cjwatson> dobey: well, sure, but I don't know why you were addressing that to me then :)
[16:51] <cjwatson> I was replying to smoser's bug title
[16:51] <dobey> cjwatson: oh, you didn't prefix with "smoser:" and it looked like you were replying to me in irssi. sorry :)
[16:51] <cjwatson> fair enough
[16:57] <smoser> well, possibly similar fail to the bug above
[16:57] <smoser> https://launchpadlibrarian.net/298978047/buildlog.txt.gz
[16:57] <smoser> ValueError: Invalid version string '0.7.8-1368-gc9c9197-{debversion:ubuntu-pkg}+1365~trunk~ubuntu16.04.1'