sqitchers / homebrew-sqitch

Homebrew Formulas for Sqitch
22 stars 10 forks source link

No need to install postgresql locally #24

Closed zemd closed 7 years ago

zemd commented 7 years ago

I am using postgresql inside my vagrant image locally for development, so I need to avoid additional postgresql installation.

theory commented 7 years ago

Well this is a fundamental challenge with packaging systems. Sqitch for Postgres requires that psql be installed, and doesn't care how. But Homebrew provides no other way to specify the requirement, and I wouldn't want to get any reports that Sqitch didn't work because installing sqitch_pg didn't install psql.

zemd commented 7 years ago

@theory but my pull request makes postgres optional, so if users want install postgres with sqitch package they need specify --with-postgres flag.

theory commented 7 years ago

If there was a way to make it --without-postgres, I'd be fine with it.

If not, perhaps another approach would be to create separate packages that exclude the database servers, like sqitch_dbdpg. It'd be the same as sqitch_pg, but without requiring postgres. Would need the same for sqitch_dbdmyql, etc.

zemd commented 7 years ago

@theory done

:recommended generates an implicit without-foo option, meaning that the dependency is enabled by default and the user must pass --without-foo to disable this dependency.

so users will install postgres by default, but if they do not want they need to add --without-postgres flag

theory commented 7 years ago

That's perfect, thank you! I also added this option to sqitch_mysql and documented the options in 3c9b7e031787e3c16983748f3d3eeca75e9b52cb.