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

Re: Merging three direcories in postinst



Hi,

Am Freitag, den 17.06.2011, 12:31 +0100 schrieb Ian Jackson:
> Joachim Breitner writes ("Re: Merging three direcories in postinst"):
> > Am Mittwoch, den 15.06.2011, 13:35 +0100 schrieb Ian Jackson:
> > > > I guess I?ll give the postinst-symlink-approach a shot.
> > > 
> > > Do come back when you have more final-looking code and I'll see if I
> > > can find bugs in it :-).
> > 
> > I implemented it and did some tests. I did not test aborting it halfway,
> > but I?m confident that it is ok ? the moving of files can be continued.
> > Only an abortion between rmdir and ln would be bad.
> > 
> > The postinst is here:
> > http://anonscm.debian.org/darcs/pkg-haskell/ghc/ghc-doc.postinst.in
> 
> Are you sure this is the version you tested ?  Your tests don't seem
> to have been very comprehensive ...
> 
> I see this:
>    find $path -maxdepth 1 -mindepth 1 -print0 | xargs -0 -r mv /usr/lib/ghc-doc/haddock/
> which doesn't look like it will do what you want!

Strange. The "-t" after mv got missing. But it was working at some
point... guess that was when it was still the "mv" command, and then
this command line was not checked in all cases.

I’ll add it, retry my tests, and come back.

BTW, this line (with "-t" after mv") ought to do the same as
mv $path/* /usr/lib/ghc-doc/haddock/
without failing when $path is empty. Is there a nicer way than find and
xargs?

Greetings,
Joachim

-- 
Joachim "nomeata" Breitner
Debian Developer
  nomeata@debian.org | ICQ# 74513189 | GPG-Keyid: 4743206C
  JID: nomeata@joachim-breitner.de | http://people.debian.org/~nomeata

Attachment: signature.asc
Description: This is a digitally signed message part


Reply to: