pkg_improved GSoC 2008 finished

Garrett Cooper yanefbsd at gmail.com
Wed Aug 27 00:32:10 UTC 2008


On Tue, Aug 26, 2008 at 2:18 PM, Anders Nore <andenore at freebsd.org> wrote:
> 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

     I'll look through the diff at a later date to determine what new
features you've added, but I'll be sure to add regression tests soon
via Python / dev-pynose (sometime tonight if at all possible --
automation and testing Cisco stuff is eating up a lot of my free time
:(...).
Cheers,
-Garrett


More information about the freebsd-hackers mailing list