# Portmaster and INDEX file



## YZMSQ (Nov 8, 2011)

Hi, folks:
I have used portmaster for a long time, and feel it's a great tool for maintaining one's ports, flawlessly. However, after perusing its manpage, I glean no idea how to specify a single INDEX file for portmaster, yet. Say, once I've fetched a single INDEX file from one mirror (Maybe this), and I want to use this one instead of that in ports tree for portmaster to do searching and maintaining work. Furthermore, the option "--index-only" and variables INDEXDIR, INDEXFILE and TMPDIR all have been tried and set, but still no go ( it'll fetch the INDEX from http://www.FreeBSD.org/ports/, regardless of the address set in MASTER_SITE_INDEX). So, have I skipped and misused some important options or variables? Thx in advance. :stud


----------



## wblock@ (Nov 8, 2011)

What are you hoping to achieve by using a custom index file?


----------



## YZMSQ (Nov 9, 2011)

wblock@ said:
			
		

> What are you hoping to achieve by using a custom index file?


Well, I just hope to find a way to do binary update of my packages. Say, I imagine, if I specify a custom single index file, from the mirror where binary packages live, for portmaster to see which port needs to be updated, so that way I can update it against that mirror, rather than the ports tree on my box or the index file from http://www.FreeBSD.org/ports/, both of which might be newer than my specified mirror. Thank you for your reply. :stud


----------



## YZMSQ (Nov 9, 2011)

And one more question: Why are there 4 INDEX files in ports tree? I see INDEX-6, INDEX-7, INDEX-8 and INDEX-9 reside there, but isn't ports tree independent of release version number, AFAIK?


----------



## wblock@ (Nov 9, 2011)

Ports are independent of the OS, but the index is not.  Look at the dates on those files.  Having four of them indicates that system has been upgraded from 6 to 7 to 8 to 9, or possibly that the ports tree has been copied from other systems with different versions of the OS.  You can delete the ones that don't apply to the current version.


----------



## phoenix (Nov 9, 2011)

YZMSQ said:
			
		

> And one more question: Why are there 4 INDEX files in ports tree? I see INDEX-6, INDEX-7, INDEX-8 and INDEX-9 reside there, but isn't ports tree independent of release version number, AFAIK?



There is only 1 ports tree, used by all versions of FreeBSD, true.  However, not all software in the ports tree can be compiled/installed on every version of FreeBSD.  Thus, the INDEX file will be different for each version of FreeBSD, as it will only include software that builds/runs on that version.


----------



## dougb@ (Dec 31, 2011)

YZMSQ said:
			
		

> Hi, folks:
> I have used portmaster for a long time, and feel it's a great tool for maintaining one's ports, flawlessly. However, after perusing its manpage, I glean no idea how to specify a single INDEX file for portmaster, yet. Say, once I've fetched a single INDEX file from one mirror (Maybe this), and I want to use this one instead of that in ports tree for portmaster to do searching and maintaining work. Furthermore, the option "--index-only" and variables INDEXDIR, INDEXFILE and TMPDIR all have been tried and set, but still no go ( it'll fetch the INDEX from http://www.FreeBSD.org/ports/, regardless of the address set in MASTER_SITE_INDEX). So, have I skipped and misused some important options or variables? Thx in advance. :stud



You're correct that MASTER_SITE_INDEX, INDEXFILE, and INDEXDIR are the right things to look at, but there is a bit of behind the scenes that you also need to know. The FreeBSD INDEX files are distributed in .bz2 format, so that is what portmater is looking for. If you compress your INDEX file then portmaster should  be able to find it and use it.

Another option if your uncompressed file is already in place is to use --no-index-fetch.


hope this helps,

Doug


----------

