On Sat, Aug 24, 2013 at 11:38 AM, Raphael Hertzog <hert...@debian.org> wrote:
> On Fri, 23 Aug 2013, Bastien ROUCARIES wrote:
>> Find -print0
>>
>> And replacing read by read -r -d $'\0' is safer but I do not know if it is
>> portable.
>>
>> Or xargs but we need to fork for each file and we get the portability
>> problem of find print0.
>>
>> What do you prefer ?
>
> find -print0 is fine, dpkg-deb already uses it.
> read -d is likely a problem however (I believe it's bash specific).
>
> I don't think that I have any good answer if we want to support newlines
> in filenames. But it's probably not an important use case as dpkg itself
> doesn't cope very well with it. dpkg-deb builds it fine and it installs
> fine but when you do "dpkg -L" you get this back (with a single
> "hello\nworld" file):
> $ dpkg -L foo
> /.
> /hello
> /world
>
> (This is because the /var/lib/dpkg/info/*.list files are line based)
>
> So I would go ahead ignoring this specific problem. Otherwise you could
> write that specific part in perl but it would be a regression to reintroduce
> perl in dpkg itself.

Could we open a bug report about this ? I have an idea for improving
this kind of problem and it will help me.

Instead of begining the .list with /. we could begin with /./. and
thus encode a .list file version.

Bastien
>
> Cheers,
> --
> Raphaël Hertzog ◈ Debian Developer
>
> Discover the Debian Administrator's Handbook:
> → http://debian-handbook.info/get/


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to