OS2 World Community Forum
OS/2, eCS & ArcaOS - Technical => Setup & Installation => Topic started by: Pete on February 13, 2025, 09:02:59 am
-
Hi All
Posted this earlier but it seems to have disappeared...
This is a question for our *nixy-knowledgeable friends.
Due to distraction - wife having diabetic problems - I managed to delete the contents of /usr/bin and I don't have an up-to-date backup...
I fired up ANPM which downloaded and installed the current yum package(s) and I am wondering if there is anyway to reinstall my "missing" files to /usr/bin from the various packages within the /var/cache/yum subdirectories - doesn't look possible from within ANPM...
All help appreciated
Pete
-
Hi Pete !
Did you check with yum command ?
You can get a list of all installed packages using:
yum list installed *
or yum list installed * >mylist.txt (save into mylist.txt)
Then check yum help
yum --help
There is a re-install packages option.
Regards
-
Hello Remy
Some time ago people on this forum help me create this article:
- https://www.os2world.com/wiki/index.php?title=RPM:_Switching_from_i686_to_Pentium4
It has a different scope, and maybe it is outdated for switching to i686 to Pentium 4 (Maybe there are easy procedures today), but there is a REXX script that may help you proving the information of what was installed on your system using the same "yum list" command.
Check it out to see if it works for you.
Regards
-
Hello Remy
Some time ago people on this forum help me create this article:
- https://www.os2world.com/wiki/index.php?title=RPM:_Switching_from_i686_to_Pentium4
It has a different scope, and maybe it is outdated for switching to i686 to Pentium 4 (Maybe there are easy procedures today), but there is a REXX script that may help you proving the information of what was installed on your system using the same "yum list" command.
Check it out to see if it works for you.
Regards
It looks like you are missing some installed packages (e.g. ASPIROUT AN base installed)
Because you do a grep install (fist line which may contain INSTALL is taken too like: in french Paquets installés)
I think that first comment line may always have less than 3 words.
May I suggest something close to your rexx but not using a temporary output file during the process:
/* REXX to get just package names from RPM installed output */
rc = SysLoadFuncs()
Parse Arg fileout
rc = SysFileDelete(fileout)
list = ''
NEWQ= 'YUM'||time(S)
NEWQ=RXQUEUE('Create',NEWQ)
oq = RXQUEUE('Set',NEWQ)
address cmd 'yum list installed * 2>&1 |RXQUEUE 'NEWQ' /FIFO'
Do queued()
parse pull pkgs
If words(pkgs)>2 then do
parse var pkgs package'.'.
list = Strip(list || ' ' || package)
End
End
rc = Lineout(fileout,'yum install -y 'list)
call RXQUEUE 'Delete',NEWQ
call RXQUEUE 'Set',oq
Return
Regards
-
Hi All
Thanks for responses to date.
Sadly they all seem to show the current installed list not the list of packages that existed prior to my cockup.
Looks like reinstalling yum has wiped out the package list and history.
I tried reinstall:
yum reinstall J:\var\cache\yum\netlabs-rel\packages\sane-backends-1.0.28-2.oc00.pentium4.rpm
which resulted in
No package matched to remove: sane-backends-0:1.0.28-2.oc00
Error: Problem in reinstall: no package matched to remove
I also tried:
yum install J:\var\cache\yum\netlabs-rel\packages\sane-backends-1.0.28-2.oc00.pentium4.rpm
which resulted in packages being downloaded.
I guess I will have to reinstate the missing bits 1 (+whatever dependencies) at a time ...
Thanks
Pete
-
And here we see the advantage of WARPIN over RPM/YUM. Sorry I don't like RPM, never did even when I encountered it 20 odd years ago and I admit I use linux Mint now in parallel with OS/2 (ArcaOS) because of Firefox because it doesn't use rpm/yum as a program loader.
Rant over and back to Pete's problem. You need to get a copy of ARCVIEW-22 and its tools, it will allow you to get individual files from the various rpm packages and put them where you want them. It is what I use when I can't find what I want as normal files.
-
Hi All
yum reinstall J:\var\cache\yum\netlabs-rel\packages\sane-backends-1.0.28-2.oc00.pentium4.rpm
which resulted in
No package matched to remove: sane-backends-0:1.0.28-2.oc00
Error: Problem in reinstall: no package matched to remove
Yum cannot install an rpm directly, but anpm can. You can also use rpm to install rpms. <g>
I find it best to think of yum as a front-end for rpm. Yum uses rpm under the covers, much like anpm uses yum and rpm.
If you have not lost the content of /var/lib/rpm
rpm -qa
will list all of the package rpm thinks you have installed.
-
Hi Steven
Yes, rpm -qa > rpmlist.txt seems to have all the previously installed packages showing.
Guess I can just work through the list (re)installing 1 by 1 - unless there is some way of presenting rpm with a list to (re)install?
Thanks
Pete
-
Hi Ivan
I'm quite in agreement with your rant :-)
I encountered rpm in the late 1990s and have been a devoted hater ever since.
However, it is what we are currently having to use so I try to make the best of it... and it is certainly not the fault of rpm/yum that I got into this mess.
I have arcview 2.1 installed and that does not let me pull out individual files, have to unpack all files, copy the required files to where ever, then delete the unpacked rpm files - Is arcview 2.2 on hobbesarchive, arcanoae or Alexs site?
While unpacking with arcview means I now have printing and scanning working again ANPM/yum do not know that which means that should I want to install a package that relies on something within cups/hplip/sane/hpaio it will be necessary to also install whatever package(s) are required. Also, of course, updates are not be offered for packages that are not known to be installed.
Regards
Pete
-
Is arcview 2.2 on hobbesarchive, arcanoae or Alexs site?
Arcview 2.25 is available as a Warpin package on both hobbesarchive and Alex's website:
https://hobbesarchive.com/Home/Download?path=/Hobbes/pub/os2/util/archiver/ArcView-2_25.wpi
https://altsan.org/programming/os2/arcview_225.wpi
-
Hi Pete,
I just checked and he has an updated version on his site http://altsan.org/os2/fixpaks/fixgraphics.html (http://altsan.org/os2/fixpaks/fixgraphics.html) you just have to look at what is there.
-
Hi Steven
Yes, rpm -qa > rpmlist.txt seems to have all the previously installed packages showing.
Guess I can just work through the list (re)installing 1 by 1 - unless there is some way of presenting rpm with a list to (re)install?
Thanks
Pete
Wonder if using ANPM, Manage-->Yum Tools-->Import Package List... would work?
Once finished, there's Export Package List... that might be a good idea, and that's for everyone being a good idea.
-
'yum history' will give you a breakdown of what what installed and when.
You could then chose to re-execute the specific TRX ID, but by all accounts this is a vastly manual effort.
-
Wonder if using ANPM, Manage-->Yum Tools-->Import Package List... would work?
Once finished, there's Export Package List... that might be a good idea, and that's for everyone being a good idea.
It should. What Pete will need to do is map the rpm file names to package names which is easy to do.
Another option using 4OS2 is something like
for %XX in ( @rpmlist.txt ) rpm --install %XX
which should install what needs to be installed and will complain about what's already installed.
rpm will take of list of rpm file names on the command line, but then one needs to beware of command line length limits.
I would recommend using ANPM since it does a better job of ensuring that the packages get installed in the required order.
-
I tried both cmd:
a. yum list installed * (the one I suggested - sorted result with pkgf name, release and status)
b. rpm -qa (the other nice cmd suggested under the post - unsorted result)
Same package count here (no difference)