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

Re: Vanishing /usr/doc symlink



>>"Santiago" == Santiago Vila <sanvila@unex.es> writes:

 Santiago> Manoj Srivastava wrote:
 Santiago> A fresh woody install should *not* need symlinks in /usr/doc.
 >> 
 >> And how is a package supposed to know that this is a fresh
 >> woody install? This is way too late to go about creating policy for
 >> postinsts now.

 Santiago> This is not about creating new policy. In current policy
 Santiago> the postinst checks for /usr/doc before making the
 Santiago> symlink. If /usr/doc does not exist, no symlink is created.

	Rubbish. Policy dictates not such thing. Policy mentions ``one
 reasonable way to do this'' which does do so, but no one is under any
 constraint to use that example. None of my packages actually use the
 version in policy, though I wrote the policy sample. 

	manoj

13.4. Accessing the documentation
---------------------------------

     Former Debian releases placed all additional documentation in
     `/usr/doc/<package>'.  To realize a smooth migration to
     `/usr/share/doc/<package>', each package must maintain a symlink
     `/usr/doc/<package>' that points to the new location of its
     documentation in `/usr/share/doc/<package>'[1].  The symlink must be
     created when the package is installed; it cannot be contained in the
     package itself due to problems with `dpkg'.  One reasonable way to
     accomplish this is to put the following in the package's
     `postinst'[2]:
          if [ "$1" = "configure" ]; then
            if [ -d /usr/doc -a ! -e /usr/doc/<package> \
                 -a -d /usr/share/doc/<package> ]; then
              ln -sf ../share/doc/<package> /usr/doc/<package>
            fi
          fi
     and the following in the package's `prerm':
          if [ \( "$1" = "upgrade" -o "$1" = "remove" \) \
               -a -L /usr/doc/<package> ]; then
            rm -f /usr/doc/<package>
          fi

[1]  These symlinks will be removed in the future, but they have to be
     there for compatibility reasons until all packages have moved and the
     policy is changed accordingly. 

[2]  The `debhelper' script `dh_installdocs' does this automatically. 

	
-- 
 There is, however, a strange, musty smell in the air that reminds me
 of something...hmm...yes...I've got it...there's a VMS nearby, or I'm
 a Blit. --Larry Wall in Configure from the perl distribution
Manoj Srivastava   <srivasta@debian.org>  <http://www.debian.org/%7Esrivasta/>
1024R/C7261095 print CB D9 F4 12 68 07 E4 05  CC 2D 27 12 1D F5 E8 6E
1024D/BF24424C print 4966 F272 D093 B493 410B  924B 21BA DABB BF24 424C



Reply to: