Upcoming changes (in 1.4.1)

Anders F Björklund afb at algonet.se
Sat Aug 20 09:39:25 PDT 2011


Jeff Johnson:

>> 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 …

Of that form, sorry. Whatever the original filename was.
It's RPM itself setting it, when given a file I think ?

>> 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().

Yes, smart does a "h = ts.hdrFromFdno(fd)" to get it...
(after doing a "fd = os.open(path, os.O_RDONLY)" first)

>> 
>> 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).

Ah, right. Figured it was something like that...
Anyway, those two values was just what rpm did.

It seems like both the original URL and the file
digest(s) needs to be propagated from the fetcher ?

>> 
>> 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.

Smart does verify the file digest(s), but only as part of
the downloading. The installation is done from local files.

> 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.

Both the original URL and the file digest *should* be
available, just that they aren't with the current API.

A slight issue is that there are multiple urls and
multiple digests, but I guess any of those would do ?

--anders




More information about the Smart mailing list