On Thu, Apr 21, 2005, Etienne-Hugues Fortin wrote: > I have a machine that is running for over a year now with Openpkg. It was > version 2.1. I have numerous packages installed this way and some of them > are installed from source and have modified spec file. > > My question is how can I upgrade this server without causing too much > problems? Does the upgrade already look for modified spec file?
No, it cannot know that you modified the .spec file. What you have to do is (1) forward port your .spec changes to the newer OpenPKG 2.3 version and rolling your own local set of .src.rpm files and then (2) do a regular upgrade from OpenPKG 2.1 to 2.3. > Does > openpkg consider if the application has been installed from source or > binary? OpenPKG always just _installs_ software from binary RPMs. The source RPM is just unpacked and used to build a binary RPM, even if one can use the "openpkg rpm -i" command with source RPM similar to binary RPMs, RPM actually does not remember them at all. > Will it just erase everything in /openpkg/RPM/SRC? If you "openpkg rpm -i" a source file or perform a "openpkg rpm --rebuild" on a source file, the <prefix>/RPM/SRC/ is overwritten, yes. Because both the <prefix>/RPM/SRC/ and <prefix>/RPM/TMP/ directories are just used internally during "openpkg rpm --rebuild". So, I guess you have made your changes directly in the <prefix>/RPM/SRC/ area. Hence you first have to figure out what changes you have actually made. In the worst case just do a "openpkg rpm --define '_sourcedir /tmp/openpkg/%{name}' --define '_specdir /tmp/openpkg/%{name}' -i *.src.rpm" with the original OpenPKG 2.3 source RPMs and then do a "diff -ru3 /tmp/openpkg/ <prefix>/RPM/SRC/ >/tmp/openpkg.diff" to retrieve your changes. Then clear the <prefix>/RPM/SRC/ area and install the OpenPKG 2.3 source RPMs into it with "openpkg rpm -i *.src.rpm" and reapply your changes with "cd <prefix>/RPM/SRC; patch -p0 -b </tmp/openpkg.diff" and manually resolve any conflicts in the files. For the long-term I _strongly_ recommend you to _NOT_ edit .spec files under <prefix>/RPM/SRC/ at all -- except for perhaps some trivial changes. Instead checkout via Anon-CVS the OpenPKG sources, apply your changes _there_ (means: edit the files even they cannot be checked-in to openpkg.org) and roll your own set of OpenPKG 2.3 source RPMs from there -- which in turn then can be used without any problems to upgrade any hierarchy. Ralf S. Engelschall [EMAIL PROTECTED] www.engelschall.com ______________________________________________________________________ The OpenPKG Project www.openpkg.org User Communication List openpkg-users@openpkg.org