FAQ Search Today's Posts Mark Forums Read
» Video Reviews

» Linux Archive

Linux-archive is a website aiming to archive linux email lists and to make them easily accessible for linux users/developers.


» Sponsor

» Partners

» Sponsor

Go Back   Linux Archive > CentOS > CentOS

 
 
LinkBack Thread Tools
 
Old 06-18-2008, 06:23 PM
Brian Reichert
 
Default anaconda installing packages out of order (RHEL5.2)

I'm tasked with building a custom kickstart ISO for Red Hat 5 update 2.

This is using

anaconda-11.1.2.113-1
anaconda-runtime-11.1.2.113-1

I've been successful for months, but today, ran into a weird symptom.

Our ISO boots, and installs our RPMs, but out of order, and does
not preserve the dependancies. (_Mostly_ does, but some critical
misses.)

During the creation of the ISO, I direct the build to:

- copy our RPMs into the approriate directory for mkisofs

- generate a test RPM database, and from that, generate a list of installed
packages

rpm --dbpath ${pkg_db_dir} -qa --queryformat='%{NAME}
' >> all_packages.txt

- And I supply that text file in my ks.cfg file

%include /mnt/source/all_packages.txt

- I create the on-disk repo:

createrepo -p -q ${RPMBASE}

I observe:

- comparing the messages in /var/log/anaconda.log makes it seem
that the packages 'seen' by anaconda are in the right order. That
is to say, this command:

awk '/Adding/ {print $6}' /var/log/anaconda.log

yeilds a list that is in the same order as all_packages.txt from the ISO.

- but those lists are not the same order as anaconda installed:

awk '/Installing/ {print $2}' /root/install.log

Some of those are out-of-order, and breakage occurs. :/

Does anyone have any suggestions as to how to debug this?

I can provide logs (or snippets thereof), if that would help in the
diagnosis...

--
Brian Reichert <reichert@numachi.com>
55 Crystal Ave. #286 Daytime number: (603) 434-6842
Derry NH 03038-1725 USA BSD admin/developer at large

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-19-2008, 04:15 PM
"Moray Henderson (ICT)"
 
Default anaconda installing packages out of order (RHEL5.2)

>From: Brian Reichert <reichert@numachi.com>
>Our ISO boots, and installs our RPMs, but out of order, and does
>not preserve the dependancies. (_Mostly_ does, but some critical
>misses.)

I've been running into that problem too. I think Anaconda re-orders the packages as it works out dependencies, so (as far as I can tell) you can't rely on pkgorder or comps.xml to give the final install order. (If I'm wrong about that, I would be very grateful if someone would tell me how to do it.)

The key to the solution is the difference between the rpm directives "Requires" and "PreReq" in the .spec files.

"Requires: x" means "this package requires the x package in order to _run_". If both packages appear in the same rpm transaction, the transaction will succeed _but x may not be installed first_.

"PreReq: x" means "this package requires x to be present _before it will install properly_". In this case, if both packages appear in the same transaction, rpm will ensure that x is installed first.


Moray.
"To err is human. To purr, feline"
http://members.aol.com/edgwddirk

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 
Old 06-19-2008, 05:55 PM
Brian Reichert
 
Default anaconda installing packages out of order (RHEL5.2)

On Thu, Jun 19, 2008 at 04:15:36PM -0000, Moray Henderson (ICT) wrote:
> I've been running into that problem too. I think Anaconda re-orders
> the packages as it works out dependencies, so (as far as I can tell)
> you can't rely on pkgorder or comps.xml to give the final install
> order. (If I'm wrong about that, I would be very grateful if someone
> would tell me how to do it.)
>
> The key to the solution is the difference between the rpm directives "Requires" and "PreReq" in the .spec files.

Indeed, this is a useful (ableit unexpected) distinction; using PreReq
instead of Requires (in my case) does yield the desired results.

Thanks for the feedback!

> "Requires: x" means "this package requires the x package in order to _run_". If both packages appear in the same rpm transaction, the transaction will succeed _but x may not be installed first_.
>
> "PreReq: x" means "this package requires x to be present _before it will install properly_". In this case, if both packages appear in the same transaction, rpm will ensure that x is installed first.

I'm kind of surpised the wad of magical dependancy determination in the RPM
packaging did not infer the dependancies of pre- and post-install scripts.
But, not very surpised...

> Moray.
> "To err is human. To purr, feline"
> http://members.aol.com/edgwddirk

--
Brian Reichert <reichert@numachi.com>
55 Crystal Ave. #286 Daytime number: (603) 434-6842
Derry NH 03038-1725 USA BSD admin/developer at large

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@redhat.com
https://www.redhat.com/mailman/listinfo/anaconda-devel-list
 

Thread Tools




All times are GMT. The time now is 11:23 AM.

VBulletin, Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright 2007 - 2008, www.linux-archive.org