* [gentoo-dev] CONTENTS file
@ 2003-10-11 18:45 Andrew Gaffney
2003-10-11 19:24 ` Markus Nigbur
` (5 more replies)
0 siblings, 6 replies; 9+ messages in thread
From: Andrew Gaffney @ 2003-10-11 18:45 UTC (permalink / raw
To: Gentoo Dev
I'm writing a Perl script that verifies file MD5SUMs against what portage recorded in
/var/db/pkg/category/package/CONTENTS at install. I'm wondering what would happen in that
file if some package were to install a file that had a space in the name. Currently, a
line looks like:
obj /usr/libexec/webmin/acl/defaultacl a6897506f8609645d3a215988d1a937c 1063945574
This can easily be pulled apart with a regex, but what if it looked like this:
obj /usr/libexec/webmin/acl/default acl a6897506f8609645d3a215988d1a937c 1063945574
Can this happen?
--
Andrew Gaffney
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] CONTENTS file
2003-10-11 18:45 [gentoo-dev] CONTENTS file Andrew Gaffney
@ 2003-10-11 19:24 ` Markus Nigbur
2003-10-11 19:47 ` [gentoo-dev] " Michael Sterrett -Mr. Bones.-
` (4 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Markus Nigbur @ 2003-10-11 19:24 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 286 bytes --]
On Sat, 11 Oct 2003 13:45:53 -0500
Andrew Gaffney <agaffney@technaut.darktalker.net> wrote:
> I'm wondering what would happen in that file if some package were to
> install a file that had a space in the name.
Maybe s/ /\ /g?
--
Markus Nigbur
Gentoo Developer
http://www.gentoo.org
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [gentoo-dev] Re: CONTENTS file
2003-10-11 18:45 [gentoo-dev] CONTENTS file Andrew Gaffney
2003-10-11 19:24 ` Markus Nigbur
@ 2003-10-11 19:47 ` Michael Sterrett -Mr. Bones.-
2003-10-11 20:05 ` [gentoo-dev] " Mike Frysinger
` (3 subsequent siblings)
5 siblings, 0 replies; 9+ messages in thread
From: Michael Sterrett -Mr. Bones.- @ 2003-10-11 19:47 UTC (permalink / raw
To: Andrew Gaffney; +Cc: Gentoo Dev
On Sat, 11 Oct 2003, Andrew Gaffney wrote:
> I'm writing a Perl script that verifies file MD5SUMs against what portage recorded in
> /var/db/pkg/category/package/CONTENTS at install. I'm wondering what would happen in that
> file if some package were to install a file that had a space in the name. Currently, a
> line looks like:
>
> obj /usr/libexec/webmin/acl/defaultacl a6897506f8609645d3a215988d1a937c 1063945574
>
> This can easily be pulled apart with a regex, but what if it looked like this:
>
> obj /usr/libexec/webmin/acl/default acl a6897506f8609645d3a215988d1a937c 1063945574
Both lines can easily be pulled apart with a perl regex.
Michael Sterrett
-Mr. Bones.-
mr_bones_@gentoo.org
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] CONTENTS file
2003-10-11 18:45 [gentoo-dev] CONTENTS file Andrew Gaffney
2003-10-11 19:24 ` Markus Nigbur
2003-10-11 19:47 ` [gentoo-dev] " Michael Sterrett -Mr. Bones.-
@ 2003-10-11 20:05 ` Mike Frysinger
2003-10-11 20:13 ` Andrew Gaffney
2003-10-11 20:16 ` Spider
` (2 subsequent siblings)
5 siblings, 1 reply; 9+ messages in thread
From: Mike Frysinger @ 2003-10-11 20:05 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: signed data --]
[-- Type: text/plain, Size: 388 bytes --]
On Saturday 11 October 2003 14:45, Andrew Gaffney wrote:
> obj /usr/libexec/webmin/acl/default acl a6897506f8609645d3a215988d1a937c
> 1063945574
>
> Can this happen?
yes, and it still can be 'easily' pulled apart ... the type is the first
param, the mtime is the last param, the md5 is the 2nd to last, and the
filename is everything in between the type and the md5 ;)
-mike
[-- Attachment #2: signature --]
[-- Type: application/pgp-signature, Size: 827 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] CONTENTS file
2003-10-11 20:05 ` [gentoo-dev] " Mike Frysinger
@ 2003-10-11 20:13 ` Andrew Gaffney
0 siblings, 0 replies; 9+ messages in thread
From: Andrew Gaffney @ 2003-10-11 20:13 UTC (permalink / raw
To: Gentoo Dev
Mike Frysinger wrote:
> On Saturday 11 October 2003 14:45, Andrew Gaffney wrote:
>
>>obj /usr/libexec/webmin/acl/default acl a6897506f8609645d3a215988d1a937c
>>1063945574
>>
>>Can this happen?
>
>
> yes, and it still can be 'easily' pulled apart ... the type is the first
> param, the mtime is the last param, the md5 is the 2nd to last, and the
> filename is everything in between the type and the md5 ;)
So, something like:
/^(\w+) (.+) (\w+) (\d+)$/
--
Andrew Gaffney
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] CONTENTS file
2003-10-11 18:45 [gentoo-dev] CONTENTS file Andrew Gaffney
` (2 preceding siblings ...)
2003-10-11 20:05 ` [gentoo-dev] " Mike Frysinger
@ 2003-10-11 20:16 ` Spider
2003-10-12 20:04 ` Daniel Steinberger
2003-11-12 22:17 ` Aron Griffis
5 siblings, 0 replies; 9+ messages in thread
From: Spider @ 2003-10-11 20:16 UTC (permalink / raw
To: gentoo-dev
[-- Attachment #1: Type: text/plain, Size: 1018 bytes --]
begin quote
On Sat, 11 Oct 2003 13:45:53 -0500
Andrew Gaffney <agaffney@technaut.darktalker.net> wrote:
> I'm writing a Perl script that verifies file MD5SUMs against what
> portage recorded in
> /var/db/pkg/category/package/CONTENTS at install. I'm wondering what
> would happen in that
> file if some package were to install a file that had a space in the
> name. Currently, a
> line looks like:
>
> obj /usr/libexec/webmin/acl/defaultacl
> a6897506f8609645d3a215988d1a937c 1063945574
>
> This can easily be pulled apart with a regex, but what if it looked
> like this:
>
> obj /usr/libexec/webmin/acl/default acl
> a6897506f8609645d3a215988d1a937c 1063945574
>
> Can this happen?
probably.
I'd suggest starting the regexp from the back. Since the last fields
are always the same, that makes everything before the two last fields
the filename.
//Spider
--
begin .signature
This is a .signature virus! Please copy me into your .signature!
See Microsoft KB Article Q265230 for more information.
end
[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] CONTENTS file
2003-10-11 18:45 [gentoo-dev] CONTENTS file Andrew Gaffney
` (3 preceding siblings ...)
2003-10-11 20:16 ` Spider
@ 2003-10-12 20:04 ` Daniel Steinberger
2003-11-12 22:17 ` Aron Griffis
5 siblings, 0 replies; 9+ messages in thread
From: Daniel Steinberger @ 2003-10-12 20:04 UTC (permalink / raw
To: gentoo-dev
i've been doing the same thing some time ago. so maybe you want to take
a look, improve, throw away or let it inspire you. you can find an
ebuild for my program here: http://frozenfire/NEMESiS/dl/augur-0.1.ebuild
the url for the perl-script is included
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] CONTENTS file
@ 2003-10-13 15:37 Daniel Steinberger
0 siblings, 0 replies; 9+ messages in thread
From: Daniel Steinberger @ 2003-10-13 15:37 UTC (permalink / raw
To: gentoo-dev
>>ebuild for my program here: http://frozenfire/NEMESiS/dl/augur-0.1.ebuild
>
> Might want to fix that URI so it can be reached from outside of your LAN :)
indeed i want to do so.. and i thought i did so initially... well... so
one can be wrong. it's
http://frozenfire.dnsalias.net/NEMESiS/dl/augur-0.1.ebuild
(damn!, sorry luke, next time i'll think of adressing the mail to
gentoo-dev in the first place ;-)
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [gentoo-dev] CONTENTS file
2003-10-11 18:45 [gentoo-dev] CONTENTS file Andrew Gaffney
` (4 preceding siblings ...)
2003-10-12 20:04 ` Daniel Steinberger
@ 2003-11-12 22:17 ` Aron Griffis
5 siblings, 0 replies; 9+ messages in thread
From: Aron Griffis @ 2003-11-12 22:17 UTC (permalink / raw
To: Andrew Gaffney; +Cc: gentoo-dev
Andrew,
I'm catching up on old mail. See epm for this. Epm is written in perl
and does exactly the checking you're describing.
Aron
Andrew Gaffney wrote: [Sat Oct 11 2003, 02:45:53PM EDT]
> I'm writing a Perl script that verifies file MD5SUMs against what portage
> recorded in /var/db/pkg/category/package/CONTENTS at install. I'm wondering
> what would happen in that file if some package were to install a file that
> had a space in the name. Currently, a line looks like:
>
> obj /usr/libexec/webmin/acl/defaultacl a6897506f8609645d3a215988d1a937c
> 1063945574
>
> This can easily be pulled apart with a regex, but what if it looked like
> this:
>
> obj /usr/libexec/webmin/acl/default acl a6897506f8609645d3a215988d1a937c
> 1063945574
>
> Can this happen?
>
> --
> Andrew Gaffney
>
>
> --
> gentoo-dev@gentoo.org mailing list
--
gentoo-dev@gentoo.org mailing list
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2003-11-12 22:17 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-11 18:45 [gentoo-dev] CONTENTS file Andrew Gaffney
2003-10-11 19:24 ` Markus Nigbur
2003-10-11 19:47 ` [gentoo-dev] " Michael Sterrett -Mr. Bones.-
2003-10-11 20:05 ` [gentoo-dev] " Mike Frysinger
2003-10-11 20:13 ` Andrew Gaffney
2003-10-11 20:16 ` Spider
2003-10-12 20:04 ` Daniel Steinberger
2003-11-12 22:17 ` Aron Griffis
-- strict thread matches above, loose matches on Subject: below --
2003-10-13 15:37 Daniel Steinberger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox