Package: dpkg
Version: 1.15.7.2
Severity: wishlist
File: /usr/bin/dpkg-divert

Hi,

it would be nice if dpkg-divert supported updates to the diversions, so
one can change the --divert name or the --package owning the diversion
directly through a single dpkg-divert call as in the following example.

There is 'some' package providing an awful version of /the/file which was
previously diverted by the package 'foo' to provide a much better version
of /the/file. But now 'foo' has been renamed to 'bar' (or at least /the/file
moved from 'foo' to 'bar') and now the package 'bar' has to take over the
diversion.

'bar' would do the following in it's preinst:

dpkg-divert
  --update      # example new subcommand
  --rename      # move around things in the file system if neccessary
  --old-package foo     # the package that currently own the diversion
  --package bar         # the new package that shall own the diversion
  --old-divert /the/file.not-foo        # file from someone else is currently 
there
  --divert /the/file.not-bar            # file from someone else should be here 
in the future
  /the/file                             # our much better file

Of course the arguments to --old-package and --new-package must match
the database.

If either --old-package or --old-divert is omitted, only change the
property where there is an --old-* parameter while the other must match
the current database.

Eventually the --update option could be combined with --add so that it
either creates the diversion if there was none previously or migrates
it.

Packages doing this need to ensure proper versioned Conflicts/Replaces
(Breaks/Replaces will probably be not enough) so that up- and down-grade
paths work.


Andreas



-- System Information:
Debian Release: squeeze/sid
  APT prefers stable
  APT policy: (800, 'stable'), (700, 'testing'), (600, 'unstable'), (130, 
'experimental')
Architecture: amd64 (x86_64)

Kernel: Linux 2.6.32-5-amd64 (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages dpkg depends on:
ii  coreutils         8.5-1                  GNU core utilities
ii  libbz2-1.0        1.0.5-4                high-quality block-sorting file co
ii  libc6             2.11.2-2               Embedded GNU C Library: Shared lib
ii  libselinux1       2.0.94-1               SELinux runtime shared libraries
ii  xz-utils          4.999.9beta+20100527-1 XZ-format compression utilities
ii  zlib1g            1:1.2.3.4.dfsg-3       compression library - runtime

dpkg recommends no packages.

Versions of packages dpkg suggests:
ii  apt                           0.7.25.3   Advanced front-end for dpkg

-- no debconf information




-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to