PBR

git repository without any commits fails to get a valid initial version

Bug #1232868 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
PBR
Triaged
Low
Unassigned

Bug Description

I ran:
pip install cookiecutter
cookiecutter git://git.openstack.org/openstack-dev/cookiecutter.git
cd git-next-version/
git init ; git add .
tox
and tox fails:
Obtaining file:///home/robertc/work/git-next-version
  Running setup.py egg_info for package from file:///home/robertc/work/git-next-version
    error in setup command: Error parsing /home/robertc/work/git-next-version/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository.
    Complete output from command python setup.py egg_info:
    error in setup command: Error parsing /home/robertc/work/git-next-version/setup.cfg: Exception: Versioning for this project requires either an sdist tarball, or access to an upstream git repository.

Revision history for this message
Robert Collins (lifeless) wrote :

If I commit it (bad practice) it then fails still:
./setup.py:22:14: W292 no newline at end of file
    pbr=True)
             ^
./git-next-version/__init__.py:20:41: W292 no newline at end of file
    'git-next-version').version_string()
                                        ^
./git-next-version/tests/__init__.py:54:66: W292 no newline at end of file
        self.log_fixture = self.useFixture(fixtures.FakeLogger())
                                                                 ^
./git-next-version/tests/test_git-next-version.py:23:9: E226 missing whitespace around arithmetic operator
from git-next-version import tests
        ^
./git-next-version/tests/test_git-next-version.py:23:10: E901 SyntaxError: invalid syntax
from git-next-version import tests
         ^
./git-next-version/tests/test_git-next-version.py:23:14: E226 missing whitespace around arithmetic operator
from git-next-version import tests
             ^
./git-next-version/tests/test_git-next-version.py:26:14: E226 missing whitespace around arithmetic operator
class TestGit-next-version(tests.TestCase):
             ^
./git-next-version/tests/test_git-next-version.py:26:19: E226 missing whitespace around arithmetic operator
class TestGit-next-version(tests.TestCase):
                  ^
./git-next-version/tests/test_git-next-version.py:29:13: W292 no newline at end of file
        pass
            ^

Revision history for this message
Davanum Srinivas (DIMS) (dims-v) wrote :

Does this bug report belong to Oslo or somewhere else?

Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

This is an issue with pbr's version detection not understanding a fresh git repository.

Changed in oslo:
status: New → Won't Fix
summary: - fresh cookiecut environment barfs
+ git repository without any commits fails to get a valid initial version
Changed in pbr:
importance: Undecided → Low
status: New → Triaged
Revision history for this message
Robert Collins (lifeless) wrote :

So actually, there are two bugs here. One about the tox failures on initial content; the second about the version.

no longer affects: oslo-incubator
Revision history for this message
Doug Hellmann (doug-hellmann) wrote :

The issue with the initial content is a problem with cookie cutter's handling of newlines in templates, and was fixed in 0.8.0 (http://cookiecutter.readthedocs.org/en/latest/history.html#id1)

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.