[users] Dropping the repotag

Jeff Johnson n3npq at mac.com
Sun Mar 18 18:55:48 CET 2007


On Mar 18, 2007, at 1:34 PM, Dag Wieers wrote:

>
> Feel free to bring one up that is clearly better. And if possible  
> can be
> used with older releases as well.
>

OK.

All rpm packages since forever have an unique identifier, the MD5 sum
of the header+payload.

A key: value(s) table associates additional information with all  
packages.

E.g. the entry for http://wraptastic.org/pub/rpm-devel/ 
popt-1.10.9-0.1.i386.rpm
might look like (in YAML, XML is just as easily invented)
     ---
     Package:
	Pkgid: 0x2fb5c6c0f9030ed03dd3b3cd99bea412
	Hdrid: 0x27c6954a9fba760c1eee115e132b65fc3687e5ae
	Disttag: wtf0
	Repotag: wtf
     ---

A path for the additional information is defined, say, /var/lib/rpm/ 
metainfo/wraptastic.org/whatever

A header extension is added to query RPMTAG_DISTTAG and  
RPMTAG_REPOTAG using
the conventions above. For those distros that refuse to change rpm, a  
wrapper is written in
whatever your favorite language is. YAML parsing in perl and python,  
with existing rpm bindings,
is not rocket science.

A shell script is written to populate the /var/lib/rpm/metainfo meta- 
metadata file.

The default query string is changed in /etc/rpm/macros to be
	%_query_all_fmt %%{name}-%%{version}-%%{release}.%%{disttag}.%% 
{repotag}.%%|SOURCERPM?{%%{arch}.rpm}:{%%|ARCH?{src.rpm}:{pubkey}|}|

(Note: that would display "popt-1.10.9-0.1.wtf0.wtf.i386.rpm" for the  
package above)

Another script to copy rpm's to that name is written, less than 20  
lines.

Q.E.D.

Now the real question is whether anyone *REALLY* wants this problem  
solved.

What say ye?

73 de Jeff



More information about the users mailing list