Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Using your OS' package manager IS C's package management. Is it really that difficult to use apt, pacman, or BSD's "pkg"?


This. Wish I could upvote this 10 times.


What if I'm using 10 different OS?

I can still push the file on git and it works everywhere else.


git is not a package manager. It does not handle many things a package manager does.


GP never said it was.

But it does successfully replaces the need of using one, with less problems for certain situations.


Yes, I do use git submodules as well sometimes.

If you do not need the features of a package manager, then git submodules is great indeed.


The reply was also not about submodules. “Push” makes it clear.


That makes it even worse! If it is not submodules, then it is just copying a file into a repo with no version tracking against upstream, no update path, and no way to even know when there is a security fix.

Package managers already use git where appropriate under the hood. Arch's PKGBUILD sources pull from git repos, FreeBSD's ports can fetch from git, Gentoo ebuilds support git-r3. The fetching is not the hard part. What a package manager gives you on top of that is dependency resolution, version constraints, conflict detection, reproducible builds, and clean removal. "git push" gives you none of that.

And since I did not really address kreco's point properly: if the concern is cross-platform support across many OSes, tools like vcpkg and Conan exist specifically for this: cross-platform C/C++ dependency management with one workflow regardless of target. pkgsrc runs on 20+ platforms with the same build recipes. A header file in a git repo gives you none of that, it just gives you the illusion of portability until you hit a platform where it does not compile or links against the wrong thing.

If your workflow does not need any of those features, then yeah, sure, but then you are not solving C's "package management problem", you are just ignoring it.

In any case, the original comment called C's package management "unfriendly", and the counter-argument has somehow arrived at "just copy files into your repo and push". Comparing that to what a package manager does is absurd.


I don't think either me or GP compared this to a package manager. "Replacing usage" doesn't mean "it's the same".



That's just pushing a file to git.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: