Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

manifest/project.list shouldn't die if project doesn't exist #50

Open
GoogleCodeExporter opened this issue Mar 26, 2016 · 5 comments
Open

Comments

@GoogleCodeExporter
Copy link

I get the following crash if I have already deleted
packages/apps/SOME_PACKAGE locally. I think it should just continue on, as
it's just going to try to delete it anyway.

This is after removing packages/apps/SOME_PACKAGE from manifest.xml and
re-syncing.

Fetching projects: 100% (163/163), done.
Traceback (most recent call last):
  File "/home/USERNAME/projects/PROJECTNAME/.repo/repo/main.py", line 235,
in <module>
    _Main(sys.argv[1:])
  File "/home/USERNAME/projects/PROJECTNAME/.repo/repo/main.py", line 217,
in _Main
    repo._Run(argv)
  File "/home/USERNAME/projects/PROJECTNAME/.repo/repo/main.py", line 123,
in _Run
    cmd.Execute(copts, cargs)
  File "/home/USERNAME/projects/PROJECTNAME/.repo/repo/subcmds/sync.py",
line 229, in Execute
    if self.UpdateProjectList():
  File "/home/USERNAME/projects/PROJECTNAME/.repo/repo/subcmds/sync.py",
line 152, in UpdateProjectList
    if project.IsDirty():
  File "/home/USERNAME/projects/PROJECTNAME/.repo/repo/project.py", line
289, in IsDirty
    '--refresh')
  File "/home/USERNAME/projects/PROJECTNAME/.repo/repo/project.py", line
1303, in runner
    capture_stderr = True)
  File "/home/USERNAME/projects/PROJECTNAME/.repo/repo/git_command.py",
line 189, in __init__
    raise GitError('%s: %s' % (command[1], e))
error.GitError: update-index: [Errno 2] No such file or directory:
'/home/USERNAME/projects/PROJECTNAME/packages/apps/SOME_PACKAGE'


Original issue reported on code.google.com by m.bn...@gmail.com on 25 Sep 2009 at 7:25

@GoogleCodeExporter
Copy link
Author

Here is the fix.

Tested by modifying Android's manifest.xml to only contain external/ after a 
fresh
repo init, repo syncing, and seeing no error message.

I can't think of any cases where this would be problematic, as it was about to 
be
deleted anyway.

Original comment by m.bn...@gmail.com on 26 Sep 2009 at 2:29

Attachments:

@GoogleCodeExporter
Copy link
Author

Can you follow SUBMITTING_PATCHES and upload your patch for review at 
review.source.android.com?

Original comment by sop+code@google.com on 26 Sep 2009 at 7:14

@GoogleCodeExporter
Copy link
Author

https://review.source.android.com/#change,11960

Original comment by m.bn...@gmail.com on 26 Sep 2009 at 9:48

@GoogleCodeExporter
Copy link
Author

I encountered the problem when I removed the whole workspace,
rm -rf $WORKSPACE/*
deleting everything except the hidden .repo directory.
This was to get a quick sync but a completely clean build.
If you've done that, you can work around this bug by doing
rm -f .repo/project.list
also before you do repo sync.

Original comment by ern...@gmail.com on 3 Mar 2010 at 3:49

@GoogleCodeExporter
Copy link
Author

We are having this issue.

Is there a resolution?

Original comment by bruce.e.james on 8 Oct 2014 at 1:33

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant