Bug 705132 - Fedora 15 - Failed to produce delta RPM using presto-utils
Summary: Fedora 15 - Failed to produce delta RPM using presto-utils
Keywords:
Status: CLOSED WONTFIX
Alias: None
Product: Fedora
Classification: Fedora
Component: presto-utils
Version: 15
Hardware: All
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Jonathan Dieter
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-05-16 18:33 UTC by rwhalb
Modified: 2011-06-29 18:13 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-06-29 18:13:57 UTC
Type: ---


Attachments (Terms of Use)

Description rwhalb 2011-05-16 18:33:05 UTC
Description of problem:
With Fedora 15 I can not produce a delta RPM using presto-utils. Both the "deltarpmd.py" and the "packagelist.py" are missing the '-z gzip' parameter to the makedeltarpm command. When creating the delata RPM using 'makedeltarpm' I have observed that the archive was not gziped.

According to the 'makedeltarpm' man page: The -z option can be used to specify a different compression method, the default is to use the same compression method as used in the new rpm.

I have also observed that RPMs created using 'rpmbuild' do not gzip the archive. Therefore my conclusion is that 'makedeltarpm' by default wil not gzip the delta RPM archive.

The solution I have use is to add the '-z gzip' parameter to the 'makedeltarpm' command in both the "deltarpmd.py" and the "packagelist.py" files. Once applied drpms are correctly produced.


As an example the following output is produced for creating delta RPMs for noarch packages:

createdeltarpms -v "/root/repo/yum/repo/noarch" "/root/repo/yum/repo/drpm";
Using base dir: /root/repo/yum/repo/noarch
Using destination dir: /root/repo/yum/repo/drpm
Traceback (most recent call last):
  File "/usr/lib64/python2.7/runpy.py", line 162, in _run_module_as_main
    "__main__", fname, loader, pkg_name)
  File "/usr/lib64/python2.7/runpy.py", line 72, in _run_code
    exec code in run_globals
  File "/usr/lib/python2.7/site-packages/presto-utils/gendeltarpms.py", line 320, in <module>
    if createPrestoRepo(directories[0], directories[1], None, cmds['count'], cmds['do-first']):
  File "/usr/lib/python2.7/site-packages/presto-utils/gendeltarpms.py", line 213, in createPrestoRepo
    (sn, se, sv, sr) = getDeltaNevr(f)
  File "/usr/lib/python2.7/site-packages/presto-utils/gendeltarpms.py", line 106, in getDeltaNevr
    if compobj.read(4)[:3] != "DLT":
  File "/usr/lib64/python2.7/gzip.py", line 252, in read
    self._read(readsize)
  File "/usr/lib64/python2.7/gzip.py", line 287, in _read
    self._read_gzip_header()
  File "/usr/lib64/python2.7/gzip.py", line 181, in _read_gzip_header
    raise IOError, 'Not a gzipped file'
IOError: Not a gzipped file


Version-Release number of selected component (if applicable):
[root@dev15-64 yum]# uname -a
Linux dev15-64 2.6.38.6-26.rc1.fc15.x86_64 #1 SMP Mon May 9 20:45:15 UTC 2011 x86_64 x86_64 x86_64 GNU/Linux

[root@dev15-64 yum]# rpm -q presto-utils
presto-utils-0.3.4-5.fc15.noarch


How reproducible:
See above...


Steps to Reproduce:
See above...

  
Actual results:
See above...


Expected results:
delta RPMs are produced.


Additional info: 
When doing this using a previous presto-utils version: presto-utils-0.3.4-3.fc12.noarch there was no issue and the '-z gzip' was used. Apparently it has been removed now.

---RWH

Comment 1 Jonathan Dieter 2011-06-29 18:13:57 UTC
The best way to generate deltarpms for a Fedora repository is to use createrepo with the -d flag.

Presto-utils should have been retired a long time ago, and no longer works with xz-compressed rpms.  As it is, presto-utils will no longer be in Fedora from 16 onwards, and I won't be fixing any of the bugs in it.

I apologize for any inconvenience.


Note You need to log in before you can comment on or make changes to this bug.