[GSoC] migration

Umesh Singla umeshksingla at macports.org
Tue Jul 11 18:43:11 UTC 2017


Hi Brad,

While I was writing for restoring of ports, it seems that I need to include
another field 'active' along with ports while taking snapshot. This might
sound obvious now but it wasn't to me before I looked at what is going on,
closely. While there is something like 'active' port but there's no such
state as being 'inactive'.

This led me to a further research and I came across this in the migration
guide:

"Though it is now quite well-tested, the restore_ports script may fail in
some cases. One known issue is that the script will fail if there are
conflicting ports in the list. It's possible to have conflicting ports
installed provided at most one of the conflicting set is active. If the
script fails for this reason, you can delete one of the conflicting
ports..."

Do you think it can be solved by merely adding active field? What possible
conflicts is it talking about?

The example I went through is installing of vim. I ran:

*port install vim -huge +tiny +x11* -> this is active now

followed by,

*port install vim -huge +tiny* -> now this becomes active and previous one
deactivated (different ports, therefore). Of course, both are requested =
True.

So, in the snapshot database, it is:


ports:

id      snapshot_id  portname  req

2540        104           vim         1         ...

2593        104           vim         1

with variants stored as:

id            port_id          variant    sign

242         2540               tiny         +

243         2540               x11         +

244         2540               huge       -           ...

250         2593               tiny         +

251         2593               huge       -

Reproducing the install commands for these two, is that a conflict? I used
reg_entry_imaged which doesn't give info on a port being active. Probably,
I should use a combination of reg_entry_installed and reg_entry_imaged OR
registry::installed which is more straightforward and serves my purpose.
Can you help me with the next step here?

Regards,
Umesh Singla
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macports.org/pipermail/macports-dev/attachments/20170712/7fb2a895/attachment.html>


More information about the macports-dev mailing list