Christian Ehrlicher schrieb: > Ralf Habacker schrieb: > >> Christian Ehrlicher schrieb: >> >>> Hi, >>> >>> BinaryPackageBase does not work as expected: >>> When the downloaded package has a subdir this subdir is not removed >>> although I've self.targetInstSrc correctly set. >>> >>> >>> Please see the attached example. >>> >>> >> Thanks for this bug report. >> >> >>> This avoids to use BinaryPackageBase and I've to use the 'old' way to >>> unpack binary packages. >>> >>> >> does the 'old' way unpack the files into package workdir and on install >> step copy the subdir set with set.targetInstSrc into the image dir ? >> >> > Yes, that's correct. > >> I assume this because utils.unpackFiles() does not support unpacking a >> subdirectory of the zip file and class >> Source.ArchiveSource.ArchiveSource which performs the unpacking does not >> support targetInstSrc yet. >> >> > Unpacking into the image dir is ok for pre-packaged libs created by > kdewin-packager but not for 3rd-party ones which don't follow the > 'normal' scheme. For this kind of packages install() must move them around. > Maybe BinaryPackageBase() is just not the correct type for such kind of > packages? > As we are dealing with binary packages I would say BinaryPackageBase is the right place for such a support. Also see below
> I solved it by setting self.buildSystemType to 'custom' - then > ArchiveSource unpacks all into the workdir and the instal step can move > around the stuff. yes, which is a package only solution yet. > Another idea is to add a new property to tell > ArchiveSource to use the workdir() and not the shortcut. > I think this is a good solution. > When that's the way to go I'll maybe can move some more > win32libs-sources to the new buildsystem classes. > you are probably refering to win32libs-bin. For converting win32libs binary package the main task will probably be to move/copy files with or without a specific filename pattern and directories with or without a directory name pattern from the source dir into the install dir. A generic solution may be to predefine a src/destination file/directory pattern list in the package and to extend BinaryPackageBase::install() class with the related copy/move implementation. The question is if it is worth to create a generic solution - i would say yes. The first step into this direction coule be to add a local related implementation (a single method) to the vlc Package, which could be easily extended and tested. If this implementation works mature, it could be added to the BinaryPackageBase class for having a generic feature. Just a note for writing package: in util.py there are convenience functions for the related shutils function with debugging support, which makes it easier to follow what is copied/moved . Regards Ralf _______________________________________________ Kde-windows mailing list [email protected] https://mail.kde.org/mailman/listinfo/kde-windows
