RE: Problems with +CONTENTS being messed up by pkg_delete -f
Stephen Montgomery-Smith: > If you "pkg_delete -f" a package and then install the port again (but > after it has been bumped up a version), then the +CONTENTS of ports that > require the original port will be incorrect. This apparently messes up > programs like portmanager. There is a sense in which one should never do > "pkg_delete -f" and expect /var/db/pkg to keep its integrety - on the > other hand this is exactly what "make deinstall" does. > > My feeling is that the integrety of /var/db/pkg should be maintained > across a "make deinstall" and subsequent "make install" of a bumped > version of the port. The tricky point is when the dependencies change with a version bump. It will also be difficult if the user changes "make config" options (which commonly affect dependencies - consider my favorite WITHOUT_NLS knob) and reinstalls. My feeling is that tackling this with a general solution would be nice to have - but the details and corner cases are pretty difficult. > A further benefit of this approach is that one could also accurately > reconstruct the +REQUIRED_BY of the port just reinstalled - right now this > is left empty and thus inaccurate. Well. This is true, but on the other hand +REQUIRED_BY basically just duplicates information that we already have in the ports tree. Most ports management packages that we have (including my homegrown perl script) don't rely on information contained in +REQUIRED_BY, but just start with what is already in the ports tree. Which leads to the question whether +REQUIRED_BY is still of much value at all... Helge Atos Origin GmbH, Theodor-Althoff-Str. 47, D-45133 Essen, Postfach 100 123, D-45001 Essen Telefon: +49 201 4305 0, Fax: +49 201 4305 689095, www.atosorigin.de Dresdner Bank AG, Hamburg: Kto. 0954411200, BLZ 200 800 00, Swift Code DRESDEFF200, IBAN DE6920080954411200 Geschäftsführer: Dominique Illien, Handelsregister Essen HRB 19354, Ust.-ID.-Nr.: DE147861238 ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Problems with +CONTENTS being messed up by pkg_delete -f
On Wed, 18 Jul 2007 15:56:49 -0500 (CDT) Stephen Montgomery-Smith <[EMAIL PROTECTED]> wrote: > > If you "pkg_delete -f" a package and then install the port again (but > after it has been bumped up a version), then the +CONTENTS of ports that > require the original port will be incorrect. This apparently messes up > programs like portmanager. There is a sense in which one should never do > "pkg_delete -f" and expect /var/db/pkg to keep its integrety - on the > other hand this is exactly what "make deinstall" does. > > My feeling is that the integrety of /var/db/pkg should be maintained > across a "make deinstall" and subsequent "make install" of a bumped > version of the port. > > This is my suggestion. When a "pkg_delete -f" is executed, it looks > through +REQUIRED_BY of the port it is going to delete, and modifies the > +CONTENTS file of each of them, replacing lines like > @pkgdep xineramaproto-1.1.2 > @comment DEPORIGIN:x11/xineramaproto > > to maybe something like > @comment DELDEPORIGIN:x11/xineramaproto > > ("deleted dependency origin"). A subsequent "make install" of > x11/xineramaproto should look through the +CONTENTS of all entries in > /var/db/pkg and change these lines to something like > > @pkgdep xineramaproto-1.1.3 > @comment DEPORIGIN:x11/xineramaproto > > A further benefit of this approach is that one could also accurately > reconstruct the +REQUIRED_BY of the port just reinstalled - right now this > is left empty and thus inaccurate. > > What do you guys think? I know I could write the code for this quite > quickly, but I want some feedback before I work on it. I've not read this thread in detail but I think "pkgdb -L" could be of use in this situation. It will check and restore lost dependencies against the ports tree. It has worked for me on several occasions. As far as package set creation for distribution on my systems, I use the "pkg_create -b" instead of "make package". I have only used "make package" to check a port that is being created for local use (as per Porters Handbook). Just ignore me if I've misunderstood the thread ;-) Randy -- ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Problems with +CONTENTS being messed up by pkg_delete -f
Robert Noland wrote: On Wed, 2007-07-18 at 15:56 -0500, Stephen Montgomery-Smith wrote: If you "pkg_delete -f" a package and then install the port again (but after it has been bumped up a version), then the +CONTENTS of ports that require the original port will be incorrect. This apparently messes up programs like portmanager. There is a sense in which one should never do "pkg_delete -f" and expect /var/db/pkg to keep its integrety - on the other hand this is exactly what "make deinstall" does. My feeling is that the integrety of /var/db/pkg should be maintained across a "make deinstall" and subsequent "make install" of a bumped version of the port. This is my suggestion. When a "pkg_delete -f" is executed, it looks through +REQUIRED_BY of the port it is going to delete, and modifies the +CONTENTS file of each of them, replacing lines like @pkgdep xineramaproto-1.1.2 @comment DEPORIGIN:x11/xineramaproto to maybe something like @comment DELDEPORIGIN:x11/xineramaproto ("deleted dependency origin"). A subsequent "make install" of x11/xineramaproto should look through the +CONTENTS of all entries in /var/db/pkg and change these lines to something like @pkgdep xineramaproto-1.1.3 @comment DEPORIGIN:x11/xineramaproto Hrm, not quite what I had in mind... I don't want to misrepresent that a port was built against a newer version of a dependency. What I was hoping for would be that a port when reinstalled would not list both the current version of a dependency as well as a previous version of the same origin (which it aquired via the +CONTENTS of some other direct dependency). It should only list the currently installed version of that origin. That way it is still possible to determine that the interim port was built against an older version. I just want the +CONTENTS file to accurately list the versions that a given port was built against. I think I was not understanding your problem, nor how portmanager works. Sorry about that. In general, I do really like how the present "actual-package-depends" works, and so I would rather see this kept, and portmanager modified to accomodate, rather than the other way around. Robert sent me some private emails about how "actual-package-depends" was messing up portmanager. Probably he should send the problem descriptions to the mailing lists, and maybe someone else could solve them. I thought I had some ideas for quick fixes, but it seems I was looking before I was leaping. I don't really have enough time right now for long fixes, so someone else will have to figure it out. I have to say that I simply don't use portmanager or portsinstall or anything like that, so I don't know how they work. (Rather I use my own home brew tools for doing the same thing, and since they are home brew and only for my use, they don't need to get everything right everytime, they can be simple, and they don't have to be at all user-friendly.) Best regards, Stephen ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: Problems with +CONTENTS being messed up by pkg_delete -f
On Wed, 2007-07-18 at 15:56 -0500, Stephen Montgomery-Smith wrote: > If you "pkg_delete -f" a package and then install the port again (but > after it has been bumped up a version), then the +CONTENTS of ports that > require the original port will be incorrect. This apparently messes up > programs like portmanager. There is a sense in which one should never do > "pkg_delete -f" and expect /var/db/pkg to keep its integrety - on the > other hand this is exactly what "make deinstall" does. > > My feeling is that the integrety of /var/db/pkg should be maintained > across a "make deinstall" and subsequent "make install" of a bumped > version of the port. > > This is my suggestion. When a "pkg_delete -f" is executed, it looks > through +REQUIRED_BY of the port it is going to delete, and modifies the > +CONTENTS file of each of them, replacing lines like > @pkgdep xineramaproto-1.1.2 > @comment DEPORIGIN:x11/xineramaproto > > to maybe something like > @comment DELDEPORIGIN:x11/xineramaproto > > ("deleted dependency origin"). A subsequent "make install" of > x11/xineramaproto should look through the +CONTENTS of all entries in > /var/db/pkg and change these lines to something like > > @pkgdep xineramaproto-1.1.3 > @comment DEPORIGIN:x11/xineramaproto Hrm, not quite what I had in mind... I don't want to misrepresent that a port was built against a newer version of a dependency. What I was hoping for would be that a port when reinstalled would not list both the current version of a dependency as well as a previous version of the same origin (which it aquired via the +CONTENTS of some other direct dependency). It should only list the currently installed version of that origin. That way it is still possible to determine that the interim port was built against an older version. I just want the +CONTENTS file to accurately list the versions that a given port was built against. robert. > A further benefit of this approach is that one could also accurately > reconstruct the +REQUIRED_BY of the port just reinstalled - right now this > is left empty and thus inaccurate. > > What do you guys think? I know I could write the code for this quite > quickly, but I want some feedback before I work on it. > > Stephen > > ___ > [EMAIL PROTECTED] mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-ports > To unsubscribe, send any mail to "[EMAIL PROTECTED]" ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Problems with +CONTENTS being messed up by pkg_delete -f
If you "pkg_delete -f" a package and then install the port again (but after it has been bumped up a version), then the +CONTENTS of ports that require the original port will be incorrect. This apparently messes up programs like portmanager. There is a sense in which one should never do "pkg_delete -f" and expect /var/db/pkg to keep its integrety - on the other hand this is exactly what "make deinstall" does. My feeling is that the integrety of /var/db/pkg should be maintained across a "make deinstall" and subsequent "make install" of a bumped version of the port. This is my suggestion. When a "pkg_delete -f" is executed, it looks through +REQUIRED_BY of the port it is going to delete, and modifies the +CONTENTS file of each of them, replacing lines like @pkgdep xineramaproto-1.1.2 @comment DEPORIGIN:x11/xineramaproto to maybe something like @comment DELDEPORIGIN:x11/xineramaproto ("deleted dependency origin"). A subsequent "make install" of x11/xineramaproto should look through the +CONTENTS of all entries in /var/db/pkg and change these lines to something like @pkgdep xineramaproto-1.1.3 @comment DEPORIGIN:x11/xineramaproto A further benefit of this approach is that one could also accurately reconstruct the +REQUIRED_BY of the port just reinstalled - right now this is left empty and thus inaccurate. What do you guys think? I know I could write the code for this quite quickly, but I want some feedback before I work on it. Stephen ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to "[EMAIL PROTECTED]"