Bug #1596
closed
Generation on debian fails because of Version = -unknown in control file
Added by Eric Valette over 12 years ago.
Updated over 12 years ago.
Found in version:
v3.3-453-g5dd5826
Description
reading the script I found the command run and tested it manually
git describe --dirty --match 'v*'
v3.3-453-g5dd5826
but
sh support/version
-unknown
sh x support/version
+ FILE=
+ '[' -d .git ']'
++ dirname support/version
+ cd support
+ git describe --dirty --match 'v*'
VER=
+ '[' 128 -ne 0 ']'
++ dirname support/version
+ cd support
+ git describe --match 'v*'
VER=-unknown
+ echo -unknown
+ sed 's/^v//'
+ sed 's/\([0-9]*\)-\(g[0-9a-f]*\)/.\1~\2/'
VER=-unknown
+ '[' -z '' ']'
+ echo -unknown
-unknown
+ exit
In fact the cd $(dirname $0) cause the problem.
I don't understand, the debug above shows that command succeeded (and git ops should work from any valid subdir of the repo). I've checked this on a wheezy build system, its all I've got access to. It works fine.
What output do you get it you manually run:
cd support
git describe --dirty --match 'v*'
Adam
Adam Sutton wrote:
I don't understand, the debug above shows that command succeeded (and git ops should work from any valid subdir of the repo). I've checked this on a wheezy build system, its all I've got access to. It works fine.
What output do you get it you manually run:
cd support
git describe --dirty --match 'v*'
Adam
cd tvheadend/support/
113 r-x-ceva6380:~/local/src/tvheadend/support->git describe --dirty --match 'v*'
fatal: No names found, cannot describe anything.
The same command in the root directory succeeds
Eric Valette - wrote:
The same command in the root directory succeeds
113 r-x-ceva6380:~/local/src/tvheadend/support->git describe --dirty --match 'v*'
fatal: No names found, cannot describe anything.
114 r-x-ceva6380:~/local/src/tvheadend/support->cd ..
115 r-x-ceva6380:~/local/src/tvheadend->git describe --dirty --match 'v*'
v3.3-453-g5dd5826-dirty
Must be a problem with some old version of git I guess, easy enough to mod the script to switch to the root DIR instead. I'll post a fix later.
Adam
Adam Sutton wrote:
Must be a problem with some old version of git I guess, easy enough to mod the script to switch to the root DIR instead. I'll post a fix later.
Adam
git --version
git version 1.8.1.1
Well that's newer than mine, so maybe its the reverse, they've now stopped allowing that. But that's not what I would have expected. All seems odd, but either way I'll mod the script to keep it happy.
Adam
- Status changed from New to Fixed
- % Done changed from 0 to 100
Applied in changeset commit:ac36914b986dfdab80d1243344f1b9a5b97a6247.
Also available in: Atom
PDF