Comments (8)
Yeah I think pacman -S list of dependencies
is enough. If a dependency is missing / uninstallable arch user can decide for himself to update the index. This would fit my workflow.
from ruby-install.
The problem with leaving the index not-updated, is we might install old/buggy versions of packages. Updating the index shouldn't break your system, until you update all packages? IMHO, if -Sy
is dangerous, the Arch developers should remove the -y
option.
from ruby-install.
I don't think you understand the problem @postmodern. I'll try to summarize from the linked thread and other conversations had numerous times in #archlinux.
Updating the index (-Sy
) and then installing a package (-S foo
) without updating the whole system can lead to a state of old and new software on the system at the same time (new foo
and old everything else).
This mixed state is officially "unsupported" in Arch (being the rolling release distro that it is) and if soname bumps happen to be occurring at the time you get into this state, it can very severely break your system.
Sy
will not be removed as it does exactly as is advertised and can be very useful when you know what it does and how it works -- this is the opinion of the Arch devs (and mine, though that's less important).
In general, Arch being rolling release and targeted at competent users means it's far better to assume they manage their own index correctly and simply doing pacman -S dep
will work as you expect than to do an automated -Sy
which is strongly advised against by the distro maintainers.
If -S foo
causes breakage because the user's index is out of date, that's their own fault. If ruby-install's -Sy
causes breakage, that's yours. Regardless of how likely either are (and I assert the latter is more likely than the former) the choice should be clear.
Again, -Sy
is not itself bad, just when it's done in an automated way.
from ruby-install.
Interesting. I expected the new dependencies of the new package to force other packages to be updated automatically. I guess that's a design limitation of pacman?
OK, I will remove the -Sy
.
from ruby-install.
Thanks for making this fix. I wouldn't call it a design limitation, just a design decision.
Perhaps an example:
- A user has firefox 3.0 and gimp 6.1 installed, both of which depend on libpng>=1.0
- An update comes out for libpng to version 1.2
- Arch maintainers release libpng 1.2, firefox 3.0-2 and gimp 6.1-2 which now depend on libpng>=1.2
- An update comes out for firefox to version 3.1
- Arch maintainers release firefox 3.1 which depends on libpng>=1.2
- Our user (incorrectly) says
pacman -Sy firefox
hoping to get this new version - pacman (correctly) installs firefox 3.1 and libpng 1.2
There's nothing here to tell pacman to update gimp since libpng 1.2 is >= 1.0 which is gimp's dependency.
However, our user's gimp is linked directly to /usr/lib/libpng.so.1.0 and is now broken. Sadface.
There are a few ways to avoid this situation:
- The user doesn't use Arch or any rolling release distro, they get new firefox in a few months.
- The user does
pacman -Syu
to update the index, the system, and get the new version of firefox (along with libpng and gimp). - The Arch maintainers set a hard constraint on firefox and gimp to libpng==1.0,
-Sy firefox
would produce an error for unresolvable dependencies. This error would indicate to them they need to update gimp too.
Arch as a group has chosen the second option, and simply instructed users to not use -Sy
(without u
) unless they know what they're doing. For example, -Sy firefox
would be fine and useful if a) the user did not want to update their system but wanted newer firefox and b) the user knew firefox wouldn't bring in any shared object library updates breaking other dependent packages or c) the user manually rebuilt those packages against the new library.
The third option might look attractive but it creates a huge headache for the repo maintainers due to the hard constraints making it difficult to move groups of inter-dependent packages from unstable -> testing -> core repositories. It also wouldn't even solve the specific use case for ruby-install since it would just error; having pacman -Sy firefox
also install gimp would be far too auto-magical for us Arch users.
And now you know more than you probably ever wanted about Arch Linux repository management.
from ruby-install.
@pbrisbin Thx for that description, I wasnt able to write my thoughts down that consistent!
from ruby-install.
Another thing I thought of, is that ruby-install only installs missing pacman packages. So we shouldn't ever install a new version of openssl. https://github.com/postmodern/ruby-install/blob/master/share/ruby-install/ruby-install.sh#L107-L111
from ruby-install.
Well, the fact that you'll only install new and not update doesn't change things. The scenario above would've still broken the user's gimp had step 6 been a fresh install of firefox.
from ruby-install.
Related Issues (20)
- Print an error if an unknown ruby is given
- CFLAGS unrecognized using 0.9.0 – working with 0.8.5 HOT 5
- `--with-opt-dir` doesn't prevent Ruby from seeing OpenSSL 3 headers/lib HOT 10
- `zcat` does not accept a file argument on macOS HOT 1
- Use OpenSSL 3 by default HOT 8
- Documentation for `--jobs` suggests you could omit a value, but it's required HOT 1
- Install FreeBSD Ruby 3.2.2 HOT 3
- doesn't make some simple yet very important checks before starting the installation process (e.g need permission when using --sytem flag) HOT 3
- Can't use installed truffleruby 23.1.0 with openssl HOT 6
- Installation of ruby 3.1.4 fails on macOS Sonoma 14.0 HOT 14
- Avoid running `brew` as root HOT 3
- Ruby install 2.6.0 confusing error for Homebrew install HOT 1
- openssl@3 support - EVP_MD_CTX_get_pkey_ctx - incomplete definition of type struct evp_md_ctx_st - use [email protected] HOT 6
- Install homebrew [email protected] for Ruby <= 3.0 and [email protected] for Ruby >= 3.1
- Add tests for the various rubies own `functions.sh` logic HOT 1
- Convert `dependencies.txt` files into `dependencies.sh` files HOT 1
- Installation failing due to sudo failure HOT 3
- Wrong file extension? HOT 2
- openssl and other isses when installing Ruby 2.7.5 HOT 2
- Can't install 3.4.0-preview1 HOT 10
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ruby-install.