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

Re: Updating dpkg-cross: file moving question

> The question is - how to process existing cross-compile environment,
> created by earlier versions of dpkg-cross.
> I am thinking to make the following trick. In postinst of new
> dpkg-cross, it will check for /usr/arm-linux, /usr/powerpc-linux/, and
> other places where packages created by earlier versions could place
> files. If any of such directories is found:
> - a directory with the new name will be created if not exists yet,
> - complete file hierarchy from the old directory will be copied to the
> new directory,
> - old directory will be replaces with a sympink to the new one.
> Looks that this procedure is more or less safe. E.g. removals of
> packages which files have been moved in this way, would remove correct
> files.

I've thought of an alternative way.

I may make dpkg-cross to generate additional provides/depends information 
for  arch-cross packages:
- each xxx-arch-cross package will
     Provides: xxx-arch-cross-<layout-identifier>
- when xxx deepnds on yyy, dpkg-cross will generate
     Depends: yyy-arch-cross, yyy-arch-cross-<layout-identifier>
- when xxx depends on yyy (>= n), dpkg-cross will generate
     Depends: yyy-arch-cross (>= n), yyy-arch-cross-<layout-identifier>

Looks that this guarantees that cross-compile setup at new location will be 
consistent. Also, it will make all package installations and removals 
Drawback are:
- tree at old location may become inconsistent (if x depends on y, 
x-arch-cross is generated by new dpkg-cross, and y-arch-cross is
generated by old dpkg-cross),
- if older (sarge) cross-compiler packages are used, they won't find 
cross-compilation tree unless symlinks are created manually.

Does this look better?

Attachment: pgpImsgGmUliz.pgp
Description: PGP signature

Reply to: