⚡ Sangsakala Proxy 🏠 Home
Skip to content

write only relative path in 'RECORD' - #3448

Merged
pfmoore merged 4 commits into
pypa:developfrom
stonebig:patch-1
Feb 7, 2016
Merged

pfmoore merged 4 commits into
pypa:developfrom
stonebig:patch-1

Conversation

@stonebig

@stonebig stonebig commented Feb 2, 2016

Copy link
Copy Markdown
Contributor

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

stonebig commented Feb 2, 2016

Copy link
Copy Markdown
Contributor Author

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

@pfmoore

pfmoore commented Feb 2, 2016

Copy link
Copy Markdown
Member

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

pfmoore commented Feb 2, 2016

Copy link
Copy Markdown
Member

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

@stonebig

stonebig commented Feb 2, 2016

Copy link
Copy Markdown
Contributor Author

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

@stonebig

stonebig commented Feb 2, 2016

Copy link
Copy Markdown
Contributor Author

my first pypy !

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

Ivoz commented Feb 3, 2016

Copy link
Copy Markdown
Contributor

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

pfmoore commented Feb 3, 2016

Copy link
Copy Markdown
Member

@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
Copy Markdown
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

pfmoore commented Feb 7, 2016

Copy link
Copy Markdown
Member

Thanks for the contribution @stonebig !

@stonebig

stonebig commented Feb 7, 2016

Copy link
Copy Markdown
Contributor Author

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