HaikuPorts
  • Login
  • Preferences
  • Help/Guide
  • Wiki
  • Timeline
  • Roadmap
  • View Tickets
  • Search
  • Port Log
  • Blog

Context Navigation

  • ← Previous Ticket
  • Next Ticket →

Ticket #450 (closed enhancement: fixed)

Opened 5 years ago

Last modified 5 years ago

Haikuporter doesn't check for hg, cvs, svn, git before trying to use them

Reported by: scottmc Owned by: jrabbit
Priority: normal Milestone: haikuporter version 1.0
Component: haikuporter Version:
Severity: normal Keywords:
Cc:

Description

Haikuporter needs to have checks added for hg, cvs, svn, git, etc before trying to make use of them and if they aren't installed prompt the use to use installoptionalpackage xxx
to install it, or prompt the user with a y/n prompt to install it.

Attachments

try.patch​ (2.3 KB) - added by jrabbit 5 years ago.

Download all attachments as: .zip

Change History

comment:1 Changed 5 years ago by augiedoggie

I think it would probably be better to put them into the dependencies of the bep file.(It would be nice if haikuporter supported the notion of "build dependencies" instead of just runtime dependencies)

Otherwise the same could be said about all the other tools needed to build software.(i.e. have checks before trying to use wget, make, gcc, autotools, patch, diff, etc...)

comment:2 Changed 5 years ago by scottmc

I think we can assume autotools, patch diff, make, svn and wget, but should do runtime or buildtime checks for cmake, cvs, git, hg, bzr, and others that aren't part of the development optional packages.

Any idea on how we would go about checking the build dependencies? Perhaps make use of sqlite or test for their presence?

So maybe we have a task to update any bep files that use cmake or pull the source from a cvs/git/hg/bzr repo to have their dependencies updated.

comment:3 Changed 5 years ago by augiedoggie

I had planned on adding dependency checking a long time ago but I held off because of a lack of package management. I think it would be much easier to use the future Haiku package management tools to query what is installed or not.

comment:4 Changed 5 years ago by jrabbit

What we do in Fink is have a "virtual package" representing the existence of system utilities. If you don't want to add dependencies now you could just run each in a try/except...

comment:5 Changed 5 years ago by jrabbit

  • Owner changed from brecht to jrabbit

Alright go ahead and make this a GCI task. This seems more interesting at the moment then the other haikuports issues and quicker.

comment:6 Changed 5 years ago by jrabbit

  • Status changed from new to assigned

comment:7 Changed 5 years ago by scottmc

Haikuporter has a -y commandline option that is supposed to automatically answer yes to any questions that might be encountered during the install. So see if you can add support for this as well to the try patch. That is if say hg isn't present it will automatically try to install hg. Here's what it does with the current patch.

/boot/develop/haikuporter> haikuporter -c -d -y joe
Matching License (GNU GPL v1) found in /boot/system/data/licenses
Cleaning work directory...
No dependencies
Source checkout: hg+http://joe-editor.hg.sourceforge.net:8000/hgroot/joe-editor/joe-editor
/bin/sh: hg: command not found
Do you want to install hg? [Y/n]

Changed 5 years ago by jrabbit

  • attachment try.patch​ added

comment:8 Changed 5 years ago by jrabbit

Resubmitted on GCI.

comment:9 Changed 5 years ago by scottmc

you're on the right track, but the -y should prevent the y/n prompt from even appearing. You are checked it too late. Try checking for it prior to displaying the message and if -y is used then skip printing the prompt and just do the install. But also make sure entering an N will stop haikuporter and exit gracefully.

comment:10 Changed 5 years ago by scottmc

  • Resolution set to fixed
  • Status changed from assigned to closed

fixed in r1224. Thanks jrabbit.

Note: See TracTickets for help on using tickets.

Download in other formats:

  • Comma-delimited Text
  • Tab-delimited Text
  • RSS Feed

Trac Powered

Powered by Trac 0.13dev-r10686
By Edgewall Software.

Visit the Trac open source project at
http://trac.edgewall.org/