Message82952
Martin,
What is the goal of bdist_rpm? I haven't seen that stated explicitly
anywhere, but I assume the goal is to make a fair attempt to easily
create usable RPMs for some software already using distutil,
acknowledging that it might not work in all cases (because some projects
do strange (buggy?) things) and that the RPMs probably can't be used in
distributions directly (because they probably have their own rules and
requirements).
The applied patch makes it possible for bdist_rpm to work in _some_
situations on Fedora. IMHO that is +1.
Yes, this patch might not be enough to make it work with *.py "__main__"
files. IMHO that is a less critical issue. Personally I have never seen
bdist_rpm fail for this reason. (But "often" for other reasons.)
An advantage of this patch is that it just fixes the existing approach
to work in more situations.
Disabling _unpackaged_files_terminate_build would IMHO be a bad
solution. That would cause "successful" RPM builds which doesn't include
all the files distutil installed. And FWIW I don't understand how
__os_install_post could solve the problem.
If you want another approach: Why use a filelist at all? Yes, it is
needed if the RPM is built "in place", but these days (at least on
Fedora) RPMs are always built in an empty RPM_BUILD_ROOT. So everything
found in RPM_BUILD_ROOT has been installed by distutils, and that
includes all the files and directories the RPM should contain. For 2.5 a
simplified patch for this is:
# files section
spec_file.extend([
'',
- '%files -f INSTALLED_FILES',
+ '%files',
'%defattr(-,root,root)',
+ '/',
])
That will also make the RPM own all directories in the path to its
files. That is bad in a distribution but might be OK for bdist_rpm. To
avoid that we could continue to use "-f INSTALLED_FILES" but generate
the file list with a simple "find" command in the %install section and
remove well-known paths such as /usr/lib/python*/site-packages,
/usr/bin, /etc and whatever we could come up with from the list.
This approach might work for almost all (sufficiently wellformed)
packages using distutil and will redefine bdist_rpm to "put all files in
a an RPM instead of installing them directly, so that they can be
removed by uninstalling the RPM". For example it works for logilab.astng
and logilab.pylint which didn't work before. |
|
Date |
User |
Action |
Args |
2009-03-01 02:22:10 | kiilerix | set | recipients:
+ kiilerix, loewis, twegener, nshmyrev, pitrou, forest, tarek, ebfe, jbaker |
2009-03-01 02:22:10 | kiilerix | set | messageid: <1235874130.32.0.189339231406.issue1533164@psf.upfronthosting.co.za> |
2009-03-01 02:22:08 | kiilerix | link | issue1533164 messages |
2009-03-01 02:22:07 | kiilerix | create | |
|