Patch works for me on debian stable. Please consider.
Credit goes to 0xd34df00d.
Thanks
-Mathieu
---------- Forwarded message ----------
From: 0xd34df00d <[EMAIL PROTECTED]>
Date: Sat, Sep 6, 2008 at 11:41 PM
Subject: Re: [CMake] CPack DEB generator: Installed-Size field
To: Mathieu Malaterre <[EMAIL PROTECTED]>
Patch goes in the attachment.
2008/8/15 Mathieu Malaterre <[EMAIL PROTECTED]>:
> yes. But I do not think there is any change from 2.6 branch.
>
> On Fri, Aug 15, 2008 at 5:05 PM, 0xd34df00d <[EMAIL PROTECTED]> wrote:
>> I'll try to do it today. It's better to work with trunk, right?
>>
>> 2008/8/13 Mathieu Malaterre <[EMAIL PROTECTED]>:
>>> Rudoy,
>>>
>>> This must be a new requirement by newer apt-* stuff.
>>> Have a look at cmCPackDebGenerator.cxx. The code is pretty
>>> straighforward. You simply have to add the function that compute the
>>> size and then simply insert it at the right position.
>>> If you get it working, please send the patch back to the list.
>>>
>>> Thanks
>>> -Mathieu
>>>
>>> On Sat, Aug 9, 2008 at 2:15 PM, 0xd34df00d <[EMAIL PROTECTED]> wrote:
>>>> Hi there!
>>>>
>>>> First of all, thanks for the great software you write, CMake and CPack
>>>> really make development easier and more productive.
>>>>
>>>> I've noticed that .deb packages created by CPack don't contain
>>>> Installed-Size field, so dpkg (and, consequently, aptitude and other
>>>> package managers) think that installed size of the package is 0 bytes.
>>>> Is there a way to make CPack write that field to the control file?
>>>> That would be very useful, especially because CPack could
>>>> automatically calculate the size of install targets and keep the field
>>>> up-to-date.
>>>>
>>>> --
>>>> Kind regards,
>>>> Rudoy Georg.
>>>> _______________________________________________
>>>> CMake mailing list
>>>> [email protected]
>>>> http://www.cmake.org/mailman/listinfo/cmake
>>>>
>>>
>>>
>>>
>>> --
>>> Mathieu
>>>
>>
>>
>>
>> --
>> Rudoy Georg
>> LeechCraft — http://sourceforge.net/projects/leechcraft and
>> http://deviant-soft.ws
>> Spicy — http://deviant-soft.ws
>>
>
>
>
> --
> Mathieu
>
--
Rudoy Georg
LeechCraft — http://sourceforge.net/projects/leechcraft and
http://deviant-soft.ws
Spicy — http://deviant-soft.ws
--
Mathieu
? build
? debsize.patch
Index: Source/CPack/cmCPackDebGenerator.cxx
===================================================================
RCS file: /cvsroot/CMake/CMake/Source/CPack/cmCPackDebGenerator.cxx,v
retrieving revision 1.22
diff -c -r1.22 cmCPackDebGenerator.cxx
*** Source/CPack/cmCPackDebGenerator.cxx 1 Apr 2008 21:51:10 -0000 1.22
--- Source/CPack/cmCPackDebGenerator.cxx 6 Sep 2008 21:37:23 -0000
***************
*** 116,121 ****
--- 116,132 ----
{
out << "Suggests: " << debian_pkg_sug << "\n";
}
+ unsigned long totalSize = 0;
+ {
+ std::string dirName = this->GetOption("CPACK_TEMPORARY_DIRECTORY");
+ dirName += '/';
+ for (std::vector<std::string>::const_iterator fileIt = files.begin();
+ fileIt != files.end(); ++ fileIt )
+ {
+ totalSize += cmSystemTools::FileLength(fileIt->c_str());
+ }
+ }
+ out << "Installed-Size: " << totalSize << "\n";
out << "Maintainer: " << maintainer << "\n";
out << "Description: " << desc << "\n";
out << std::endl;
_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake