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

  • From: "kallisti5" <trac@xxxxxxxxxxxx>
  • Date: Mon, 19 Sep 2016 21:42:12 -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:  1                 |   Platform:  All
--------------------------------+----------------------------

Comment (by kallisti5):

 Replying to [comment:15 bonefish]:

Replying to [comment:14 kallisti5]:
I can't for the life of me figure out why we have to have a
 BRepositoryConfig *AND* a BRepositoryInfo.  They contain the exact same
 freaking info just formatted slightly different.

Huh?

BRepositoryInfo:
{{{
            BString             fName;
            BString             fOriginalBaseURL;
            BString             fVendor;
            BString             fSummary;
            uint8               fPriority;
            BPackageArchitecture    fArchitecture;
            BStringList         fLicenseNames;
            BStringList         fLicenseTexts;
}}}

BRepositoryConfig:
{{{
            BString             fName;
            BString             fBaseURL;
            uint8               fPriority;
            bool                fIsUserSpecific;
            BEntry              fEntry;
}}}

How is that the same?

 Forgot this one:

 BRepositoryCache:
 {{{
             BEntry          fEntry;
             BRepositoryInfo fInfo;
             bool            fIsUserSpecific;
 }}}


 Ok, you're correct, BRepositoryInfo has a bit more in it than what I
 originally described.

 So my original patch didn't go too far. (except I removed a url check in
 BRepositoryConfig I shouldn't have)

 I drop the url information from BRepositoryInfo (and thus
 BRepositoryCache) and inject the url via the create_repository_config
 (incorrectly named create_package_config) in my diagram.

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

Other related posts: