Summary: | git-version-gen marks tarballs as dirty if build inside a dirty git clone | ||
---|---|---|---|
Product: | PulseAudio | Reporter: | Ross Burton <ross> |
Component: | build-system | Assignee: | pulseaudio-bugs |
Status: | RESOLVED FIXED | QA Contact: | pulseaudio-bugs |
Severity: | normal | ||
Priority: | medium | CC: | lennart |
Version: | unspecified | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | Prototype patch |
Description
Ross Burton
2015-06-11 15:22:46 UTC
Created attachment 116439 [details] [review] Prototype patch Prototype patch for review/comment. Sorry, I don't follow. If you have tarball contents, and you run "./git-version-gen ./.tarball-version" you'll get "6.0", not "6.0-dirty" regardless of you have a .git directory higher up in the path. I tried to reproduce, like this: mkdir mydistro cd mydistro git init wget <URL> tar -xf <FILE> cd pulseaudio-7.0 ./git-version-gen ./.tarball-version and it reported back "7.0", not "7.0-dirty". Could you clarify? You need pending modifications in the containing git tree (so git thinks there are changes to commit, thus being dirty). In your test case after git init something like this will replicate: touch foo git add foo ; git commit foo echo foo >foo $ git status On branch master Changes not staged for commit: (use "git add <file>..." to update what will be committed) (use "git checkout -- <file>..." to discard changes in working directory) modified: foo Untracked files: (use "git add <file>..." to include in what will be committed) pulseaudio-6.0/ $ cd pulseaudio-6.0/ $ ./git-version-gen .tarball-version 6.0-dirty Ok, now I can reproduce it, thanks. Your patch looks good enough to me (except that it is a "git diff" rather than "git format-patch"), but you wrote it as being a "prototype". Is there anything that you'd like to change in it before I commit it? If so, feel free to upload a new one. There wasn't anything I wanted to change, so feel free to commit it as-is. Pushed now, thanks for the contribution! http://cgit.freedesktop.org/pulseaudio/pulseaudio/commit/?id=c25b06577c2cc251c541732f245117c913206916 |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.