Pacman

Historical bug tracker for the Pacman package manager.

The pacman bug tracker has moved to gitlab:
https://gitlab.archlinux.org/pacman/pacman/-/issues

This tracker remains open for interaction with historical bugs during the transition period. Any new bugs reports will be closed without further action.
Tasklist

FS#15969 - [pacman] Additional warnings

Attached to Project: Pacman
Opened by Kyle Keen (keenerd) - Monday, 17 August 2009, 20:56 GMT
Last edited by Xavier (shining) - Monday, 07 September 2009, 14:26 GMT
Task Type Feature Request
Category General
Status Closed
Assigned To No-one
Architecture All
Severity Very Low
Priority Normal
Reported Version 3.3.0
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:

There is a gap in all of Arch's documentation regarding an undefined behavior in pacman. This behavior is mostly undocumented. The Beginner's Guide does not even tell you it is bad, but rather uses the undefined behavior in examples and implies that all packages should be installed by these means. The man page also makes no mention of it. Needless to say, it is not common knowledge, but somehow implied by Arch's nature. It would almost be an amusing right of passage, if it were not so easy to brick your system using this command. While all the documentation could be corrected, it would be more effective to add a warning to pacman whenever someone attempts the horrible action.

For example:
$ pacman -Sy python
Warning: You are synchronizing without updating. Recommend running "pacman -Syu python".

Additional info:
* package version(s)
* config and/or log files etc.


Steps to reproduce:
This task depends upon

Closed by  Xavier (shining)
Monday, 07 September 2009, 14:26 GMT
Reason for closing:  Won't implement
Additional comments about closing:  see last comment
Comment by Kyle Keen (keenerd) - Monday, 17 August 2009, 21:00 GMT
::sighs::
s/right/rite/g
Silly spell check.
Comment by Xavier (shining) - Tuesday, 18 August 2009, 07:43 GMT
pacman -Syu python is not a valid command
Though there was a request for it :  FS#15581 , but there is no indication that this will be implemented

Anyway, this request looks as strange to me as the other one.
pacman -Sy python is exactly the same as pacman -Sy; pacman -S python
How can you prevent the latter?
Comment by Allan McRae (Allan) - Tuesday, 18 August 2009, 09:51 GMT
Also, "pacman -Sy" is perfectly fine if the distro using pacman is not rolling release.
Comment by Xavier (shining) - Tuesday, 18 August 2009, 09:54 GMT
I am curious why this issue is making so much noise these days.
Didn't we run into similar problems in the past? I doubt the last readline/libjpeg rebuilds were the first ones.
I also doubt all dependencies were very precise before, and aren't anymore.
Comment by Allan McRae (Allan) - Tuesday, 18 August 2009, 10:30 GMT
versioned deps... they are actually evil!
Comment by Kyle Keen (keenerd) - Tuesday, 18 August 2009, 11:42 GMT
Huh, I forgot about other non-Arch distros.

Xavier, I was an Arch user for three years before I even heard of this problem. Even after the libjpeg/libreadline incident, there has not been any effort to inform users. (Or even mention the it in the documentation!) Unless users follow the lists/boards, this will just happen again every year or so.

Communicating to users seems to be a big issue all around. After using Arch for two years, I heard that "you should check archlinux.org every time before updating". This is preposterous. Pacman does not make me find dependencies, why does it make me find news?

I get the feeling that this current request will sit for a while, with a few valid (but unconfirmed) reasons against it, until it is closed due to indecision. My next request will be one that design-by-committee will love, and hopefully it will get through. Basically, every "pacman -Sy" or "pacman -Su" should ping out to "archlinux.org/recent_news.txt". New news? Echo it out, automatically. The devs can then inform the entire Arch userbase in a fell swoop, even if the person does not follow Arch development. Other distros would point it to their own news.

By the way, this can almost be emulated using the current system. Just make an archlinux-news package, completely empty and only containing a post-install message. Give it the same special privilege of pacman, so that it forces itself to update first. Opting out would be easy, just remove the package. I will put something basic on the AUR, along the lines of "alunn", but for pacman/console.
Comment by Xavier (shining) - Tuesday, 18 August 2009, 12:21 GMT
Which documentation? Afaik all the references to "pacman -Sy foo" are in the wiki.
And the wiki is maintained by the community, i.e. the users. It's up to you to fix it :)
Comment by Kyle Keen (keenerd) - Tuesday, 18 August 2009, 13:18 GMT
It is not even in the manual, and the man page is not maintained by the community. People who RTFM don't know about the issue. The hundreds of "pacman -Sy foo" commands polluting the wiki proves the devs have done a horrible job of telling people that -Sy is bad. (Seriously, http://www.google.com/#hl=en&q="pacman+-Sy"+site%3Awiki.archlinux.org return 577 hits. I've read the first 100, all are examples and none are warnings. Way to fail on educating the users.)

Regarding automatic news:
Packaging and SyncFirst-ing the news won't work, then there will just be a constant nag cycle of "News has updated, would you like to update this first?". And then people will just opt out. Working on a patch for pacman...



Comment by Xavier (shining) - Tuesday, 18 August 2009, 13:35 GMT
I just checked man pacman, the "pacman -Sy foo" command is not even explicitly documented. So it's obviously NOT after reading the man page that people start to using this command. Besides, as Allan already said, the problem with -Sy foo is specific to Arch Linux (or at least rolling release systems), while pacman man-page is meant to be general.

It is indeed very likely after reading the wiki, which is NOT maintained by the developers, but by the community, which means YOU.

Don't bother transforming pacman into a news notifier, this will never be accepted. But things like alunn are fine. For the console, there should be rss feedreader for the console. Feel free to use one.

Otherwise, there is an ongoing discussion about how to make the dependency system more robust :
http://www.archlinux.org/pipermail/pacman-dev/2009-August/009158.html
Comment by Xavier (shining) - Monday, 07 September 2009, 12:32 GMT
To sum up :
* arch wiki has to be fixed by the community (for instance I checked and rephrased this section : http://wiki.archlinux.org/index.php/Enhancing_Arch_Linux_Stability#Avoid_Certain_Pacman_Commands)
* if someone really needs automatic warnings, your own wrapper takes care of that now : http://kmkeen.com/pacmatic/

So I consider this task closed :)
Comment by Kyle Keen (keenerd) - Monday, 07 September 2009, 13:16 GMT
Yes, after six years the -Sy issue is finally common knowledge, but only among current forum readers. It will pop up again when we get a crop of new users. The information won't be found unless they already know to look for it. Needs more prominent placing.

Pacmatic is a prototype of what some of the proposed fixes could look like / integrate into pacman. Think of it as attached code for the feature request, and it is only on the AUR to speed up finding bugs. Also, there are a slew of "bugs" (gaps and inconsistencies, really) in pacman that make wrapping certain operations impossible. Things would be much smoother as a first class component of pacman.

Comment by Xavier (shining) - Monday, 07 September 2009, 14:26 GMT
There is nothing wrong with pacman itself.
The problem is with the packages.

Ironically, the usage of only forward versioned dependencies seem to do more harm than good.
But the usage of strict/accurate dependencies could be automated, as seen in :
http://www.linux-archive.org/archlinux-pacman-development/352524-add-support-so-dependencies.html

You might want to open a feature request for this "so deps" stuff, after reading the whole discussion, if you understand and support the idea.

More generally, here are the different ways I see to deal with this issue :
- fix the packages (either manually or with features like sodepends)
- change your way of using arch, by doing systematic system upgrade (-Syu)
- change distribution

Loading...