Re: hardlinks in packages -- unusable in AFS
Adam Heath <adam@lapdoog.doogie.org> wrote:
> For installs, dpkg uses it's internal tar. However, when dpkg-deb -x is
> called, then the external tar is used.
>
> Installation of a package occurs when dpkg -i or dpkg --unpack is called.
#v+
dpkg-1.10.9$ grep -r 'Make.*Link' *
include/tarfn.h: TarFunction MakeHardLink;
include/tarfn.h: TarFunction MakeSymbolicLink;
lib/star.c:MakeHardLink(TarInfo * i)
lib/star.c:MakeSymbolicLink(TarInfo * i)
lib/star.c: MakeHardLink,
lib/star.c: MakeSymbolicLink,
lib/tarfn.c: status = (*functions->MakeHardLink)(&h);
lib/tarfn.c: status = (*functions->MakeSymbolicLink)(&symListPointer->h);
#v-
This shows, that Links will only be created by this 2 functions
Make{Hard,Symbolic}Link and they are only called in lib/tarfn.c.
I would be happy, if my changes find there way in the code of dpkg. So
where should I add my changes?
I will implement an command line option like --no-dir-hardlinks which
instructs dpkg to not create hard links accress directories. And/or a
switch --no-hardlinks which instructs dpkg to create symlinks instead of
all hard links. But where I should do my changes in tarfn, where
Make.*Link is called or one level lower?
Joerg.
Reply to: