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

write only relative path in 'RECORD' #3448

Merged
merged 4 commits into from
Feb 7, 2016
Merged

Conversation

stonebig
Copy link
Contributor

@stonebig stonebig commented Feb 2, 2016

RECORD now contains only relative path.
some bugs triggered by a bleeding edge usage of python may disappear a result (#3433)

Review on Reviewable

RECORD now contains only relative path.
some bugs triggered by a bleeding edge usage of python may disappear a result (pypa#3433)
@stonebig
Copy link
Contributor Author

stonebig commented Feb 2, 2016

hum, I don't think I can figure out the missing pieces for 2.6 and pypy.

@pfmoore
Copy link
Member

pfmoore commented Feb 2, 2016

I'm guessing your change meant that the uninstall couldn't find the 2 files noted in the test, and so they didn't get uninstalled. Not sure why 2.6/PyPy would be the only ones with that behaviour...

@pfmoore
Copy link
Member

pfmoore commented Feb 2, 2016

Sorry - to be clearer, you wrote something different in RECORD which is where uninstall looks to work out what to remove.

@stonebig
Copy link
Contributor Author

stonebig commented Feb 2, 2016

trying to simplify to one line, seems to do the trick

@stonebig
Copy link
Contributor Author

stonebig commented Feb 2, 2016

my first pypy !

stonebig pushed a commit to stonebig/winpython that referenced this pull request Feb 2, 2016
@Ivoz
Copy link
Contributor

Ivoz commented Feb 3, 2016

Note that the RECORD file (paths) should follow these semantics, as defined in PEP 376.

the file's path

  • a '/'-separated path, relative to the base location, if the file is under the base location.
  • a '/'-separated path, relative to the base location, if the file is under the installation prefix AND if the base location is a subpath of the installation prefix.
  • an absolute path, using the local platform separator

@pfmoore
Copy link
Member

pfmoore commented Feb 3, 2016

@Ivoz I'm pretty sure that's what normpath sorts out. Although it looks like it might get it wrong if it has to fall back to an absolute path (it uses / rather than the local path separator in that case) but that's not the fault of this patch.

OTOH, there doesn't seem to be any sort of check for the condition "if the file is under the installation prefix AND if the base location is a subpath of the installation prefix" in normpath, so blindly applying normpath might be wrong (both here and for the installed files...)

The installed files have always used normpath though, and the tests all succeed, so I'm inclined to say that it's probably OK. If someone wants to add extra "torture tests" checking weird combinations where the base location is not a subpath of the installation prefix, I'd be fine with that - and if that reveals bugs then we can fix them. But I'm inclined to consider that as a separate piece of work.

I'm willing to merge this unless anyone has any objections - @Ivoz are you OK with it given my comments above?

@xavfernandez
Copy link
Member

Since installed and changed files currently go through normpath, it would make sense for generated files to do the same.

pfmoore added a commit that referenced this pull request Feb 7, 2016
write only relative path in 'RECORD'
@pfmoore pfmoore merged commit 61f75c4 into pypa:develop Feb 7, 2016
@pfmoore
Copy link
Member

pfmoore commented Feb 7, 2016

Thanks for the contribution @stonebig !

@stonebig
Copy link
Contributor Author

stonebig commented Feb 7, 2016

super !

@xavfernandez xavfernandez added this to the 8.0.3 milestone Feb 8, 2016
xavfernandez pushed a commit to xavfernandez/pip that referenced this pull request Feb 24, 2016
write only relative path in 'RECORD'
@lock lock bot added the auto-locked Outdated issues that have been locked by automation label Jun 3, 2019
@lock lock bot locked as resolved and limited conversation to collaborators Jun 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
auto-locked Outdated issues that have been locked by automation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants