[haiku-bugs] Re: [Haiku] #13141: HaikuDepot - Add system requirement to HPKG packages

  • From: "michel" <trac@xxxxxxxxxxxx>
  • Date: Wed, 04 Jan 2017 08:44:36 -0000

#13141: HaikuDepot - Add system requirement to HPKG packages
--------------------------+------------------------------------------------
   Reporter:  lelldorin   |      Owner:  nobody
       Type:              |     Status:  reopened
  enhancement             |  Milestone:  R1
   Priority:  normal      |    Version:  R1/Development
  Component:  - General   |   Keywords:  haikudepot,hpkg,system requiroment
 Resolution:              |   Blocking:
 Blocked By:              |   Platform:  All
Has a Patch:  0           |
--------------------------+------------------------------------------------

Comment (by michel):

 I have used "conflicts" and "replaces", actually. As I learned more about
 packaging, I realized that some things I had packaged as "gcc2" should
 have been "any", that QT apps should have been indicated as "_x86" in the
 file name and so on. It works flawlessly. The difference between
 "replaces" and "obsoletes" is a bit unclear IMHO

 No, I am not thinking of a random PDF reader, more something like

 The package blabla.HPKG requires one of the following dependencies. Select
 one of the following actions:

 O Option 1: Install BePDF_x86
 O Option2: Install DocumentViewer_x86
 O Do not install either package
 O Cancel Installation of blabla.HPKG

 Just like we handle missing dependencies now. If one of the two is already
 installed, it can be assumed that that is the one the user wants to use. I
 ''think'' the deb and rpm systems have something like this.

 In the .PackageInfo it could be indicated something like this, using
 notation familiar from bash:


 {{{
 requires {
           BePDF_x86 || DocumentViewer_x86
 }

 }}}

 Two alternatives should be a reasonable number, or three at most: we don't
 want to see a list of twenty text editors here.

 But enough of that. let's brainstorm how we could do the hardware thing
 pre-installation. If we have an ''optional'' field called "hardware", in
 which the packager can specify certain pre-approved terms, just like we
 now have for "architecture" (although that one is compulsory), we could
 have a section like this


 {{{
 hardware {
           webcam
          scanner
 }

 }}}


 the packaging system sees that entry and when the user tries to install
 blabla.HPKG, you get the following alert

 blabla.HPG requires the following hardware to be present and functional
 - A webcam
 - A scanner
 Please select one of the following options:

 O Install blabla.HPKG
 O Do not install blabla.HPKG


 Exactly what pieces of hardware we would allow the packager to list would
 be a matter for debate. Anyway, it would have to remain open-ended as new
 hardware comes to market. But either way, if the user wants to go ahead
 thinking "OK, I'll fix the webcam afterwards" that should still be
 possible. All you get is an alert, we're not preventing you from
 installing. Also, no need for the packaging system to do a hardware
 analysis.

 That does not change my opinion that you should still put that information
 in the "description" field, and/or program your app accordingly, BTW.

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

Other related posts: