> On Aug 11, 2017, at 11:16 AM, Joshua Root <j...@macports.org> wrote:
> 
> On 2017-8-11 21:14 , Umesh Singla wrote:
>> Hi
>>        And then again, I am sensing a confusion with the idea of
>>        snapshot with Josh, like when he says "remove ports when they
>>        are no longer referenced by any snapshot".
>>    What confusion exactly? A snapshot is simply a set of ports (by
>>    which I mean rows in the 'ports' table, with a unique combination of
>>    name,version,revision,variants). When nothing references a row any
>>    more, it needs to be deleted.
>> By 'ports', do you mean 'registry.ports' table? If yes, then I disagree. 
>> It's actually 'registry.snapshot_ports' table. A snapshot has nothing to do 
>> with the original registry "tables".
> 
> That was a suggested design; if you're already doing it differently then I 
> guess you don't need a design. I disagree with the last sentence though, a 
> snapshot can be viewed as precisely the state of the original tables at a 
> previous time.

If that is the case, we can simply (insert into snapshot_ports select * from 
ports) to create a snapshot. Obviously the snapshot_ports table needs an extra 
snapshot_id column.

>> Also, we are not using version and revision. Even going by the literal 
>> meaning of a snapshot, it should not have a key or id linked to something 
>> that can change over time. It's simply the present state.
> 
> The row in the ports table would not change over time, it would simply 
> persist until no longer needed. If we ever get the ability to install old 
> versions then that information would come in handy.

Sounds right.

>> Later, I am planning to keep information on the manual portgroups in the 
>> snapshot, if there are any.
> 
> What would this information be used for?

Sorry, I don’t understand what “manual ports groups” refers to. Maybe I missed 
an earlier conversation.

—
Brad

Reply via email to