[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Depends/Recommends?: Linux image packages going to depend on python



On Sat, Nov 28, 2009 at 11:00:21PM +0000, Ben Hutchings wrote:
> On Sat, 2009-11-28 at 16:43 -0600, Manoj Srivastava wrote:
> > On Sat, Nov 28 2009, Neil Williams wrote:
> > 
> > > On Sat, 28 Nov 2009 18:56:01 +0100
> > > Patrick Matthäi <pmatthaei@debian.org> wrote:
> > >
> > >> Am 28.11.2009 18:52, schrieb Bastian Blank:
> > >> > Hi folks
> > >> >
> > >> > The Linux image packages needs to do some modifications to core
> > >> > configuration files like fstab in the future to allow newer kernels to
> > >> > work. To do this and the planned further extension I intend to make all
> > >> > linux image packages depend on python.

Depends: or Recommends:?

... 
> >         Indeed. Editing configuration files that belong to other
> >  packages is a policy violation; and even editing configuration files
> >  blonging to he package itself must preserve all user changes.
> > 
> >         It seems to be that a better approach is to inform the user, and
> >  let the admin make the changes needed.
> 
> The specific requirement here is to prepare for a transition from old
> PATA ("IDE") drivers to libata-based drivers.  libata presents ATA/ATAPI
> drives as SCSI devices, so hard drive partitions will change
> from /dev/hdX to /dev/sdX.
> 
> In preparation for this partition, /etc/fstab and the kernel parameters
> in boot-loader configs should be changed to specify partitions by UUID
> or label name so that they work with both old and new kernel versions.
> There will be a debconf question as to whether this should be done
> automatically, but it is not appropriate to expect all users to make
> this change manually.

Why not keep the main maintainer script to be /bin/sh and use python
within optional compoent.  I mean:

1. Recommends: python-minimal
2. The main maintainer script is written in /bin/sh which checks existance 
   of python-minimal and its sanity.
 2.1 If python-minimal exists and in good shape, pose debconf question
     as described above using maintainable python code.
 2.2 If python-minimal does not exist or not in good shape, skip debconf 
     question assuming "No" and go to debconf information message just 
     via /bin/sh.

This way, the maintainer script works on any system.  Desktop uses will
have easier time and anyone botheres to remove python from system is not
affected.

In my observation, all maintainer scripts of basic packages should
follow this kind of approach when ever it use scripts except /bin/sh or
/bin/bash.  I remember that the maintainer script of kernel used to use
script for initramfs creation written in perl.  An broken perl
transition caused some problem under such situation.  

Osamu

PS: I guess this can be done just with awk/sed but I guess it is more
difficult to read than perl or python.


Reply to: