Hi, in dir_util.py we have a cache which directories are created: PATH_CREATED. This is filled by mkpath. But it is not emptied by remove_tree because we use shutil.rmtree for this. Reproduce: run "python setup.py sdist bdist_rpm" sdist creates a distribution dir, then deletes it. bdist_rpm runs sdist again and the distribution dir is not created a second time because its in the cache PATH_CREATED. Solution 1: find all directories to be removed and remove them out of PATH_CREATED. However if rmtree gives an error we removed probably too much. Solution 2: get rid of the PATH_CREATED cache. Not a good solution. Solution 3: write your own rmtree function. I would prefer this solution. Bastian
On 08 June 2000, Bastian Kleineidam said:
in dir_util.py we have a cache which directories are created: PATH_CREATED. This is filled by mkpath. But it is not emptied by remove_tree because we use shutil.rmtree for this.
Oops! Good catch.
Solution 3: write your own rmtree function. I would prefer this solution.
Agreed. Feel free to submit a patch -- but I'm gone for the next 6 days, so won't be able to check it in. (Unless one of the other folks with Python checkin privileges would care to usurp while I'm away... ;-) This is a somewhat more obscure bug than the "undefined changelog" one, though, so I don't think it's the end of the world if this goes unfixed for a week. BTW, two useful additions to "bdist_rpm" would be: --sdist=<archive_file> use this source distribution instead of creating our own (maybe "--source" would be better??? "--use-sdist"? "--use-source"?) --spec-file=<spec_file> use this spec file instead of creating our own ("--use-spec" maybe?) Any takers? BTW, the SourceForge patch and bug trackers for Python have been enabled, and since the Distutils are part of Python, this should work for the Distutil too. Feel free to submit patches via SF rather than the list -- if enough people do it, then I'll probably get in the habit of checking it. This would be especially useful while I'm away, so patches don't pile up in my inbox (or the list archive). Greg -- Greg Ward - Linux geek gward@python.net http://starship.python.net/~gward/ I had pancake makeup for brunch!
On 08 June 2000, Bastian Kleineidam said:
Agreed. Feel free to submit a patch -- but I'm gone for the next 6 days, so won't be able to check it in. (Unless one of the other folks with Python checkin privileges would care to usurp while I'm away... ;-) I submitted a patch to sourceforge patch manager.
Thanks, got it -- checked it in, tweaked it a bit, and now I'm happy. Greg -- Greg Ward - maladjusted nerd gward@python.net http://starship.python.net/~gward/ Whatever became of eternal truth?
participants (2)
-
Bastian Kleineidam
-
Greg Ward