[Patches] [ python-Patches-755286 ] Generate rpm filelist including directories

SourceForge.net noreply at sourceforge.net
Mon Feb 2 17:00:32 EST 2004


Patches item #755286, was opened at 2003-06-16 14:57
Message generated for change (Comment added) made by loewis
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=755286&group_id=5470

Category: Distutils and setup.py
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: Michal Čihař (nijel)
Assigned to: Martin v. Löwis (loewis)
Summary: Generate rpm filelist including directories

Initial Comment:
Attached patch adds --record-rpm option to distutils,
that allows generating of rpm-like filelist, that
contains also directories. Currently most rpm vendors
are using some external commands to get dir list or
have hard coded it in spec file.

----------------------------------------------------------------------

>Comment By: Martin v. Löwis (loewis)
Date: 2004-02-02 23:00

Message:
Logged In: YES 
user_id=21627

Then I don't understand how your patch works: Does it not
generate %dir lines for the .spec file? And isn't the spec
file generated by the bdist_rpm command?

----------------------------------------------------------------------

Comment By: Michal Čihař (nijel)
Date: 2004-02-02 22:42

Message:
Logged In: YES 
user_id=192186

I still do not see how to put that into bdist_rpm and keep
it usable:

- bdist_rpm creates tarbal and then calls rpm which builds
it and the installation itself is done by install

- when building package for distribution (SUSE) bdist_rpm is
not used at all

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-02-02 22:35

Message:
Logged In: YES 
user_id=21627

I can pose a few principles: put RPM-specific code just into
bdist_rpm, and enhance other commands to provide generic
functionality which might be usable only to RPM at the
moment, but could be useful more generally in the future.

Also, make sure all commands continue to work if no RPMs are
built (e.g. the standard "install" command should continue
to work).

I think you code is quite close algorithmically, it just
needs to be re-arranged  a bit.

----------------------------------------------------------------------

Comment By: Michal Čihař (nijel)
Date: 2004-02-02 22:21

Message:
Logged In: YES 
user_id=192186

It would be probably best, if somebody with more knowledge,
how distutils work, would help with design.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-02-02 22:15

Message:
Logged In: YES 
user_id=21627

We are not much interested in quick hacks. Are you willing
to revise your implementation to make it well-designed? If
not, I'll reject it (and hope that somebody else will submit
a well-designed implementation of that feature in the future).

----------------------------------------------------------------------

Comment By: Michal Čihař (nijel)
Date: 2004-02-02 19:35

Message:
Logged In: YES 
user_id=192186

I agree, that the implementation is not perfect. It's mostly
quick hack, that needed to be written to avoid
postprocessing of generated file lists. I'm open to rewrite
it when somebody gives me better idea for implementation,
but probably I won't have time for this in next month.

Why I called it record-rpm - it does same as record, but
adds directories needed for rpm.

Limiting to bdist_rpm is IMHO not good idea, as in this case
it is not usable for distribution vendors (bdist_rpm is not
suitable for this case, at least as I see situation in SUSE).

I choose overloading get_outputs just to avoid code
duplication in many cases.

----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2004-02-01 20:40

Message:
Logged In: YES 
user_id=21627

I like the feature, but not the implementation:

- The option should not be called "record-rpm", as it does
not record
  RPM files, but directories.

- RPM-specific code should be completely restricted to the
bdist_rpm 
  command. For the case of directories, you should create a
mechanism
  to collect all directories, and then traverse this list to
create the 
  proper %dir directives in the spec file.

- I'm not sure that overloading get_outputs is a good idea.
Instead,
  introducing get_output_dirs might be better.



----------------------------------------------------------------------

Comment By: Michal Čihař (nijel)
Date: 2003-06-24 16:18

Message:
Logged In: YES 
user_id=192186

Version 6 now works as expected for all python packages
using distutils in SuSE distro.

----------------------------------------------------------------------

Comment By: Michal Čihař (nijel)
Date: 2003-06-17 17:53

Message:
Logged In: YES 
user_id=192186

Sorry for posting buch of patches here, but I test it with
more and more modules and I find more and more problems :-)

----------------------------------------------------------------------

Comment By: Michal Čihař (nijel)
Date: 2003-06-17 10:36

Message:
Logged In: YES 
user_id=192186

Version 4 improves handling of mutliple levels of install
directories.

----------------------------------------------------------------------

Comment By: Michal Čihař (nijel)
Date: 2003-06-16 17:37

Message:
Logged In: YES 
user_id=192186

One more update:
- fix generating of dirs in chrooted installs for install_data
- don't include directory for install_scripts


----------------------------------------------------------------------

Comment By: Michal Čihař (nijel)
Date: 2003-06-16 15:49

Message:
Logged In: YES 
user_id=192186

Updated version fixes problems with self defined get_outputs
methods.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=755286&group_id=5470



More information about the Patches mailing list