[haiku-bugs] Re: [Haiku] #12917: get_package_dependencies needs to be refactored

  • From: "bonefish" <trac@xxxxxxxxxxxx>
  • Date: Sat, 20 Aug 2016 19:13:38 -0000

#12917: get_package_dependencies needs to be refactored
--------------------------------+----------------------------
   Reporter:  kallisti5         |      Owner:  kallisti5
       Type:  enhancement       |     Status:  new
   Priority:  normal            |  Milestone:  Unscheduled
  Component:  Kits/Package Kit  |    Version:  R1/Development
 Resolution:                    |   Keywords:
 Blocked By:                    |   Blocking:
Has a Patch:  0                 |   Platform:  All
--------------------------------+----------------------------

Comment (by bonefish):

 Replying to [comment:4 kallisti5]:

Replying to [comment:3 bonefish]:
Replying to [ticket:12917 kallisti5]:
The requirements of get_package_dependencies could be greatly
 cleaned up.

Which requirements?

The requirement for the repo.info and repo to know where they will exist
 ahead of time... it's ridiculous to have a package repository "need to
 know" where it will exist ahead of time... no other repo has this
 requirement *AND* the url in repo.info / repo is '''only''' used for
 get_package_dependencies.

 Again, you've got it the wrong way around: get_package_dependencies needs
 a URL for the package downloads. It was conveniently already available in
 the repository file, which is needed for dependencies resolution anyway.
 If the URL hadn't been in the repository file, it would have been passed
 as an additional parameter.

As for the mirror scenario... lets just use a UUID or something in
 repo.info plus a last updated timestamp in repo.

 I don't quite see the advantage, but feel free to change that.

**Current Behaviour**

get_package_dependencies takes in the following arguments:
  * Several binary local repo files which contain the url, and repo
 package inventory
  * These are pretty much http://packages.haiku-
 os.org/haikuports/master/repo/x86_64/current/repo generated from
 http://packages.haiku-
 os.org/haikuports/master/repo/x86_64/current/repo.info.

No, they are not the "current" repositories. You need to understand
 that the Haiku git repository '''defines''' the HaikuPorts package
 repositories. This provides us with the ability to build an old Haiku
 revision with the same packages repositories they matched originally. If
 you start building against the "current" repositories, you'll lose this
 build stability.

There have been multiple people commenting on how much of a pain it
 requiring code updates to Haiku any time a HaikuPorts package is updated.
 We have pretty advanced versioning schematics in the package definitions
 already... lets put them to good use.

 Maybe you could give some details on what you have in mind, because ATM I
 don't see a solution that could possibly work.

--
Ticket URL: <https://dev.haiku-os.org/ticket/12917#comment:5>
Haiku <https://dev.haiku-os.org>
Haiku - the operating system.

Other related posts: