Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

suggestion related to package dependencies. #26

Closed
Ashishjshetty opened this issue Oct 14, 2016 · 5 comments
Closed

suggestion related to package dependencies. #26

Ashishjshetty opened this issue Oct 14, 2016 · 5 comments

Comments

@Ashishjshetty
Copy link
Contributor

Hi,
while using your module i faced a complication that the package requires legacy nodejs installed in the system, while i prefer to build one from source, whenever i have to install the .deb file built from the module i have to use --ignore-depends flag to bypass dependency failure. Now this is fine when i am manually installing the package, this may not work if for instance i will add a repository to my package manager to provide update automatically, which i am planing to do. so maybe not include forced nodejs as package dependency and ask user to add nodejs if they want in their package.json file. if he feels its necessary.

      `if [ -z "$package_dependencies" ]; then
               package_dependencies=$(jq -r '.node_deb.dependencies' package.json)
              if [[ "$package_dependencies" == 'null' ]]; then
                     package_dependencies="nodejs" #remove nodejs or have some alternate solution.
             else
                     package_dependencies="nodejs, $package_dependencies" #remove nodejs or have some alternate solution.
             fi
       fi`

Maybe i am missing something, What do you think? Thanks You.

@heartsucker
Copy link
Owner

One option would be to use the --template-control option to pass in a template for the control file with the dependencies hard coded and to not use the {{ node_deb_package_dependencies }} notation. This will avoid injecting nodejs (or anything else from package.json) and still let you specify your dependencies.

I think there is a fix I can make that won't break backwards compatibility, but I won't have time to implement it for a few days at least.

@Ashishjshetty
Copy link
Contributor Author

Sure, if there is anything I can do , let me know, I will look into what
you suggest ed. Thank you.

On Oct 14, 2016 5:06 PM, "heartsucker" notifications@github.com wrote:

One option would be to use the --template-control option to pass in a
template for the control file with the dependencies hard coded and to not
use the {{ node_deb_package_dependencies }} notation. This will avoid
injecting nodejs (or anything else from package.json) and still let you
specify your dependencies.

I think there is a fix I can make that won't break backwards
compatibility, but I won't have time to implement it for a few days at
least.


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
#26 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AGISJBEoWgvlFOTyJGcWI2ZrPKwwp4Zlks5qz2k2gaJpZM4KW58P
.

@Ashishjshetty
Copy link
Contributor Author

hi @heartsucker ,
I was thinking maybe we can add another option something like node_deb.no_node = true in package.json and check if is set ,ignore nodejs dependency and in all other cases inject nodejs dependency which will allow backwards compatibility. What do you think?, If you want i will make the necessary changes and send a PR.

@heartsucker
Copy link
Owner

@Ashishjshetty Your idea is similar to what I was considering implementing, but I think this would start creeping into a few too many features/flags. Right now node-deb uses reasonable (IMO) defaults for everything but provides the ability to override everything else via templates. I think I'm going to decline your offer to add this feature at the moment.

@Ashishjshetty
Copy link
Contributor Author

yes i thought the same, will go with template control option for now, Thank You.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants