New configuration scheme changes, round 1.
- Configuration file 'xbps-conf.plist' has been splitted off into two files: conf.plist and repositories.plist. By default they are stored in etc/xbps. - Changed some members in xbps_handle struct, mostly to make it easy to change its value in {cache,root}dir and conffile. - Made xbps_init() release proplib objects as soon as we don't need them, that way it uses 35% less of memory or in some cases even more. There will be another commit that will implement to read new virtualpkg settings by the user, as specified in: http://code.google.com/p/xbps/issues/detail?id=12
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
-include ../config.mk
|
||||
|
||||
CONF_FILE = xbps-conf.plist
|
||||
CONF_FILE = conf.plist repositories.plist
|
||||
|
||||
.PHONY: all
|
||||
all:
|
||||
|
27
etc/conf.plist
Normal file
27
etc/conf.plist
Normal file
@@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- Default root directory, defaults to / -->
|
||||
<key>root-directory</key>
|
||||
<string>/</string>
|
||||
|
||||
<!-- Default cache directory to store downloaded binary packages.
|
||||
If string begins with '/' it will be treated as full path,
|
||||
otherwise it will be treated as relative to the root-directory. -->
|
||||
<key>cache-directory</key>
|
||||
<string>var/cache/xbps</string>
|
||||
|
||||
<!-- Default global limit of cached connections when fetching -->
|
||||
<key>fetch-cache-connections</key>
|
||||
<integer>10</integer>
|
||||
|
||||
<!-- Default per-host limit of cached connections when fetching -->
|
||||
<key>fetch-cache-connections-per-host</key>
|
||||
<integer>6</integer>
|
||||
|
||||
<!-- Default timeout limit for connections, in seconds. -->
|
||||
<key>fetch-timeout-connection</key>
|
||||
<integer>30</integer>
|
||||
</dict>
|
||||
</plist>
|
25
etc/repositories.plist
Normal file
25
etc/repositories.plist
Normal file
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<array>
|
||||
<!-- You can specify here your list of repositories,
|
||||
the first repository that contains a package will
|
||||
be used for most targets in xbps-bin(8) and
|
||||
xbps-repo(8), with the exception for updating
|
||||
on which all repositories will be looked at and
|
||||
the newest version will be choosen.
|
||||
|
||||
Optionally a non default HTTP port can also be
|
||||
specified like that:
|
||||
|
||||
http://foo.local:8080/xbps-repo
|
||||
|
||||
The order matters, and the top-most matching a package
|
||||
pattern or name will be used.
|
||||
|
||||
By default we use the official "public" repositories.
|
||||
you can add your own local repositories by specifying
|
||||
the path to the directory. -->
|
||||
<string>http://xbps.nopcode.org/repos/current</string>
|
||||
</array>
|
||||
</plist>
|
@@ -1,83 +0,0 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<!-- Default root directory, defaults to / -->
|
||||
<key>root-directory</key>
|
||||
<string>/</string>
|
||||
|
||||
<!-- Default cache directory to store downloaded binary packages.
|
||||
If string begins with '/' it will be treated as full path,
|
||||
otherwise it will be treated as relative to the root-directory. -->
|
||||
<key>cache-directory</key>
|
||||
<string>var/cache/xbps</string>
|
||||
|
||||
<!-- Default global limit of cached connections when fetching -->
|
||||
<key>fetch-cache-connections</key>
|
||||
<integer>10</integer>
|
||||
|
||||
<!-- Default per-host limit of cached connections when fetching -->
|
||||
<key>fetch-cache-connections-per-host</key>
|
||||
<integer>6</integer>
|
||||
|
||||
<!-- Default timeout limit for connections, in seconds. -->
|
||||
<key>fetch-timeout-connection</key>
|
||||
<integer>30</integer>
|
||||
|
||||
<!-- Repository list -->
|
||||
<key>repositories</key>
|
||||
<array>
|
||||
<!-- You can specify here your list of repositories,
|
||||
the first repository that contains a package will
|
||||
be used for most targets in xbps-bin(8) and
|
||||
xbps-repo(8), with the exception for updating
|
||||
on which all repositories will be looked at and
|
||||
the newest version will be choosen.
|
||||
|
||||
Optionally a non default HTTP port can also be
|
||||
specified like that:
|
||||
|
||||
http://foo.local:8080/xbps-repo
|
||||
|
||||
The order matters, and the top-most matching a package
|
||||
pattern or name will be used.
|
||||
|
||||
By default we use the official "public" repositories.
|
||||
you can add your own local repositories by specifying
|
||||
the path to the directory. -->
|
||||
<string>http://xbps.nopcode.org/repos/current</string>
|
||||
</array>
|
||||
|
||||
<!-- Virtual packages -->
|
||||
<key>virtual-packages</key>
|
||||
<array>
|
||||
<!-- This dictionary sets that we _always_ want
|
||||
the "dcron" package to be the default cron-daemon
|
||||
package, over other alternatives.
|
||||
|
||||
Another option might be to change it to the
|
||||
"cronie" package, or any package that "provides"
|
||||
"cron-daemon-0". -->
|
||||
<dict>
|
||||
<key>virtual-pkgver</key>
|
||||
<string>cron-daemon-0</string>
|
||||
<key>target-pkgpattern</key>
|
||||
<string>dcron>=0</string>
|
||||
</dict>
|
||||
|
||||
<!-- Uncomment this dictionary to prefer the "xbps-devel"
|
||||
package (snapshot from mercurial repository) rather
|
||||
than the official stable version (don't do this if
|
||||
you are not a developer :-) -->
|
||||
|
||||
<!-- #### REMOVE THIS LINE TO ENABLE ####
|
||||
<dict>
|
||||
<key>virtual-pkgver</key>
|
||||
<string>xbps-9999</string>
|
||||
<key>target-pkgpattern</key>
|
||||
<string>xbps-devel>=0</string>
|
||||
</dict>
|
||||
#### REMOVE THIS LINE TO ENABLE #### -->
|
||||
</array>
|
||||
</dict>
|
||||
</plist>
|
Reference in New Issue
Block a user