Upcoming changes (in 1.4.1)

Jeff Johnson n3npq at mac.com
Sat Aug 20 09:15:40 PDT 2011


On Aug 20, 2011, at 10:40 AM, Anders F Björklund wrote:

> Jeff Johnson wrote:
> 
>> Could you also try to populate the repository origin
>> of the package? This should be pretty simple:
>> 	A call to headerSetOrigin() somewhere.
>> There's also (used by rpmrepo but otherwise mostly *shrug*)
>> in diminishing priority:
>> 	headerSetDigest()
>> 	headerSetStatbuf()
>> 	headerSetStartOff()
>> 	headerSetEndOff()
>> 	headerSetBaseURL()
>> that would make it easier to re-generate repo-md spewage directly
>> from whatever is installed by smart in an rpmdb.
> 
> Currently these are getting set, when installing:
> Packageorigin: /var/lib/smart/packages/*.rpm

Is that literally a '*" or just that all origins are of that form?
Presumably no "*" is present …

> Packagestat: <struct stat, of the above file> 

This is set when the FD_t is opened, either by Stat
(or more typically of bindings) by Fstat through fdDup().

> 
> That origin path is to the (temporary) location,
> which will (by default) be removed after install.
> Not sure why the digest isn't being set (by rpm) ?

The goal is to get the tag populated with *something*,
even the temporary location already indicates what depsolver
was used to install a particular package.

The digest can't be set unless computed. This
would force a read-compute-rewind cycle that
prevents streaming a package straight off
a pipe or socket (which forces caching and cleanup etc etc).

> 
> Anyway, not enough information to regenerate md…
> 

Is smart ever verifying the file digest?

If the file digest is being verified, then adding that
to the header would indicate that the file digest was locally computed.

Otherwise, just calling with the repo-md file digest is
about as good as its gonna get: at least the sewage
can be regenerated with the same value as initially
present.

rpm doesn't read repo-md sewage and can't easily find file
digest.

> --anders
> 




More information about the Smart mailing list