public inbox for gentoo-portage-dev@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-portage-dev] add UUID for comparison of installed package to binary package?
@ 2010-02-12 20:54 Zac Medico
  2010-02-12 21:38 ` Brian Harring
  0 siblings, 1 reply; 9+ messages in thread
From: Zac Medico @ 2010-02-12 20:54 UTC (permalink / raw
  To: gentoo-portage-dev

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

I'm thinking about adding a UUID file in /var/db/pkg, for comparing
installed packages to binary packages. We already have BINPKGMD5,
but the problem with that is that the MD5 of a binary package
changes when it's updated for package moves. A UUID would be
assigned at build time and remain constant thereafter. We can use
python's uuid.uuid4() function to generate a random UUID. Any
suggestions for alternative approaches?
- -- 
Thanks,
Zac
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.14 (GNU/Linux)

iEYEARECAAYFAkt1v/sACgkQ/ejvha5XGaN96ACg20x9kIr6CxAbWxlxqub3XkY7
7skAnRH3FdZqQs+v9EePrqFwztGSpHt2
=C7Dx
-----END PGP SIGNATURE-----



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-portage-dev] add UUID for comparison of installed package to binary package?
  2010-02-12 20:54 [gentoo-portage-dev] add UUID for comparison of installed package to binary package? Zac Medico
@ 2010-02-12 21:38 ` Brian Harring
  2010-02-13  0:24   ` Zac Medico
  0 siblings, 1 reply; 9+ messages in thread
From: Brian Harring @ 2010-02-12 21:38 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 540 bytes --]

On Fri, Feb 12, 2010 at 12:54:21PM -0800, Zac Medico wrote:
> Hi,
> 
> I'm thinking about adding a UUID file in /var/db/pkg, for comparing
> installed packages to binary packages. We already have BINPKGMD5,
> but the problem with that is that the MD5 of a binary package
> changes when it's updated for package moves. A UUID would be
> assigned at build time and remain constant thereafter. We can use
> python's uuid.uuid4() function to generate a random UUID. Any
> suggestions for alternative approaches?

Purpose?
~harring

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-portage-dev] add UUID for comparison of installed package to binary package?
  2010-02-12 21:38 ` Brian Harring
@ 2010-02-13  0:24   ` Zac Medico
  2010-02-14 12:36     ` Brian Harring
  0 siblings, 1 reply; 9+ messages in thread
From: Zac Medico @ 2010-02-13  0:24 UTC (permalink / raw
  To: gentoo-portage-dev

On 02/12/2010 01:38 PM, Brian Harring wrote:
> On Fri, Feb 12, 2010 at 12:54:21PM -0800, Zac Medico wrote:
>> Hi,
>>
>> I'm thinking about adding a UUID file in /var/db/pkg, for comparing
>> installed packages to binary packages. We already have BINPKGMD5,
>> but the problem with that is that the MD5 of a binary package
>> changes when it's updated for package moves. A UUID would be
>> assigned at build time and remain constant thereafter. We can use
>> python's uuid.uuid4() function to generate a random UUID. Any
>> suggestions for alternative approaches?
> 
> Purpose?
> ~harring

If you build binary packages for installation on multiple systems,
and periodically have to rebuild packages for various reasons
(revdep-rebuild or whatnot), it makes it easier to know whether a
particular system has the latest build installed. Then you can
create a package set that reinstalls any installed packages that are
not the latest build.

It's basically a catch-all for rebuilds that aren't tracked by other
kinds of metadata yet. Eventually, we should introduce metadata to
indicate when things need to be reinstalled, as discussed in this bug:

  https://bugs.gentoo.org/show_bug.cgi?id=192319

In the mean time, it's nice to have a catch-all for keeping systems
synchronized with the latest builds. We may want to consider
including it in the $PKGDIR/Packages file as a convenience for
binhost users.
-- 
Thanks,
Zac



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-portage-dev] add UUID for comparison of installed package to binary package?
  2010-02-13  0:24   ` Zac Medico
@ 2010-02-14 12:36     ` Brian Harring
  2010-02-14 20:11       ` Zac Medico
  0 siblings, 1 reply; 9+ messages in thread
From: Brian Harring @ 2010-02-14 12:36 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 1981 bytes --]

On Fri, Feb 12, 2010 at 04:24:05PM -0800, Zac Medico wrote:
> On 02/12/2010 01:38 PM, Brian Harring wrote:
> > On Fri, Feb 12, 2010 at 12:54:21PM -0800, Zac Medico wrote:
> >> Hi,
> >>
> >> I'm thinking about adding a UUID file in /var/db/pkg, for comparing
> >> installed packages to binary packages. We already have BINPKGMD5,
> >> but the problem with that is that the MD5 of a binary package
> >> changes when it's updated for package moves. A UUID would be
> >> assigned at build time and remain constant thereafter. We can use
> >> python's uuid.uuid4() function to generate a random UUID. Any
> >> suggestions for alternative approaches?
> > 
> > Purpose?
> > ~harring
> 
> If you build binary packages for installation on multiple systems,
> and periodically have to rebuild packages for various reasons
> (revdep-rebuild or whatnot), it makes it easier to know whether a
> particular system has the latest build installed. Then you can
> create a package set that reinstalls any installed packages that are
> not the latest build.
> 
> It's basically a catch-all for rebuilds that aren't tracked by other
> kinds of metadata yet. Eventually, we should introduce metadata to
> indicate when things need to be reinstalled, as discussed in this bug:
> 
>   https://bugs.gentoo.org/show_bug.cgi?id=192319
> 
> In the mean time, it's nice to have a catch-all for keeping systems
> synchronized with the latest builds. We may want to consider
> including it in the $PKGDIR/Packages file as a convenience for
> binhost users.

This gets nasty... you're basically talking about the rpm equivalent 
of EPOCH.

Not a fan of an adhoc UUID (especially since it'll become standard 
via portage doing it), but a *timestamp* for the build, labeled as 
such, gets you what you want and is usable for other things- detecting 
when to rebuild a scm package for example.

That route gets my vote, and should also address your intentions.
~harring

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-portage-dev] add UUID for comparison of installed package to binary package?
  2010-02-14 12:36     ` Brian Harring
@ 2010-02-14 20:11       ` Zac Medico
  2010-02-15  2:02         ` Ned Ludd
  0 siblings, 1 reply; 9+ messages in thread
From: Zac Medico @ 2010-02-14 20:11 UTC (permalink / raw
  To: gentoo-portage-dev

On 02/14/2010 04:36 AM, Brian Harring wrote:
> This gets nasty... you're basically talking about the rpm equivalent 
> of EPOCH.
> 
> Not a fan of an adhoc UUID (especially since it'll become standard 
> via portage doing it), but a *timestamp* for the build, labeled as 
> such, gets you what you want and is usable for other things- detecting 
> when to rebuild a scm package for example.
> 
> That route gets my vote, and should also address your intentions.
> ~harring

Ok, then how about a vdb entry named CTIME that contains an integer
number of seconds since the unix Epoch?
-- 
Thanks,
Zac



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-portage-dev] add UUID for comparison of installed package to binary package?
  2010-02-14 20:11       ` Zac Medico
@ 2010-02-15  2:02         ` Ned Ludd
  2010-02-15  2:26           ` Brian Harring
  2010-02-15  5:48           ` Zac Medico
  0 siblings, 2 replies; 9+ messages in thread
From: Ned Ludd @ 2010-02-15  2:02 UTC (permalink / raw
  To: gentoo-portage-dev

On Sun, 2010-02-14 at 12:11 -0800, Zac Medico wrote:
> On 02/14/2010 04:36 AM, Brian Harring wrote:
> > This gets nasty... you're basically talking about the rpm equivalent 
> > of EPOCH.
> > 
> > Not a fan of an adhoc UUID (especially since it'll become standard 
> > via portage doing it), but a *timestamp* for the build, labeled as 
> > such, gets you what you want and is usable for other things- detecting 
> > when to rebuild a scm package for example.
> > 
> > That route gets my vote, and should also address your intentions.
> > ~harring
> 
> Ok, then how about a vdb entry named CTIME that contains an integer
> number of seconds since the unix Epoch?

That would be UNIXTIME vs CTIME I'd think.




^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-portage-dev] add UUID for comparison of installed package to binary package?
  2010-02-15  2:02         ` Ned Ludd
@ 2010-02-15  2:26           ` Brian Harring
  2010-02-15  5:49             ` Zac Medico
  2010-02-15  5:48           ` Zac Medico
  1 sibling, 1 reply; 9+ messages in thread
From: Brian Harring @ 2010-02-15  2:26 UTC (permalink / raw
  To: gentoo-portage-dev

[-- Attachment #1: Type: text/plain, Size: 1078 bytes --]

On Sun, Feb 14, 2010 at 06:02:28PM -0800, Ned Ludd wrote:
> On Sun, 2010-02-14 at 12:11 -0800, Zac Medico wrote:
> > On 02/14/2010 04:36 AM, Brian Harring wrote:
> > > This gets nasty... you're basically talking about the rpm equivalent 
> > > of EPOCH.
> > > 
> > > Not a fan of an adhoc UUID (especially since it'll become standard 
> > > via portage doing it), but a *timestamp* for the build, labeled as 
> > > such, gets you what you want and is usable for other things- detecting 
> > > when to rebuild a scm package for example.
> > > 
> > > That route gets my vote, and should also address your intentions.
> > > ~harring
> > 
> > Ok, then how about a vdb entry named CTIME that contains an integer
> > number of seconds since the unix Epoch?
> 
> That would be UNIXTIME vs CTIME I'd think.

How about a more descriptive name... build_time or something similar.  
Yes, CTIME means creation time, but I'd rather not overload terms that 
have specific meanings already just for the sake of saving a few chars 
in typing the filename in...
~harring

[-- Attachment #2: Type: application/pgp-signature, Size: 198 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-portage-dev] add UUID for comparison of installed package to binary package?
  2010-02-15  2:02         ` Ned Ludd
  2010-02-15  2:26           ` Brian Harring
@ 2010-02-15  5:48           ` Zac Medico
  1 sibling, 0 replies; 9+ messages in thread
From: Zac Medico @ 2010-02-15  5:48 UTC (permalink / raw
  To: gentoo-portage-dev

On 02/14/2010 06:02 PM, Ned Ludd wrote:
>> Ok, then how about a vdb entry named CTIME that contains an integer
>> number of seconds since the unix Epoch?
> 
> That would be UNIXTIME vs CTIME I'd think.

I was alluding to the stat(2) st_ctime field, but I guess BUILD_TIME
is probably more appropriate (as suggested by Brian).
-- 
Thanks,
Zac



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [gentoo-portage-dev] add UUID for comparison of installed package to binary package?
  2010-02-15  2:26           ` Brian Harring
@ 2010-02-15  5:49             ` Zac Medico
  0 siblings, 0 replies; 9+ messages in thread
From: Zac Medico @ 2010-02-15  5:49 UTC (permalink / raw
  To: gentoo-portage-dev

On 02/14/2010 06:26 PM, Brian Harring wrote:
> How about a more descriptive name... build_time or something similar.  
> Yes, CTIME means creation time, but I'd rather not overload terms that 
> have specific meanings already just for the sake of saving a few chars 
> in typing the filename in...
> ~harring

Ok, BUILD_TIME sounds good to me.
-- 
Thanks,
Zac



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2010-02-15  5:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-02-12 20:54 [gentoo-portage-dev] add UUID for comparison of installed package to binary package? Zac Medico
2010-02-12 21:38 ` Brian Harring
2010-02-13  0:24   ` Zac Medico
2010-02-14 12:36     ` Brian Harring
2010-02-14 20:11       ` Zac Medico
2010-02-15  2:02         ` Ned Ludd
2010-02-15  2:26           ` Brian Harring
2010-02-15  5:49             ` Zac Medico
2010-02-15  5:48           ` Zac Medico

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox