[Python-Dev] PEP 376 - Open questions

Paul Moore p.f.moore at gmail.com
Wed Jul 8 14:54:49 CEST 2009


2009/7/8 Antoine Pitrou <solipsis at pitrou.net>:
> Paul Moore <p.f.moore <at> gmail.com> writes:
>>
>> I have no answer here. But I think we need feedback from the people
>> who will ultimately be building bdist_xxx formats - Debian packagers,
>> people wrting alternate RPM builders, etc.
>
> I think any bdist_xxx command which targets externally handled package formats
> (rpm, deb, msi, etc.) shouldn't generate RECORD. If you install with rpm or
> dpkg, you will uninstall with the same tool, won't you?

I thought the purpose of RECORD was (also) so that *other* installs
could check who "owned" an existing file, before potentially
overwriting it. That seems like it's the reasoning behind the uses()
function.

But the PEP is very light on practical applications, so it's hard to
tell what the methods are intended to be used for.

>> Bottom line - Is RECORD to be created on the target machine at install
>> time, or must it be relocatable?
>
> This is quite an uninformed opinion, but a relocatable RECORD looks like a can
> of worms to me.
>
> As for creating RECORD at install time, I don't understand the argument about
> duplicate code. Distutils can provide useful primitives for generating RECORD,
> so that interested subcommands don't have a lot of additional work to do.

The bdist_wininst code is in C, and the bdist_msi code is driven by
the MSI data format. I don't know what scripting options exist for
.deb and .rpm files. Different languages, so no code sharing seems
possible. Maybe I'm wrong, and something could be done along the lines
of a "pkgutil.generate_record_file()" function which could be run from
a post-install script written in Python, but I don't know how
plausible or robust that would be...

Paul.


More information about the Python-Dev mailing list