| Summary: | output from yuminstall saved into yum history. | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | tz <thomas> | ||||||
| Component: | yum | Assignee: | Seth Vidal <skvidal> | ||||||
| Status: | CLOSED NOTABUG | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | medium | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 14 | CC: | ffesti, james.antill, maxamillion, pmatilai, tla | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | All | ||||||||
| OS: | Linux | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2011-02-25 02:44:29 UTC | Type: | --- | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Attachments: |
|
||||||||
yum should not be used for scripting.
you should use repoquery if you want predictable output:
repoquery --installed -a
or
repoquery --installed -a --qf="%{name}.%{arch}"
That is the first I have heard of repoquery, but it seems to work. That doesn't help making logs of yum installs. It does the same bad formatting to some default narrow screen width, e.g. yum install -y `cat pkglist` 2>&1 | tee instlog. If yum doesn't think it is going to a tty, it should not assume anything about the terminal capabilities either way, or if it insists of having all the terminal formatting, there should be command line parameters or environment variables it would pay attention to so it can be changed from the default. (In reply to comment #2) > That is the first I have heard of repoquery, but it seems to work. repoquery has been in yum-utils for 3 yrs? maybe 4? quite a while. > That doesn't help making logs of yum installs. It does the same bad formatting > to some default narrow screen width, e.g. yum install -y `cat pkglist` 2>&1 | > tee instlog. why are you making logs of yum installs? If you want to know what a yum install did - use yum history yum history info will show you what the last yum transaction did, in detail. If you're looking to output a list of what is on the system for the purposes of installing another system a couple of options come up: 1. yum-debug-dump the yum-debug-restore 2. show-installed I had some disk problems and several critical files got damaged (e.g. S22messagebus links to /etc/init.d). I had 1700 installed packages. When I tried running "yum reinstall ...", somewhere near the top where it would scroll off, about 150 packages it said "removing from transaction". I really wanted to know what those were so I could do some other manual revalidation if my system is still flaky. Then there was the processing dependencies and the rest. If I say "yum reinstall x y z", it might not do z. But the only place I can tell that I know of is the actual yum output. yum history has that information. http://yum.baseurl.org/wiki/YumHistory OK, so tell me how to use "yum history" to indicate which packages were removed from the original "yum install" transaction. I don't even see a way of listing all the packages of the last transaction and the wiki page you point to has "yum history package-list" which says it is an invalid history sub-command. It's documented in "man yum", summary is that you can do "yum history info" to see the last transaction or "yum history list" to see a one line summary of the last N transactions (and then use: yum history list <id> -- to see that specific transaction). I did read the man page. When I did "yum reinstall ..." right at the top, it said "Removing XXXX from transaction" for about 100 packages. Which ones. When I do "yum history info", it shows the command line, lists the REINSTALLED packages, some scripting error stuff but DOES NOT LIST THE PACKAGES WHICH WERE NOT REINSTALLED. As far as I know this is only written out to the console. Or is there another option to show the difference between what I asked on the command line and what it actually did? > When I did "yum reinstall ..." right at the top, it
> said "Removing XXXX from transaction" for about 100 packages. Which ones.
> When I do "yum history info", [...] DOES NOT LIST THE PACKAGES WHICH WERE
> NOT REINSTALLED
> As far as I know this is only written out to the console.
That would be a pretty significant bug in the history code, and I don't see how it'd be possible ... and you'd be the only person who has seen it.
Maybe you are looking at the wrong transaction in the history, or don't have history recording set ... or something else.
It's hard to guess at what you are seeing, and what it means. But without more info. it would be very hard to convince me that what "yum history" shows isn't what happened.
Created attachment 481043 [details]
this was the output of the reinstall command
This shows the "remove" near the top
Created attachment 481046 [details]
yum history command output
I've attached the log and the history output. Near the top of the log you will find: Removing alsa-lib.x86_64 0:1.0.24-1.fc14 - u from the transaction Where can I find or derive this easily from the history output? > Removing alsa-lib.x86_64 0:1.0.24-1.fc14 - u from the transaction
Your command line does basically:
yum reinstall alsa-lib alsa-lib
...and there is a minor "bug" in the F14 yum which will print the above, which is telling you that "alsa-lib" was put into the transaction to be reinstall but that was then removed _from the transaction_ (only to be readded).
Nothing is being removed from the _system_.
ok, that makes some sense (with x86_64 + wine + a few others, they bring in the i686). It would be easier if it just said it was a duplicate. If the other "minor bug" isn't filed, it probably should be at least noted. |
Description of problem: "yum list installed" produces random line wraps and you cannot change the format Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. Do "yum list install" in a wide terminal window. Nothing overlaps 2. Do "yum list install | gawk '{print $1}'" You get versions or other trash in the output. 3. Actual results: Versions and junk interspersed with the package names Expected results: package names, or at least some command line option to tell it I don't want it to try to format it for a nonexistent width. If I have a pipe it should just put a space or tab between columns, or there should be options to fine-tune this. I want to be able to get a list of packages (so I can do a script to reinstall or install on a new system). There are ways around it but I shouldn't have to use a half dozen commands to pick out the list. Additional info: