#12905: package_repo requires a url in repo-info file which needs eval
---------------------------+----------------------------
Reporter: kallisti5 | Owner: nobody
Type: enhancement | Status: new
Priority: normal | Milestone: Unscheduled
Component: - General | Version: R1/Development
Resolution: | Keywords: package_repo
Blocked By: | Blocking:
Has a Patch: 0 | Platform: All
---------------------------+----------------------------
Comment (by kallisti5):
So I did some digging into this... definitely an issue.
1. repo.info is used to generate repo file (binary BRepositoryInfo)
2. url param is required in this file (essentially requiring repo to know
where it will live before the repo file is generated) Repo's can't be
"moved" to new URL's
1. http://cgit.haiku-
os.org/haiku/tree/src/kits/package/RepositoryConfig.cpp#n107
2. http://cgit.haiku-
os.org/haiku/tree/src/kits/package/RepositoryInfo.cpp#n260
3. BRepositoryInfo (repo) file is pulled into
/boot/system/cache/repository_info and used as the "inventory of
repositories" for pkgman. During this pull process
ActivateRepositoryConfigJob overwrites url with where the repo "really
exists"
So:
* url is required in repo.info for the remote repository when it is
constructed
* url is used at various places during the repo addition to pkgman
* ActivateRepositoryConfigJob "rewrites" url to be where the repo was
actually pulled from.
* This is the key, it seems to "ignore" all the url work we've done
thus far.
* http://cgit.haiku-
os.org/haiku/tree/src/kits/package/ActivateRepositoryConfigJob.cpp#n61
* repo binary descriptor is stored in /boot/system/cache/repository_info
It looks like the strict "url needs to be set" requirement in
BRepositoryInfo could be lifted...
* url requirement omitted from repo.info
* proper checks for url put in place based on activity
I've been playing with a repo that omits the url field... however haven't
gotten the correct process outlined yet and actually using this repo still
fails. http://unixzen.com/testrepo, http://unixzen.com/testrepo/repo.info
--
Ticket URL: <https://dev.haiku-os.org/ticket/12905#comment:5>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.