pkg_improved GSoC 2008 finished

Anders Nore andenore at freebsd.org
Tue Aug 26 21:23:50 UTC 2008


On Sat, 23 Aug 2008 07:36:02 +0200, Garrett Cooper <yanefbsd at gmail.com>  
wrote:
>
> How about this?
>
> For standalone packages, specify:
>
> Makefile.inc <-- redefine variables here.
> pkg_install/  <-- sources go here.
>
> Seems like a simple solution ;).
>
> As for diff, you probably what to use:
>
> --exclude-from=SCM_patterns.txt
>
> where SCM_patterns.txt consists of:
> --------------
> CVS
> .git
> .svn
> .CC
> --------------
> ... etc.
>
> As for patch, `patch -p0 < pkg_install.patch' does the trick if you do
> `diff -Naur .'.
>
> Cheers and good work on finishing off this awesome task. I'll gladly
> write up tests for you if you like =],
> -Garrett


I've been making a lot of mistakes trying to make correct patches, but I  
think I finally got a hang of it now :)
I'd really appreciate some tests if you're willing to write some.

I've also discovered two bugs in all -CURRENT, -RELENG_7 and -RELENG_7_0  
of pkg_install:

1. Bug in pkg_info -W, it does not handle empty @cwd's correctly in the  
packinglist, so if you have any packages with an empty @cwd before the  
files listed it will not show as installed by a package.
e.g., if you have the kdeadmin-4.1.0 package installed, one of the files  
it installs is `/usr/local/kde4/libdata/ldconfig/kdeadmin4' but running  
`pkg_info -W /usr/local/kde4/libdata/ldconfig/kdeadmin4' will not show  
that it installed by kdeadmin-4.1.0.

2. Bug in pkg_add, adding two packages where the first package recursively  
pkg_add's dependencies using slave mode will cause an `pkg_add: fatal  
error during execution: getcwd'. Because it doesn't save and recover  
previous working directories correctly.
e.g., if you delete packages "joe-3.5,1", "gettext-0.16.1_3" and  
"zip-2.32", and run `pkg_add -r joe zip' this error will occur as joe  
depends on gettext. If you run `pkg_add -r zip joe' this error will not  
occur.

Here's a patch for these errors:  
http://home.no.net/andenore/patches/pkg_install_bugfix-2008-08-26_RELENG_7.diff
Can someone confirm these bugs, and if the patch is suitable?


Thanks a bunch,
Anders Nore


More information about the freebsd-hackers mailing list