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

Re: Bug #583585 dpkg-maintscript-helper



Hello,

On Mon, 05 Dec 2011, Gianluca Ciccarelli wrote:
> My name is Gianluca and I'm willing to contribute to the dpkg package
> maintenance and (eventually) development, so I'm following Raphael
> Hertzog's suggestions and looking into bugs that seem a good starting
> point.

Great!

> I found bug #583585, and I guessed it was a good idea to tell everyone
> that I'm trying to implement the feature requested. I'd also like your
> opinion about my interpretation of the feature: it should be an
> additional option in the `case' statement of the script, that takes the
> symlink as argument, and 
> 1) moves the directory (or also a single file?) to the place where the
> synlink lives
> 2) removes the symlink
> 3) creates the symlink again in the previous FS location where the
> directory used to live
> 
> Could you be so kind to tell me if I'm on the right path, or did I miss
> something crucial?

You have to deal with multiple cases:

1/ replacing a directory with a symlink

   v1 has /foo/bar as directory
   v2 has /foo/bar as symlink

2/ replacing a symlink with a directory

   v1 has /foo/bar as symlink
   v2 has /foo/bar as directory

3/ swapping a symlink and a directory

   v1 has /foo/bar1 as symlink & /foo/bar2 as directory
   v2 has /foo/bar1 as directory & /foo/bar2 as symlink

So I guess you will have 3 commands and not a single one. Or a single one
with a supplementary parameter to differentiate between the 3 use cases.

The precise behaviour depends on which of the 3 operations you're
referring to. You seem to be referring to 3/ but I'm not sure.

You should probably consider doing 1/ and 2/ first to discover the
challenges.

Have you read the parts of the debian policy that explain dpkg's behaviour
with symlinks and directories?

Cheers,
-- 
Raphaël Hertzog ◈ Debian Developer

Pre-order a copy of the Debian Administrator's Handbook and help
liberate it: http://debian-handbook.info/liberation/


Reply to: