portsnap belated complaint?
Polytropon
freebsd at edvax.de
Fri Aug 21 18:11:57 UTC 2020
On Fri, 21 Aug 2020 11:42:23 -0600, Gary Aitken wrote:
> Can someone explain why the portsnap update below seems to have succeeded
> (patches applied), but then afterwards I get the message about needing to run
> portsnap extract?
>
> 11.3-RELEASE-p6 (upgraded from 10.something some time ago)
> I believe the ports tree was generated when the OS was installed, but not sure.
> I'm also not sure how /usr/ports was upgraded after the OS upgrade.
>
> # portsnap fetch
> ...
> Extracting snapshot... done.
> ...
> Ports tree hasn't changed since last snapshot.
> No updates needed.
> <long time interval>
You did not extract it.
> # portsnap fetch update <mistakenly left fetch in the cmd>
No, that invocation is correct.
> ...
> Fetching 4 metadata patches... done.
> Applying metadata patches... done.
> Fetching 0 metadata files... done.
> Fetching 22 patches.
> (22/22) 100.00% done.
> done.
> Applying patches...
> done.
> Fetching 2 new ports or files... done.
> /usr/ports was not created by portsnap.
> You must run 'portsnap extract' before running 'portsnap update'.
According to the manual "man 8 portsnap":
fetch Fetch a compressed snapshot of the ports tree, or update the
existing snapshot. This command should only be used inter-
actively; for non-interactive use, you should use the cron
command.
extract Extract a ports tree, replacing existing files and directo-
ries. NOTE: This will remove anything occupying the loca-
tion where files or directories are being extracted; in par-
ticular, any changes made locally to the ports tree (for ex-
ample, adding new patches) will be silently obliterated.
Only run this command to initialize your portsnap-maintained
ports tree for the first time, if you wish to start over
with a clean, completely unmodified tree, or if you wish to
extract a specific part of the tree (using the path option).
update Update a ports tree extracted using the extract command.
You must run this command to apply changes to your ports
tree after downloading updates via the fetch or cron com-
mands. Again, note that in the parts of the ports tree
which are being updated, any local changes or additions will
be removed.
Something went wrong in your case. You probably should remove
/usr/ports and obtain a fresh copy using the "fetch" and "extract"
operations to make sure the snapshot is okay. Further updates
to that snapshot can then be obtained using the "fetch" and
"update" operation.
You can find examples in the EXAMPLES section. :-)
Also see chapter 4.5 of The FreeBSD Handbook, procedure 4.1:
https://www.freebsd.org/doc/handbook/ports-using.html
Everything you see matches the expected behaviour according to
your problem description:
> I believe the ports tree was generated when the OS was installed,
> [...]
> # portsnap fetch
> [...]
> # portsnap fetch update <mistakenly left fetch in the cmd>
> [...]
> /usr/ports was not created by portsnap.
Whatever you have fetched, it was never extracted; what is still
present in /usr/ports is not "compatible" with portsnap, that's
why my suggestion to start with a fresh snapshot as explained
above.
--
Polytropon
Magdeburg, Germany
Happy FreeBSD user since 4.0
Andra moi ennepe, Mousa, ...
More information about the freebsd-questions
mailing list