[Mageia-dev] Minimal patching vs. fixing the whole Universe
I'm known to be grumpy and difficult, but I also believe in simplicity as a policy, therefore I'd like to ask you something. By no means I want to question Ahmad's judgment, however I strongly disagree with him on one point. As a _principle_. Otherwise, it's a tiny punctual question, but I'd like to know Mageia's patching _policy_. See comments 50 and downwards: https://bugs.mageia.org/show_bug.cgi?id=1659#c50 calibre-python2-env-fix.patch replaces '/usr/bin/env python2' with '/usr/bin/env python' The calibre developer has used '/usr/bin/env python' for ages, but relatively recently he has decided to switch to '/usr/bin/env python2' for fear that some distros would use Python 3 by default. Ahmad insists that '/usr/bin/python' should be used in Mageia. As long as '/usr/bin/env python' _works_, I see no point in trying to rewrite other people's work. I would say that the general principle should be to apply a _minimal_ patching, not to try to rewrite the work of the developers of hundreds of packages! A distro's job is not to judge the work of the _upstream_ developers as long as this is not a real bug. Should Mageia try to fix something that is not actually broken? There might be hundreds of packages with thousands and thousands of questionable decisions taken by the upstream developers -- however, why fixing something that works? You see, I hate conflicts (although I seem to be a maestro in generating them), but I also need simplicity and clear policies. Also, policies that can be applied. Perfect policies that would require the revision of hundreds of packages that actually work are not my cup of tea. Of course, I am _not_ a Mageia packager and this is not my package, but I'd like to know Mageia's policy wrt building packages. Normally, patches are not meant to optimize but to fix breakages. If the packagers are compelled to improve upstream's work, this can prove to be catastrophic in complex cases. Thank you, R-C aka beranger
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
2011/6/22 Radu-Cristian FOTESCU beranger...@yahoo.ca: I'm known to be grumpy and difficult, but I also believe in simplicity as a policy, therefore I'd like to ask you something. By no means I want to question Ahmad's judgment, however I strongly disagree with him on one point. As a _principle_. Otherwise, it's a tiny punctual question, but I'd like to know Mageia's patching _policy_. See comments 50 and downwards: https://bugs.mageia.org/show_bug.cgi?id=1659#c50 calibre-python2-env-fix.patch replaces '/usr/bin/env python2' with '/usr/bin/env python' The calibre developer has used '/usr/bin/env python' for ages, but relatively recently he has decided to switch to '/usr/bin/env python2' for fear that some distros would use Python 3 by default. Ahmad insists that '/usr/bin/python' should be used in Mageia. As long as '/usr/bin/env python' _works_, I see no point in trying to rewrite other people's work. I would say that the general principle should be to apply a _minimal_ patching, not to try to rewrite the work of the developers of hundreds of packages! A distro's job is not to judge the work of the _upstream_ developers as long as this is not a real bug. Should Mageia try to fix something that is not actually broken? There might be hundreds of packages with thousands and thousands of questionable decisions taken by the upstream developers -- however, why fixing something that works? You see, I hate conflicts (although I seem to be a maestro in generating them), but I also need simplicity and clear policies. Also, policies that can be applied. Perfect policies that would require the revision of hundreds of packages that actually work are not my cup of tea. Of course, I am _not_ a Mageia packager and this is not my package, but I'd like to know Mageia's policy wrt building packages. Normally, patches are not meant to optimize but to fix breakages. If the packagers are compelled to improve upstream's work, this can prove to be catastrophic in complex cases. We don't have any python2 symlink or binary on mageia.
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
We don't have any python2 symlink or binary on mageia. That was not the question. The question was whether '/usr/bin/env python2' should be patched into '/usr/bin/env python' or into '/usr/bin/python'. The more general question was whether all the upstream packages should be optimized. When the upstream contained '/usr/bin/env python', nobody thought to fix it into '/usr/bin/python'. R-C aka beranger
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
On 22 June 2011 22:47, Radu-Cristian FOTESCU beranger...@yahoo.ca wrote: I'm known to be grumpy and difficult, but I also believe in simplicity as a policy, therefore I'd like to ask you something. By no means I want to question Ahmad's judgment, however I strongly disagree with him on one point. As a _principle_. Otherwise, it's a tiny punctual question, but I'd like to know Mageia's patching _policy_. See comments 50 and downwards: https://bugs.mageia.org/show_bug.cgi?id=1659#c50 calibre-python2-env-fix.patch replaces '/usr/bin/env python2' with '/usr/bin/env python' The calibre developer has used '/usr/bin/env python' for ages, but relatively recently he has decided to switch to '/usr/bin/env python2' for fear that some distros would use Python 3 by default. Ahmad insists that '/usr/bin/python' should be used in Mageia. Actually, I said that the shebang should be removed altogether. Which is what was being done all those years calibre existed in the Mandriva repos (the same for Fedora, since they do remove the shebang, as the calibre spec was originally imported from Fedora, which I said in the report too). As long as '/usr/bin/env python' _works_, I see no point in trying to rewrite other people's work. I would say that the general principle should be to apply a _minimal_ patching, not to try to rewrite the work of the developers of hundreds of packages! A distro's job is not to judge the work of the _upstream_ developers as long as this is not a real bug. Should Mageia try to fix something that is not actually broken? There might be hundreds of packages with thousands and thousands of questionable decisions taken by the upstream developers -- however, why fixing something that works? You see, I hate conflicts (although I seem to be a maestro in generating them), but I also need simplicity and clear policies. Also, policies that can be applied. Perfect policies that would require the revision of hundreds of packages that actually work are not my cup of tea. Of course, I am _not_ a Mageia packager and this is not my package, but I'd like to know Mageia's policy wrt building packages. Normally, patches are not meant to optimize but to fix breakages. If the packagers are compelled to improve upstream's work, this can prove to be catastrophic in complex cases. Thank you, R-C aka beranger -- Ahmad Samir
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
On 22 June 2011 23:14, Ahmad Samir ahmadsamir3...@gmail.com wrote: On 22 June 2011 22:47, Radu-Cristian FOTESCU beranger...@yahoo.ca wrote: I'm known to be grumpy and difficult, but I also believe in simplicity as a policy, therefore I'd like to ask you something. By no means I want to question Ahmad's judgment, however I strongly disagree with him on one point. As a _principle_. Otherwise, it's a tiny punctual question, but I'd like to know Mageia's patching _policy_. See comments 50 and downwards: https://bugs.mageia.org/show_bug.cgi?id=1659#c50 calibre-python2-env-fix.patch replaces '/usr/bin/env python2' with '/usr/bin/env python' The calibre developer has used '/usr/bin/env python' for ages, but relatively recently he has decided to switch to '/usr/bin/env python2' for fear that some distros would use Python 3 by default. Ahmad insists that '/usr/bin/python' should be used in Mageia. Actually, I said that the shebang should be removed altogether. Which is what was being done all those years calibre existed in the Mandriva repos (the same for Fedora, since they do remove the shebang, as the calibre spec was originally imported from Fedora, which I said in the report too). Of course, or just /usr/bin/python. The /usr/bin/env way may be useful for upstream when creating binary tarballs; but not for us we build the package, and we know which version of python exists in the release we're pushing it to. Also, /usr/bin/python2 doesn't exist to begin with, as mikala pointed out. As long as '/usr/bin/env python' _works_, I see no point in trying to rewrite other people's work. I would say that the general principle should be to apply a _minimal_ patching, not to try to rewrite the work of the developers of hundreds of packages! A distro's job is not to judge the work of the _upstream_ developers as long as this is not a real bug. Should Mageia try to fix something that is not actually broken? There might be hundreds of packages with thousands and thousands of questionable decisions taken by the upstream developers -- however, why fixing something that works? You see, I hate conflicts (although I seem to be a maestro in generating them), but I also need simplicity and clear policies. Also, policies that can be applied. Perfect policies that would require the revision of hundreds of packages that actually work are not my cup of tea. Of course, I am _not_ a Mageia packager and this is not my package, but I'd like to know Mageia's policy wrt building packages. Normally, patches are not meant to optimize but to fix breakages. If the packagers are compelled to improve upstream's work, this can prove to be catastrophic in complex cases. Thank you, R-C aka beranger -- Ahmad Samir -- Ahmad Samir
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
Actually, I said that the shebang should be removed altogether. Which is what was being done all those years calibre existed in the Mandriva repos (the same for Fedora, since they do remove the shebang, as the calibre spec was originally imported from Fedora, which I said in the report too). Yes, I noticed in the spec a set of sed lines supposed to remove all the shebangs. However, somehow, setup.py adds them back at some point, even replacing python with python2. As long as, in the end, replacing python2 with python makes the application work, why should _anyone_ care? Calibre's developer had his idiosyncrasies, why should the downstream take over his app? R-C aka beranger
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
Op woensdag 22 juni 2011 22:47:40 schreef Radu-Cristian FOTESCU: I would say that the general principle should be to apply a _minimal_ patching, not to try to rewrite the work of the developers of hundreds of packages! A distro's job is not to judge the work of the _upstream_ developers as long as this is not a real bug. Should Mageia try to fix something that is not actually broken? There might be hundreds of packages with thousands and thousands of questionable decisions taken by the upstream developers -- however, why fixing something that works? You see, I hate conflicts (although I seem to be a maestro in generating them), but I also need simplicity and clear policies. Also, policies that can be applied. Perfect policies that would require the revision of hundreds of packages that actually work are not my cup of tea. Of course, I am _not_ a Mageia packager and this is not my package, but I'd like to know Mageia's policy wrt building packages. Normally, patches are not meant to optimize but to fix breakages. If the packagers are compelled to improve upstream's work, this can prove to be catastrophic in complex cases. Thank you, R-C aka beranger imho, it's something like: as long as you're patching it anyway, make it python and possibly add a conflicts with python = 3.0 or something. besides, by the time we'll actually have python3, it's likely that the upstream will already have been ported to python3... or the buildsystem would fail anyway...
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
Also, /usr/bin/python2 doesn't exist to begin with, as mikala pointed out. As I repointed, the question was not that one. As long as calibre has used env with python, not python2, it worked. Now that the developer changed that, the least intrusive way would be to just remove the 2. I personally don't like a lot of decisions taken by Kovid Goyal, either wrt functionality, or to things hard-coded rather messy, but it is _his_ application. Either way, I would rather like to retire myself from this discussion. Sorry to have started it. Packagers are free to do whatever they feel like. Cheers, R-C aka beranger
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
On Wed, 22 Jun 2011, Radu-Cristian FOTESCU wrote: A distro's job is not to judge the work of the _upstream_ developers as long as this is not a real bug. But it's to integrate software, and apply common policy to all of them.
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
A distro's job is not to judge the work of the _upstream_ developers as long as this is not a real bug. But it's to integrate software, and apply common policy to all of them. ok, say a distro has 200 packages that use python, for a total of 20,000 *.py files. now what, the limited resources of a distro should be used to patch optimally the first line of all those 20,000 *.py files, just because this would mean to use a common policy? _regardless_ of the fact that those files actually run? this is so crazy in practice that... I don't know what to say. I'm refraining myself from saying things I'd regret. R-C aka beranger
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
'Twas brillig, and David W. Hodgins at 22/06/11 22:51 did gyre and gimble: On Wed, 22 Jun 2011 16:47:40 -0400, Radu-Cristian FOTESCU beranger...@yahoo.ca wrote: As long as '/usr/bin/env python' _works_, I see no point in trying to rewrite other people's work. Excluding the calibre scripts, in /usr/bin of a Mageia 1 kde clean installation ... # grep -I python *|grep '#!'|grep env ebook-convert:#!/usr/bin/env python ebook-device:#!/usr/bin/env python ebook-meta:#!/usr/bin/env python ebook-viewer:#!/usr/bin/env python epub-fix:#!/usr/bin/env python fetch-ebook-metadata:#!/usr/bin/env python gsettings-schema-convert:#!/usr/bin/env python jack_control:#!/usr/bin/env python lrf2lrs:#!/usr/bin/env python lrfviewer:#!/usr/bin/env python lrs2lrf:#!/usr/bin/env python markdown-calibre:#!/usr/bin/env python pdfmanipulate:#!/usr/bin/env python pykdeuic4:#!/usr/bin/env python pykdeuic4:header = #!/usr/bin/env python web2disk:#!/usr/bin/env python In general, I agree with you. If it isn't broken, don't fix it. However, in this case, the python2 had to be changed to python. The environment is not being modified, so it is adding an unneeded process, which should be discouraged. Since you have to change the line anyway, I have to agree with Ahmad, that it should be changed to #!/usr/bin/python. I think it's relatively unimportant overall, but: 1) /usr/bin/python should be marginally faster 2) /usr/bin/python prevents you testing easily with a new python version (or just a new build) in a custom prefix). So 1) is a (very slight) pro for everyone, but 2) is a pretty big con for developers playing with python builds of course in that case a simple sudo mv /usr/bin/python /usr/bin/python.orig; ln -s /path/to/my/custom/build/of/python /usr/bin/python should allow said developer to test fine. Col -- Colin Guthrie mageia(at)colin.guthr.ie http://colin.guthr.ie/ Day Job: Tribalogic Limited [http://www.tribalogic.net/] Open Source: Mageia Contributor [http://www.mageia.org/] PulseAudio Hacker [http://www.pulseaudio.org/] Trac Hacker [http://trac.edgewall.org/]
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
Op woensdag 22 juni 2011 23:51:02 schreef David W. Hodgins: On Wed, 22 Jun 2011 16:47:40 -0400, Radu-Cristian FOTESCU beranger...@yahoo.ca wrote: As long as '/usr/bin/env python' _works_, I see no point in trying to rewrite other people's work. Excluding the calibre scripts, in /usr/bin of a Mageia 1 kde clean installation ... # grep -I python *|grep '#!'|grep env ebook-convert:#!/usr/bin/env python ebook-device:#!/usr/bin/env python ebook-meta:#!/usr/bin/env python ebook-viewer:#!/usr/bin/env python epub-fix:#!/usr/bin/env python fetch-ebook-metadata:#!/usr/bin/env python gsettings-schema-convert:#!/usr/bin/env python jack_control:#!/usr/bin/env python lrf2lrs:#!/usr/bin/env python lrfviewer:#!/usr/bin/env python lrs2lrf:#!/usr/bin/env python markdown-calibre:#!/usr/bin/env python pdfmanipulate:#!/usr/bin/env python pykdeuic4:#!/usr/bin/env python pykdeuic4:header = #!/usr/bin/env python web2disk:#!/usr/bin/env python In general, I agree with you. If it isn't broken, don't fix it. However, in this case, the python2 had to be changed to python. The environment is not being modified, so it is adding an unneeded process, which should be discouraged. Since you have to change the line anyway, I have to agree with Ahmad, that it should be changed to #!/usr/bin/python. Regards, Dave Hodgins that is exactly my sentiment, and i think this describes a good policy
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
On Wed, 22 Jun 2011 18:08:35 -0400, Colin Guthrie mag...@colin.guthr.ie wrote: 2) /usr/bin/python prevents you testing easily with a new python version (or just a new build) in a custom prefix). Running something like /usr/bin/python2.7 /usr/bin/calibre ignores the shebang, so it's still easy to test with a different python version. Regards, Dave Hodgins
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
Le mercredi 22 juin 2011 à 23:08 +0100, Colin Guthrie a écrit : 'Twas brillig, and David W. Hodgins at 22/06/11 22:51 did gyre and gimble: On Wed, 22 Jun 2011 16:47:40 -0400, Radu-Cristian FOTESCU beranger...@yahoo.ca wrote: As long as '/usr/bin/env python' _works_, I see no point in trying to rewrite other people's work. Excluding the calibre scripts, in /usr/bin of a Mageia 1 kde clean installation ... # grep -I python *|grep '#!'|grep env ebook-convert:#!/usr/bin/env python ebook-device:#!/usr/bin/env python ebook-meta:#!/usr/bin/env python ebook-viewer:#!/usr/bin/env python epub-fix:#!/usr/bin/env python fetch-ebook-metadata:#!/usr/bin/env python gsettings-schema-convert:#!/usr/bin/env python jack_control:#!/usr/bin/env python lrf2lrs:#!/usr/bin/env python lrfviewer:#!/usr/bin/env python lrs2lrf:#!/usr/bin/env python markdown-calibre:#!/usr/bin/env python pdfmanipulate:#!/usr/bin/env python pykdeuic4:#!/usr/bin/env python pykdeuic4:header = #!/usr/bin/env python web2disk:#!/usr/bin/env python In general, I agree with you. If it isn't broken, don't fix it. However, in this case, the python2 had to be changed to python. The environment is not being modified, so it is adding an unneeded process, which should be discouraged. Since you have to change the line anyway, I have to agree with Ahmad, that it should be changed to #!/usr/bin/python. I think it's relatively unimportant overall, but: 1) /usr/bin/python should be marginally faster 2) /usr/bin/python prevents you testing easily with a new python version (or just a new build) in a custom prefix). So 1) is a (very slight) pro for everyone, but 2) is a pretty big con for developers playing with python builds of course in that case a simple sudo mv /usr/bin/python /usr/bin/python.orig; ln -s /path/to/my/custom/build/of/python /usr/bin/python should allow said developer to test fine. If python point to a different version ( like some self compiled python 2.6, or python 3 ), I fear that using env will silently break lots of applications, since the library and modules would likely not be there. -- Michael Scherer
Re: [Mageia-dev] Minimal patching vs. fixing the whole Universe
Le mercredi 22 juin 2011 à 14:39 -0700, Radu-Cristian FOTESCU a écrit : A distro's job is not to judge the work of the _upstream_ developers as long as this is not a real bug. But it's to integrate software, and apply common policy to all of them. ok, say a distro has 200 packages that use python, for a total of 20,000 *.py files. now what, the limited resources of a distro should be used to patch optimally the first line of all those 20,000 *.py files, just because this would mean to use a common policy? _regardless_ of the fact that those files actually run? Technically, we can use scripts, like we do for stripping the 50 000 binaries that can be found in */bin/ Or like we do to have the same compression on the 85000 man pages, instead of patching every Makefile in order to use xz instead of nothing, gz, bz2. And we even manage to have the same C flags for compilation. So stripping env should be a big issue, if found desirable. After all, we already detect python to add a dependency on the interpreter in rpm, so the logic is already present. -- Michael Scherer