Hello community,

here is the log from the commit of package createrepo for openSUSE:Factory 
checked in at 2013-08-23 13:53:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/createrepo (Old)
 and      /work/SRC/openSUSE:Factory/.createrepo.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "createrepo"

Changes:
--------
--- /work/SRC/openSUSE:Factory/createrepo/createrepo.changes    2013-06-18 
10:29:47.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.createrepo.new/createrepo.changes       
2013-08-23 13:53:40.000000000 +0200
@@ -1,0 +2,5 @@
+Thu Jun 20 10:31:59 UTC 2013 - [email protected]
+
+- write timestamps in seconds (BNC#823652)
+
+-------------------------------------------------------------------
@@ -6,0 +12,12 @@
+Thu May  2 23:26:09 CEST 2013 - [email protected]
+
+- createrepo-0.9.9-clean_tmp_files.patch:
+  remove hunk referencing variables not in this codebase
+  (git 850b368ced63b2c0b7f2a4f2fb014d1daba7c80c)
+
+-------------------------------------------------------------------
+Wed Apr 24 07:00:00 UTC 2013 - [email protected]
+
+- clean up tmp files (BNC#812071)
+
+-------------------------------------------------------------------
@@ -15,0 +33,5 @@
+
+--------------------------------------------------------------------
+Wed Feb  6 15:27:57 UTC 2013 - [email protected]
+
+- add fix to pass checksum type to workers (BNC#802001)

New:
----
  createrepo-0.9.9-clean_tmp_files.patch
  createrepo-0.9.9-pass_checksum_to_workers.patch
  createrepo-0.9.9-use_integer_timestamps.patch

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ createrepo.spec ++++++
--- /var/tmp/diff_new_pack.yyEu5U/_old  2013-08-23 13:53:41.000000000 +0200
+++ /var/tmp/diff_new_pack.yyEu5U/_new  2013-08-23 13:53:41.000000000 +0200
@@ -33,6 +33,13 @@
 Patch8:         createrepo-0.9.9-disable-symlinks.patch
 Patch9:         createrepo-0.9.8-workaround-umask-reset.patch
 Patch10:        createrepo-0.9.9-worker-clog_limit.patch
+# Pass checksum option to workers, taken from upstream. See BNC#802001
+Patch11:        createrepo-0.9.9-pass_checksum_to_workers.patch
+# Upstream patch to clean up tmp files (BNC#812071)
+Patch12:        createrepo-0.9.9-clean_tmp_files.patch
+# Upstream patch to write timestamps in seconds (BNC#823652)
+Patch13:        createrepo-0.9.9-use_integer_timestamps.patch
+
 BuildRequires:  python-devel
 Requires:       python-deltarpm
 Requires:       python-libxml2
@@ -62,6 +69,9 @@
 %patch8 -p1
 %patch9
 %patch10 -p1
+%patch11 -p1
+%patch12 -p1
+%patch13
 sed -i "1d" createrepo/{readMetadata,yumbased,utils,deltarpms,merge}.py # Fix 
non-executable scripts (remove she-bang line)
 
 %build

++++++ createrepo-0.9.9-clean_tmp_files.patch ++++++
>From b73f374d6ab3c9dd681d9d5dcd8ab2262d73c166 Mon Sep 17 00:00:00 2001
From: Seth Vidal <[email protected]>
Date: Thu, 28 Jul 2011 17:03:45 -0400
Subject: [PATCH] add two private methods to help clean up doFinalMove() and
 makes the code a little nicer for how it is called from the cli.

slightly nicer fix for: https://bugzilla.redhat.com/show_bug.cgi?id=581628
---
 createrepo/__init__.py | 25 ++++++++++++++++++-------
 genpkgmetadata.py      |  1 +
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 8cce31a..30f7422 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -1151,14 +1151,11 @@ def doFinalMove(self):
                     msg += _('Error was %s') % e
                     raise MDError, msg
 
-        try:
-            os.rmdir(output_old_dir)
-        except OSError, e:
-            self.errorlog(_('Could not remove old metadata dir: %s')
-                          % self.conf.olddir)
-            self.errorlog(_('Error was %s') % e)
-            self.errorlog(_('Please clean up this directory manually.'))
+        self._cleanup_tmp_repodata_dir()
+        self._write_out_read_pkgs_list()
+
 
+    def _write_out_read_pkgs_list(self):
         # write out the read_pkgs_list file with self.read_pkgs
         if self.conf.read_pkgs_list:
             try:
@@ -1171,6 +1168,20 @@ def doFinalMove(self):
                               % self.conf.read_pkgs_list)
                 self.errorlog(_('Error was %s') % e)
 
+    def _cleanup_tmp_repodata_dir(self):
+        output_old_dir = os.path.join(self.conf.outputdir, self.conf.olddir)
+        output_temp_dir = os.path.join(self.conf.outputdir, self.conf.tempdir)
+        for dirbase in (self.conf.olddir, self.conf.tempdir):
+            dirpath = os.path.join(self.conf.outputdir, dirbase)
+            if os.path.exists(dirpath):
+                try:
+                    os.rmdir(dirpath)
+                except OSError, e:
+                    self.errorlog(_('Could not remove  temp metadata dir: %s')
+                                  % dirbase)
+                    self.errorlog(_('Error was %s') % e)
+                    self.errorlog(_('Please clean up this directory 
manually.'))
+        
     def setup_sqlite_dbs(self, initdb=True):
         """sets up the sqlite dbs w/table schemas and db_infos"""
         destdir = os.path.join(self.conf.outputdir, self.conf.tempdir)
diff --git a/genpkgmetadata.py b/genpkgmetadata.py
index 6c9217a..512420b 100755
--- a/genpkgmetadata.py
+++ b/genpkgmetadata.py
@@ -242,6 +242,7 @@ def main(args):
             if mdgen.checkTimeStamps():
                 if mdgen.conf.verbose:
                     print _('repo is up to date')
+                mdgen._cleanup_tmp_repodata_dir()
                 sys.exit(0)
 
         if conf.profile:
-- 
1.8.1.6

>From b6c41bc9997b6adcb9e5ccd218a8bd938c04983d Mon Sep 17 00:00:00 2001
From: Seth Vidal <[email protected]>
Date: Fri, 12 Aug 2011 12:16:57 -0400
Subject: [PATCH] I think this is the last of the tmp files which are,
 apparently, terribly important to clean up

closes: https://bugzilla.redhat.com/show_bug.cgi?id=730330
---
 createrepo/__init__.py | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/createrepo/__init__.py b/createrepo/__init__.py
index 2c63bad..e3c18aa 100644
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -639,7 +639,7 @@ def writeMetadataDocs(self, pkglist=[], pkgpath=None):
             # waitfor the workers to finish and as each one comes in
             # open the files they created and write them out to our metadata
             # add up the total pkg counts and return that value
-            worker_tmp_path = tempfile.mkdtemp()
+            self._worker_tmp_path = tempfile.mkdtemp()
             worker_chunks = utils.split_list_into_equal_chunks(pkgfiles,  
self.conf.workers)
             worker_cmd_dict = {}
             worker_jobs = {}
@@ -650,7 +650,7 @@ def writeMetadataDocs(self, pkglist=[], pkgpath=None):
                 # make the worker directory
                 workercmdline = []
                 workercmdline.extend(base_worker_cmdline)
-                thisdir = worker_tmp_path + '/' + str(worker_num)
+                thisdir = self._worker_tmp_path + '/' + str(worker_num)
                 if checkAndMakeDir(thisdir):
                     workercmdline.append('--tmpmdpath=%s' % thisdir)
                 else:
@@ -658,7 +658,7 @@ def writeMetadataDocs(self, pkglist=[], pkgpath=None):
                 for (fn, fo) in (('primary.xml', self.primaryfile), 
                            ('filelists.xml', self.flfile),
                            ('other.xml', self.otherfile)):
-                    fnpath = worker_tmp_path + '/' + str(num) + '/' + fn
+                    fnpath = self._worker_tmp_path + '/' + str(num) + '/' + fn
                     if os.path.exists(fnpath):
                         fo.write(open(fnpath, 'r').read())
 
@@ -1189,6 +1189,9 @@ def _cleanup_tmp_repodata_dir(self):
                                   % dirbase)
                     self.errorlog(_('Error was %s') % e)
                     self.errorlog(_('Please clean up this directory 
manually.'))
+        # our worker tmp path
+        if hasattr(self, '_worker_tmp_path') and 
os.path.exists(self._worker_tmp_path):
+            shutil.rmtree(self._worker_tmp_path, ignore_errors=True)
         
     def setup_sqlite_dbs(self, initdb=True):
         """sets up the sqlite dbs w/table schemas and db_infos"""
-- 
1.8.1.6
++++++ createrepo-0.9.9-pass_checksum_to_workers.patch ++++++
--- a/createrepo/__init__.py
+++ b/createrepo/__init__.py
@@ -617,7 +617,8 @@ class MetaDataGenerator:
                     '--pkgoptions=_collapse_libc_requires=%s' % 
self.conf.collapse_glibc_requires, 
                     '--pkgoptions=_cachedir=%s' % self.conf.cachedir,
                     '--pkgoptions=_baseurl=%s' % self.conf.baseurl,
-                    '--globalopts=clog_limit=%s' % self.conf.changelog_limit,]
+                    '--globalopts=clog_limit=%s' % self.conf.changelog_limit,
+                    '--globalopts=sumtype=%s' % self.conf.sumtype, ]
             
             if self.conf.quiet:
                 base_worker_cmdline.append('--quiet')
--- a/worker.py
+++ b/worker.py
@@ -80,6 +80,7 @@
                 print "reading %s" % (pkgfile)
 
             pkg = createrepo.yumbased.CreateRepoPackage(ts, package=pkgpath, 
+                                                        
sumtype=globalopts.get('sumtype', None), 
                                                         
external_data=external_data)
             pri.write(pkg.xml_dump_primary_metadata())
             fl.write(pkg.xml_dump_filelists_metadata())
++++++ createrepo-0.9.9-use_integer_timestamps.patch ++++++
--- modifyrepo.py.old   2013-06-20 10:27:06.000000000 +0000
+++ modifyrepo.py       2013-06-20 10:27:25.000000000 +0000
@@ -110,7 +110,7 @@
         new_rd.checksum = (self.checksum_type, csum)
         new_rd.openchecksum = (self.checksum_type, open_csum)
         new_rd.size = str(os.stat(destmd).st_size)
-        new_rd.timestamp = str(os.stat(destmd).st_mtime)
+        new_rd.timestamp = str(int(os.stat(destmd).st_mtime))
         self.repoobj.repoData[new_rd.type] = new_rd
         
         print "           type =", new_rd.type
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to