Gentoo Archives: gentoo-dev

From: Spider <spider@g.o>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] CONTENTS file
Date: Sat, 11 Oct 2003 20:16:13
Message-Id: 20031011221608.3b4b1911.spider@gentoo.org
In Reply to: [gentoo-dev] CONTENTS file by Andrew Gaffney
1 begin quote
2 On Sat, 11 Oct 2003 13:45:53 -0500
3 Andrew Gaffney <agaffney@×××××××××××××××××××.net> wrote:
4
5 > I'm writing a Perl script that verifies file MD5SUMs against what
6 > portage recorded in
7 > /var/db/pkg/category/package/CONTENTS at install. I'm wondering what
8 > would happen in that
9 > file if some package were to install a file that had a space in the
10 > name. Currently, a
11 > line looks like:
12 >
13 > obj /usr/libexec/webmin/acl/defaultacl
14 > a6897506f8609645d3a215988d1a937c 1063945574
15 >
16 > This can easily be pulled apart with a regex, but what if it looked
17 > like this:
18 >
19 > obj /usr/libexec/webmin/acl/default acl
20 > a6897506f8609645d3a215988d1a937c 1063945574
21 >
22 > Can this happen?
23 probably.
24
25
26
27 I'd suggest starting the regexp from the back. Since the last fields
28 are always the same, that makes everything before the two last fields
29 the filename.
30
31
32 //Spider
33
34
35 --
36 begin .signature
37 This is a .signature virus! Please copy me into your .signature!
38 See Microsoft KB Article Q265230 for more information.
39 end