Page MenuHomeFreeBSD

Normalize paths for autoplist
ClosedPublic

Authored by mva on Sep 23 2014, 10:02 AM.
Tags
None
Referenced Files
Unknown Object (File)
Sun, Apr 7, 5:59 AM
Unknown Object (File)
Sun, Apr 7, 5:56 AM
Unknown Object (File)
Jan 27 2024, 1:37 AM
Unknown Object (File)
Jan 18 2024, 8:19 AM
Unknown Object (File)
Dec 24 2023, 12:17 PM
Unknown Object (File)
Dec 20 2023, 11:12 AM
Unknown Object (File)
Dec 19 2023, 11:32 PM
Unknown Object (File)
Dec 5 2023, 4:47 PM
Subscribers

Details

Reviewers
antoine
Group Reviewers
portmgr
Python
Summary

The distutils --record option keeps relative path of arbitrary complexity, which can lead to entries suchs as

  • foo/./bar
  • ../../foo/./bar/../baz
  • /../foo
  • etc.

Packaging does not do perform any path normalisation, which in turn leads to
breakages in the QA sanity checks, since those just compare the output of
find to whatever is in the plist.

Citing a conversation between @rm, @sunpoet, @antoine and myself:

devel/py-twistedCore fails to package like this:
http://danny.trejo.ru/py27-twistedCore-14.0.0.log


% pkg info -lF py27-twistedCore-14.0.0.txz
...

/usr/local/lib/python2.7/site-packages/./twisted/internet/iocpreactor/build.bat
/usr/local/lib/python2.7/site-packages/./twisted/internet/iocpreactor/iocpsupport/acceptex.pxi
/usr/local/lib/python2.7/site-packages/./twisted/internet/iocpreactor/iocpsupport/connectex.pxi
/usr/local/lib/python2.7/site-packages/./twisted/internet/iocpreactor/iocpsupport/iocpsupport.c

% tar tf py27-twistedCore-14.0.0.txz
...

/usr/local/lib/python2.7/site-packages/./twisted/internet/iocpreactor/build.bat
/usr/local/lib/python2.7/site-packages/./twisted/internet/iocpreactor/iocpsupport/acceptex.pxi
/usr/local/lib/python2.7/site-packages/./twisted/internet/iocpreactor/iocpsupport/connectex.pxi
/usr/local/lib/python2.7/site-packages/./twisted/internet/iocpreactor/iocpsupport/iocpsupport.c

% pkg which /usr/local/bin/trial
/usr/local/bin/trial was installed by package py27-twistedCore-14.0.0
% pkg which /usr/local/lib/python2.7/site-packages/twisted/internet/iocpreactor/build.bat
/usr/local/lib/python2.7/site-packages/twisted/internet/iocpreactor/build.bat
was not found in the database
% pkg which /usr/local/lib/python2.7/site-packages/./twisted/internet/iocpreactor/build.bat
/usr/local/lib/python2.7/site-packages/twisted/internet/iocpreactor/build.bat
was not found in the database

pkg delete py27-twistedCore

Updating database digests format: 100%
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0
packages in the universe):

Installed packages to be REMOVED:
py27-twistedCore-14.0.0

The operation will free 19 MB

Proceed with deinstalling packages [y/N]: y
[110amd64-custom] [1/1] Deleting py27-twistedCore-14.0.0: 100%
pkg: rmdir(/usr/local/lib/python2.7/site-packages/./twisted/test/): No
such file or directory
pkg: rmdir(/usr/local/lib/python2.7/site-packages/./twisted/spread/ui/):
No such file or directory
pkg: rmdir(/usr/local/lib/python2.7/site-packages/./twisted/spread/):
No such file or directory
...

Test Plan

exp-run necessary, once the patch was tested properly against
devel/py-twistedCore.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
No Lint Coverage
Unit
No Test Coverage

Event Timeline

mva retitled this revision from to Normalize paths for autoplist.
mva updated this object.
mva edited the test plan for this revision. (Show Details)
mva added reviewers: Python, portmgr.
mva added subscribers: sunpoet, rm, antoine.
mva edited edge metadata.
  • Fix trailing some/path/.. constructs

Tested with devel/py-twistedCore and sysutils/py-halite.

Hi,

Could you remove the deprecated @dirrmtry from autoplist too?
@dir can still be used if the directory is empty, needs special credentials or is outside prefix, but I don't think this happens with distutils?

  • Remove now superfluous @dirrm/@dirrmtry entries for autoplist, py3kplist and egg-info directories

Since there are no directories for @dirrm/@dirrmtry, we do not need a local
mtree as reference anymore.

This revision is now accepted and ready to land.Sep 25 2014, 8:25 PM