pkg doesn't respect DEFAULT_VERSIONS

He *does* need to generate an INDEX file if he's using pkg(8) to scan the index file to determine if the install packages are out of date.
pkg(8) doesn't use INDEX, pkg-version(8) uses the INDEX. But besides that, if you update the ports tree with portsnap(8) the INDEX is already updated before the diffs are made. So with portsnap(8) the INDEX would be correct. Thus no need to run make -C /usr/ports index. However, if you update the ports tree with SVN or Git the INDEX may not be updated and in that case you would need to generate an updated one with make index.

The first is what's he's already doing and the second doesn't work because he's changed the defaults from the official FreeBSD settings.
Changing any of the DEFAULT_VERSIONS doesn't change anything in the INDEX. The INDEX is generated based on the contents of the Makefile of the ports.
 
You're still not getting it.
1) pkg-version is just pkg version. I'm not sure why you are making the distinction. it's still pkg(8)
2) The point is in yuri's case, the provided INDEX is WRONG. thus he needs to generate it so it's RIGHT for HIM

Changing any of the DEFAULT_VERSIONS doesn't change anything in the INDEX. The INDEX is generated based on the contents of the Makefile of the ports.
That's the ENTIRE point. Because he changed the DEFAULT_VERSIONS, the index is wrong for him. If he generates it himself, that new index does account for make.conf changes. That's the entire conversation of this thread.


P.S. And his new INDEX is only needed if he tells pkg version to check versions via index. If he tells it to check versions by using make against the ports tree, he doesn't need a regenerated index.
 
The point is in yuri's case, the provided INDEX is WRONG. thus he needs to generate it so it's RIGHT for HIM
Then just nuke /usr/ports and do a full portsnap fetch extract and be done with it.

Because he changed the DEFAULT_VERSIONS, the index is wrong for him.
As far as I know the content of the INDEX file doesn't change if you change any of the DEFAULT_VERSIONS. So I don't see why it would need to be recreated/generated if DEFAULT_VERSIONS is changed.
 
Then just nuke /usr/ports and do a full portsnap fetch extract and be done with it.

Which leaves him with a fresh, incorrect copy.
The portsnap INDEX is only accurate for users that not configured the options of a single port or changed the defaults.

As far as I know the content of the INDEX file doesn't change if you change any of the DEFAULT_VERSIONS. So I don't see why it would need to be recreated/generated if DEFAULT_VERSIONS is changed.

well, you know incorrectly. a regenerated index reflects the set options and defaults of the system generating it.
Try it. Change a port option or default that affects dependencies, then generate the index yourself and compare to the provided INDEX. Then try again with a ports tree with no customization. The INDEX on the latter tree should match what portsnap provides assuming you're on the same SVN revision. THe former will not.

P.S. or just generate the index, save it, change an option or default, and generate again, then note the newest index does not match the saved one (thus clearly options/defaults affects the contents of the index)
 
P.S. or just generate the index, save it, change an option or default, and generate again, then note the newest index does not match the saved one (thus clearly options/defaults affects the contents of the index)
Actually, I did just that. There were zero changes regardless of what I changed in DEFAULT_VERSIONS.

Edit: I stand corrected. It appears I was working with an older ports tree. It does indeed appear to change. Nice, learned something new today :)
 
Back
Top