[packagekit] PackageKit: pkgenpack fixes

Utsav Handa utsavhanda at hotmail.com
Sat Jan 24 06:05:59 PST 2009

Hello All,

I recently came across the "pkgenpack" utility bundled with "PackageKit"
in F10.

I used that utility to check and test the functionality provided by it.
I find it a very good initiative (cheers for author) to bundle/pack
packages for usage on other machines or pass it on.

While using "pkgenpack", i came across some issues like -
1) If i give a file name in "--output" param, it ends with "Segmentation
2) If "--package=" is passed as parameter, it ends with 
Failed to find package '': Internal error: Search string zero length

I decided to check out the source-code for pkgenpack and found that
these problems can be rectified.

I fixed the following issues -
1) Added check for checking length of the package name before going for
finding package. (Earlier only NULL value was being checked).
2) Added "output" param validation check, such that if one passes a
valid directory, it works with it, ELSE, if someone passes a file
(ending with .servicepack), extract the directory and file name
information and created pack/update with that name.
3) Added "os_directory_separator" variable to get directory separator
instead of hard-coding if for ext2/ext3 file-system.
4) Added "pack_identifier" variable to get extension for valid packages
being used with pkgenpack utility.

Please find the patch for these issues and if possible merge it with
(This is my first try with PackageKit code, so please be kind to newbie)

-------------- next part --------------
A non-text attachment was scrubbed...
Name: pk-generate-pack.patch
Type: text/x-patch
Size: 4624 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/packagekit/attachments/20090124/218299c7/attachment-0004.bin>

More information about the PackageKit mailing list