[softwaremgmt] Identifying a package in rpm-md
Greetings All, In our rpm-md metadata at the moment we are using the package checksum as an identifier (pkgid). This leads to a problem when importing data into the software portal. When a repository has changed we could: * Simply delete all repository content and re-add the new content. This is rather slow and has other problems associated with it when we have hundreds of repositories changing per day (which we do, thanks to the buildservice). * Update the details of only the changed packages. The problem with the latter is that it's difficult to tie the packages in the new repository metadata to the packages in the old repository metadata. The checksum of a package changes every time it's rebuilt, so we can't use that as an identifier to match the old state to the new. There can be multiple packages with the same name+version. The buildid changes every build. If we can't match up the current packages with the old packages we can't just update the details. We also can't determine which packages have been removed or added. So my question is: Is there a set of attributes in the rpm-md that would uniquely identify a package that is build independent and allow diffing of the metadata? -- Benjamin Weber -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
On Tue, Jan 27, 2009 at 10:53:46PM +0000, Benji Weber wrote:
So my question is: Is there a set of attributes in the rpm-md that would uniquely identify a package that is build independent and allow diffing of the metadata?
Suppose we have package movieplayer in 3 repos: in factory with few codecs, in packman with more codecs, and in a home project with a different set of more codecs. Now we have several versions of the package from all of these repos. If I understand correctly, you want to classify movieplayer so that you have 3 pkgids. How about name+packager? (or vendor, but I don't see that in rpm-md) +arch? -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
2009/1/28 Martin Vidner <mvidner@suse.cz>:
On Tue, Jan 27, 2009 at 10:53:46PM +0000, Benji Weber wrote:
So my question is: Is there a set of attributes in the rpm-md that would uniquely identify a package that is build independent and allow diffing of the metadata?
Suppose we have package movieplayer in 3 repos: in factory with few codecs, in packman with more codecs, and in a home project with a different set of more codecs. Now we have several versions of the package from all of these repos. If I understand correctly, you want to classify movieplayer so that you have 3 pkgids.
Or one, I know what repository it is as that's where I obtained the metadata. The problem is matching up the packages that are currently in the repository, with the packages that were there before.
How about name+packager? (or vendor, but I don't see that in rpm-md) +arch?
Is it not possible for one packager to package multiple versions of the same named package within one repository? e.g. amarok 2.0 and amarok 2.1 ? I was wondering if there's a set of attributes that's guaranteed to be unique, other than the checksum. -- Benjamin Weber -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
On Wed, Jan 28, 2009 at 11:23:26AM +0000, Benji Weber wrote:
2009/1/28 Martin Vidner <mvidner@suse.cz>:
Suppose we have package movieplayer in 3 repos: in factory with few codecs, in packman with more codecs, and in a home project with a different set of more codecs. Now we have several versions of the package from all of these repos. If I understand correctly, you want to classify movieplayer so that you have 3 pkgids.
Or one, I know what repository it is as that's where I obtained the metadata.
The problem is matching up the packages that are currently in the repository, with the packages that were there before.
How about name+packager? (or vendor, but I don't see that in rpm-md) +arch?
Is it not possible for one packager to package multiple versions of the same named package within one repository?
e.g. amarok 2.0 and amarok 2.1 ?
I don't think so. I don't know the hard facts, but the general assumption is that the unique thing is the package name. Otherwise we wouldn't weld version numbers to package names (kde3-*, kde4-* ...)
I was wondering if there's a set of attributes that's guaranteed to be unique, other than the checksum.
But for your purposes (deleting obsolete records from a database and inserting fresh ones) that seems to be not the right question. If that set does not include the version, then you will likely find the obsolete entry, otherwise you won't, isn't that the case? -- Martin Vidner, YaST developer http://en.opensuse.org/User:Mvidner Kuracke oddeleni v restauraci je jako fekalni oddeleni v bazenu -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
2009/1/28 Martin Vidner <mvidner@suse.cz>:
But for your purposes (deleting obsolete records from a database and inserting fresh ones) that seems to be not the right question. If that set does not include the version, then you will likely find the obsolete entry, otherwise you won't, isn't that the case?
Hmm. Yes I guess it's not worth worrying about if the package name is unique in almost all cases. I can just fall back to removing&re-adding packages in the rare case that there is more than one with the same name. -- Benjamin Weber -- To unsubscribe, e-mail: opensuse-softwaremgmt+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-softwaremgmt+help@opensuse.org
participants (2)
-
Benji Weber
-
Martin Vidner