Re: New pre-depends: python pre-depends python-minimal
On Monday, November 24, 2014 03:15:51 Wouter Verhelst wrote: OK. I'm back on this again. On Sun, Nov 23, 2014 at 03:29:29PM -0500, Scott Kitterman wrote: On Sunday, November 23, 2014 13:41:47 Wouter Verhelst wrote: As I understand the situation, that won't solve your problem. If python pre-depends on python-minimal (and the rest of the dependencies stay in place), then you have the following situation: - python2.7-minimal and python-minimal are unpacked (in undefined order) - python2.7-minimal is configured - python-minimal is configured - python can now be unpacked As such, rather than fixing your problem, it would make matters worse; today it sometimes fails, depending on the exact decisions that apt and dpkg take when installing packages. With a pre-depends, it would *always* fail on new installs, because python would then not be *allowed* to be unpacked if python2.7-minimal isn't on the system, whose postinst would fail, which would forbid the installation of python (the step necessary to configure python2.7-minimal). It looks to me like the only solution here is to split off whatever it is that python2.7-minimal needs from the python package into a separate package, and have python2.7-minimal depend on that separate package. Call it python-base or python-common or something. Why would python-minimal be configured at unpack time for python? AIUI, the pre-depends would just require python-minimal to be unpacked prior to configure, not unpack. No, that's what a regular depends does. A pre-depends requires a package to be configured before unpack. Policy 7.2: This field is like Depends, except that it also forces dpkg to complete installation of the packages named before even starting the installation of the package which declares the pre-dependency, as follows: When a package declaring a pre-dependency is about to be unpacked the pre-dependency can be satisfied if the depended-on package is either fully configured, or [special case for upgrade rather than install] Did you mean python can now be configured? I think pre-depends would solve the problem at hand, Unless I misunderstand the situation and your proposed solution, it most certainly will not. If what you mean is: python pre-depends python-minimal python-minimal depends python2.7-minimal Then a pre-depends is *not* what you need. If you mean something else, a Pre-Depends is probably still not what you need, because the cases in which a Pre-Depends is useful are actually pretty rare (I suspect that's why policy tells you to ask on this list before using it...). They are limited to two cases: - Your preinst (as opposed to your postinst) wants to use something that is *not* in the set of Essential packages, or - Your package wants to install files in a special directory which only exists in a working state if another package was installed first (e.g., multiarch-support) but I'm also interested in feedback on the alternative proposed in the bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769106#31 As long as an installation of python2.7-minimal without python2.7 will not break if the rtinstall script isn't run, that really looks like an alternate proposal of my python-base/python-common suggestion. What you need is for any scripts or binaries which you run in your postinst to be installed by packages that are either available in the Essential set, or in the set of packages that you depend on, directly or indirectly, through a depends or pre-depends. As long as you follow that rule, you're safe. A _reverse_ dependency (i.e., a package that depends on _your_ package) cannot safely provide a script or binary to be used in your postinst; and it does not matter whether you're using Depends or Pre-Depends in that case, because for postinst there is no difference. Regards, That's not the case here. In the original bug [1], the situation is that during jessie development texlive-music gained a dependency on python, so on upgrade, python gets installed. As part of that installation, the public_modules.rtinstall hook gets run as part of the python2.7-minimal postinstall. For the post-install script to succeed, both python and python-minimal need to be unpacked. They don't need to be installed. Also from policy 7.2: A Depends field takes effect only when a package is to be configured. It does not prevent a package being on the system in an unconfigured state while its dependencies are unsatisfied, ... That's the case we have here. python has been unpacked, but not configured, so it'd dependency on python-minimal is irrelevant. Later in 7.2, it goes on to say: Pre-Depends This field is like Depends, except that it also forces dpkg to complete installation of the packages named before even starting the installation of the package which declares the
Re: New pre-depends: python pre-depends python-minimal
On Sat, Nov 22, 2014 at 05:06:25PM +0100, Jakub Wilk wrote: * Wouter Verhelst wou...@debian.org, 2014-11-22, 08:25: It appears that the appropriate resolution of #769106 [1] is to add a new pre-depends on python-minimal in python. This issue at hand is that at the time python2.7-minimal is configured, python is unpacked, but python-minimal is not. Since python-2.7-minimal doesn't have a direct depends on python-minimal, this is allowable (policy 7.2, Depends). In order for python2.7-minimal to configure, python-minimal needs to be at least unpacked to provide /usr/bin/pycompile. The only way for python to ensure this is the case is to declare a pre-depends relation (also policy 7.2). This is inaccurate. s/inaccurate/confusing as hell/ :-P Right :-) A python2.7-minimal pre-depends on python-minimal ensures that python-minimal is unpackaged _and configured_ before python2.7-minimal is unpacked. There are three packages involved is this mess: python2.7-minimal python-minimal python python depends on python-minimal. python2.7-minimal does NOT depend on python or python-minimal (that'd be a dependency loop). python2.7-minimal tries to run a hook shipped by python, which might not work when python is not configured yet. Hence the proposed Pre-Depends: python - python-minimal. As I understand the situation, that won't solve your problem. If python pre-depends on python-minimal (and the rest of the dependencies stay in place), then you have the following situation: - python2.7-minimal and python-minimal are unpacked (in undefined order) - python2.7-minimal is configured - python-minimal is configured - python can now be unpacked As such, rather than fixing your problem, it would make matters worse; today it sometimes fails, depending on the exact decisions that apt and dpkg take when installing packages. With a pre-depends, it would *always* fail on new installs, because python would then not be *allowed* to be unpacked if python2.7-minimal isn't on the system, whose postinst would fail, which would forbid the installation of python (the step necessary to configure python2.7-minimal). It looks to me like the only solution here is to split off whatever it is that python2.7-minimal needs from the python package into a separate package, and have python2.7-minimal depend on that separate package. Call it python-base or python-common or something. -- It is easy to love a country that is famous for chocolate and beer -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26 signature.asc Description: Digital signature
Re: New pre-depends: python pre-depends python-minimal
On Sunday, November 23, 2014 13:41:47 Wouter Verhelst wrote: On Sat, Nov 22, 2014 at 05:06:25PM +0100, Jakub Wilk wrote: * Wouter Verhelst wou...@debian.org, 2014-11-22, 08:25: It appears that the appropriate resolution of #769106 [1] is to add a new pre-depends on python-minimal in python. This issue at hand is that at the time python2.7-minimal is configured, python is unpacked, but python-minimal is not. Since python-2.7-minimal doesn't have a direct depends on python-minimal, this is allowable (policy 7.2, Depends). In order for python2.7-minimal to configure, python-minimal needs to be at least unpacked to provide /usr/bin/pycompile. The only way for python to ensure this is the case is to declare a pre-depends relation (also policy 7.2). This is inaccurate. s/inaccurate/confusing as hell/ :-P Right :-) A python2.7-minimal pre-depends on python-minimal ensures that python-minimal is unpackaged _and configured_ before python2.7-minimal is unpacked. There are three packages involved is this mess: python2.7-minimal python-minimal python python depends on python-minimal. python2.7-minimal does NOT depend on python or python-minimal (that'd be a dependency loop). python2.7-minimal tries to run a hook shipped by python, which might not work when python is not configured yet. Hence the proposed Pre-Depends: python - python-minimal. As I understand the situation, that won't solve your problem. If python pre-depends on python-minimal (and the rest of the dependencies stay in place), then you have the following situation: - python2.7-minimal and python-minimal are unpacked (in undefined order) - python2.7-minimal is configured - python-minimal is configured - python can now be unpacked As such, rather than fixing your problem, it would make matters worse; today it sometimes fails, depending on the exact decisions that apt and dpkg take when installing packages. With a pre-depends, it would *always* fail on new installs, because python would then not be *allowed* to be unpacked if python2.7-minimal isn't on the system, whose postinst would fail, which would forbid the installation of python (the step necessary to configure python2.7-minimal). It looks to me like the only solution here is to split off whatever it is that python2.7-minimal needs from the python package into a separate package, and have python2.7-minimal depend on that separate package. Call it python-base or python-common or something. Why would python-minimal be configured at unpack time for python? AIUI, the pre-depends would just require python-minimal to be unpacked prior to configure, not unpack. Did you mean python can now be configured? I think pre-depends would solve the problem at hand, but I'm also interested in feedback on the alternative proposed in the bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769106#31 Scott K signature.asc Description: This is a digitally signed message part.
Re: New pre-depends: python pre-depends python-minimal
On Sun, Nov 23, 2014 at 03:29:29PM -0500, Scott Kitterman wrote: On Sunday, November 23, 2014 13:41:47 Wouter Verhelst wrote: As I understand the situation, that won't solve your problem. If python pre-depends on python-minimal (and the rest of the dependencies stay in place), then you have the following situation: - python2.7-minimal and python-minimal are unpacked (in undefined order) - python2.7-minimal is configured - python-minimal is configured - python can now be unpacked As such, rather than fixing your problem, it would make matters worse; today it sometimes fails, depending on the exact decisions that apt and dpkg take when installing packages. With a pre-depends, it would *always* fail on new installs, because python would then not be *allowed* to be unpacked if python2.7-minimal isn't on the system, whose postinst would fail, which would forbid the installation of python (the step necessary to configure python2.7-minimal). It looks to me like the only solution here is to split off whatever it is that python2.7-minimal needs from the python package into a separate package, and have python2.7-minimal depend on that separate package. Call it python-base or python-common or something. Why would python-minimal be configured at unpack time for python? AIUI, the pre-depends would just require python-minimal to be unpacked prior to configure, not unpack. No, that's what a regular depends does. A pre-depends requires a package to be configured before unpack. Policy 7.2: This field is like Depends, except that it also forces dpkg to complete installation of the packages named before even starting the installation of the package which declares the pre-dependency, as follows: When a package declaring a pre-dependency is about to be unpacked the pre-dependency can be satisfied if the depended-on package is either fully configured, or [special case for upgrade rather than install] Did you mean python can now be configured? I think pre-depends would solve the problem at hand, Unless I misunderstand the situation and your proposed solution, it most certainly will not. If what you mean is: python pre-depends python-minimal python-minimal depends python2.7-minimal Then a pre-depends is *not* what you need. If you mean something else, a Pre-Depends is probably still not what you need, because the cases in which a Pre-Depends is useful are actually pretty rare (I suspect that's why policy tells you to ask on this list before using it...). They are limited to two cases: - Your preinst (as opposed to your postinst) wants to use something that is *not* in the set of Essential packages, or - Your package wants to install files in a special directory which only exists in a working state if another package was installed first (e.g., multiarch-support) but I'm also interested in feedback on the alternative proposed in the bug: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769106#31 As long as an installation of python2.7-minimal without python2.7 will not break if the rtinstall script isn't run, that really looks like an alternate proposal of my python-base/python-common suggestion. What you need is for any scripts or binaries which you run in your postinst to be installed by packages that are either available in the Essential set, or in the set of packages that you depend on, directly or indirectly, through a depends or pre-depends. As long as you follow that rule, you're safe. A _reverse_ dependency (i.e., a package that depends on _your_ package) cannot safely provide a script or binary to be used in your postinst; and it does not matter whether you're using Depends or Pre-Depends in that case, because for postinst there is no difference. Regards, -- It is easy to love a country that is famous for chocolate and beer -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26 -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141124021551.ga26...@grep.be
Re: New pre-depends: python pre-depends python-minimal
* Wouter Verhelst wou...@debian.org, 2014-11-22, 08:25: It appears that the appropriate resolution of #769106 [1] is to add a new pre-depends on python-minimal in python. This issue at hand is that at the time python2.7-minimal is configured, python is unpacked, but python-minimal is not. Since python-2.7-minimal doesn't have a direct depends on python-minimal, this is allowable (policy 7.2, Depends). In order for python2.7-minimal to configure, python-minimal needs to be at least unpacked to provide /usr/bin/pycompile. The only way for python to ensure this is the case is to declare a pre-depends relation (also policy 7.2). This is inaccurate. s/inaccurate/confusing as hell/ :-P A python2.7-minimal pre-depends on python-minimal ensures that python-minimal is unpackaged _and configured_ before python2.7-minimal is unpacked. There are three packages involved is this mess: python2.7-minimal python-minimal python python depends on python-minimal. python2.7-minimal does NOT depend on python or python-minimal (that'd be a dependency loop). python2.7-minimal tries to run a hook shipped by python, which might not work when python is not configured yet. Hence the proposed Pre-Depends: python - python-minimal. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141122160625.ga5...@jwilk.net
Re: New pre-depends: python pre-depends python-minimal
On Saturday, November 22, 2014 05:06:25 PM Jakub Wilk wrote: * Wouter Verhelst wou...@debian.org, 2014-11-22, 08:25: It appears that the appropriate resolution of #769106 [1] is to add a new pre-depends on python-minimal in python. This issue at hand is that at the time python2.7-minimal is configured, python is unpacked, but python-minimal is not. Since python-2.7-minimal doesn't have a direct depends on python-minimal, this is allowable (policy 7.2, Depends). In order for python2.7-minimal to configure, python-minimal needs to be at least unpacked to provide /usr/bin/pycompile. The only way for python to ensure this is the case is to declare a pre-depends relation (also policy 7.2). This is inaccurate. s/inaccurate/confusing as hell/ :-P A python2.7-minimal pre-depends on python-minimal ensures that python-minimal is unpackaged _and configured_ before python2.7-minimal is unpacked. There are three packages involved is this mess: python2.7-minimal python-minimal python python depends on python-minimal. python2.7-minimal does NOT depend on python or python-minimal (that'd be a dependency loop). python2.7-minimal tries to run a hook shipped by python, which might not work when python is not configured yet. Hence the proposed Pre-Depends: python - python-minimal. Thanks for making it clearer. Here's a possible alternate solution: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769106#31 Feedback? Scott K -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/3938090.NBIyXZJU4x@kitterman-optiplex-9020m
Re: New pre-depends: python pre-depends python-minimal
On Mon, Nov 17, 2014 at 06:24:00PM -0500, Scott Kitterman wrote: It appears that the appropriate resolution of #769106 [1] is to add a new pre-depends on python-minimal in python. This issue at hand is that at the time python2.7-minimal is configured, python is unpacked, but python-minimal is not. Since python-2.7-minimal doesn't have a direct depends on python-minimal, this is allowable (policy 7.2, Depends). In order for python2.7-minimal to configure, python-minimal needs to be at least unpacked to provide /usr/bin/pycompile. The only way for python to ensure this is the case is to declare a pre-depends relation (also policy 7.2). This is inaccurate. A python2.7-minimal pre-depends on python-minimal ensures that python-minimal is unpackaged _and configured_ before python2.7-minimal is unpacked. If you don't need python-minimal to be configured before python2.7-minimal is unpacked, a regular dependency is what you want. A regular dependency will also ensure that python-minimal is configured before python2.7-minimal is configured. So I don't see the need for a pre-depends? -- It is easy to love a country that is famous for chocolate and beer -- Barack Obama, speaking in Brussels, Belgium, 2014-03-26 -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141122072513.ga8...@grep.be
Re: New pre-depends: python pre-depends python-minimal
On Tue, Nov 18, 2014 at 02:46:24 -0500, Scott Kitterman wrote: As part of python2.7-minimal's configuration, /usr/share/python/runtime.d/public_modules.rtinstall gets executed. It's part of the python package. Since the dependency chain was texlive-music - python - python2.7-minimal, python is already unpacked, so the script is available. The tricky part is that /usr/share/python/runtime.d/public_modules.rtinstall needs /usr/bin/pycompile in order to work. That's in (you guessed it) python- minimal. It's not available (and there's nothing in policy that says it has to be). That sounds broken. Why does python2.7-minimal run stuff from the python package? Cheers, Julien signature.asc Description: Digital signature
Re: New pre-depends: python pre-depends python-minimal
* Julien Cristau jcris...@debian.org, 2014-11-18, 23:50: As part of python2.7-minimal's configuration, /usr/share/python/runtime.d/public_modules.rtinstall gets executed. It's part of the python package. Since the dependency chain was texlive-music - python - python2.7-minimal, python is already unpacked, so the script is available. The tricky part is that /usr/share/python/runtime.d/public_modules.rtinstall needs /usr/bin/pycompile in order to work. That's in (you guessed it) python-minimal. It's not available (and there's nothing in policy that says it has to be). Wouldn't it make more sense to have the *.rtinstall hook in the same package as pycompile? That sounds broken. It is. Why does python2.7-minimal run stuff python2.X-minimal runs /usr/share/python/runtime.d/*.rtinstall hooks to let Python helpers bytecompile Python files for the newly installed Python version. This kinda made sense in the olden days, when we had multiple supported Python versions. But now that we support only 2.7, it doesn't seem terribly useful. from the python package? Because that's where (parts of) the Python helper lives. -- Jakub Wilk -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/20141118233002.ga1...@jwilk.net
Re: New pre-depends: python pre-depends python-minimal
On November 18, 2014 6:30:02 PM EST, Jakub Wilk jw...@debian.org wrote: * Julien Cristau jcris...@debian.org, 2014-11-18, 23:50: As part of python2.7-minimal's configuration, /usr/share/python/runtime.d/public_modules.rtinstall gets executed. It's part of the python package. Since the dependency chain was texlive-music - python - python2.7-minimal, python is already unpacked, so the script is available. The tricky part is that /usr/share/python/runtime.d/public_modules.rtinstall needs /usr/bin/pycompile in order to work. That's in (you guessed it) python-minimal. It's not available (and there's nothing in policy that says it has to be). Wouldn't it make more sense to have the *.rtinstall hook in the same package as pycompile? That sounds broken. It is. Why does python2.7-minimal run stuff python2.X-minimal runs /usr/share/python/runtime.d/*.rtinstall hooks to let Python helpers bytecompile Python files for the newly installed Python version. This kinda made sense in the olden days, when we had multiple supported Python versions. But now that we support only 2.7, it doesn't seem terribly useful. from the python package? Because that's where (parts of) the Python helper lives. I agree it's not ideal. If we weren't in freeze, pre-depends isn't how I'd suggest fixing it. Adding the pre-depends fixes the issue without any risk due to shuffling stuff around at the last minute. I'm glad to fix it smarter for Stretch, but I'm very hesitant to change the packages' structure at this point in the release cycle. Scott K -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/f3b47df3-13cd-496a-b9a3-1cfca7520...@kitterman.com
New pre-depends: python pre-depends python-minimal
It appears that the appropriate resolution of #769106 [1] is to add a new pre-depends on python-minimal in python. This issue at hand is that at the time python2.7-minimal is configured, python is unpacked, but python-minimal is not. Since python-2.7-minimal doesn't have a direct depends on python-minimal, this is allowable (policy 7.2, Depends). In order for python2.7-minimal to configure, python-minimal needs to be at least unpacked to provide /usr/bin/pycompile. The only way for python to ensure this is the case is to declare a pre-depends relation (also policy 7.2). Since nothing outside python-defaults should depend on python-minimal this should have a minimal impact on upgrade ordering or dependency resolution complexity. One might argue that the python/python-minimal split is obsolete and ought to be dropped, but I think that's a discussion to have (if at all) for Stretch. Adding the pre-depends is the least invasive solution to this RC bug. Comments/concurrence/etc? Scott K [1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=769106 -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/2336109.MRqKsDn39K@kitterman-optiplex-9020m
Re: New pre-depends: python pre-depends python-minimal
On Mon, Nov 17, 2014 at 18:24:00 -0500, Scott Kitterman wrote: It appears that the appropriate resolution of #769106 [1] is to add a new pre-depends on python-minimal in python. This issue at hand is that at the time python2.7-minimal is configured, python is unpacked, but python-minimal is not. Since python-2.7-minimal doesn't have a direct depends on python-minimal, this is allowable (policy 7.2, Depends). In order for python2.7-minimal to configure, python-minimal needs to be at least unpacked to provide /usr/bin/pycompile. The only way for python to ensure this is the case is to declare a pre-depends relation (also policy 7.2). Can you explain why/how the python package enters into the picture here at all? Cheers, Julien signature.asc Description: Digital signature
Re: New pre-depends: python pre-depends python-minimal
On Tuesday, November 18, 2014 08:28:29 AM Julien Cristau wrote: On Mon, Nov 17, 2014 at 18:24:00 -0500, Scott Kitterman wrote: It appears that the appropriate resolution of #769106 [1] is to add a new pre-depends on python-minimal in python. This issue at hand is that at the time python2.7-minimal is configured, python is unpacked, but python-minimal is not. Since python-2.7-minimal doesn't have a direct depends on python-minimal, this is allowable (policy 7.2, Depends). In order for python2.7-minimal to configure, python-minimal needs to be at least unpacked to provide /usr/bin/pycompile. The only way for python to ensure this is the case is to declare a pre-depends relation (also policy 7.2). Can you explain why/how the python package enters into the picture here at all? texlive-music grew a depends on python between wheezy and jessie, so in the upgrade test that led to the the bug it was being freshly installed (test being done in a minimal chroot. python depends (among other things) python2.7 and python-minimal. python- minimal then depends on python2.7-minimal. As part of python2.7-minimal's configuration, /usr/share/python/runtime.d/public_modules.rtinstall gets executed. It's part of the python package. Since the dependency chain was texlive-music - python - python2.7-minimal, python is already unpacked, so the script is available. The tricky part is that /usr/share/python/runtime.d/public_modules.rtinstall needs /usr/bin/pycompile in order to work. That's in (you guessed it) python- minimal. It's not available (and there's nothing in policy that says it has to be). Eventually, python-minimal will get unpacked, but it hadn't yet in this test run. Does that clarify it? Scott K signature.asc Description: This is a digitally signed message part.