Hello community,

here is the log from the commit of package openSUSE-release-tools for 
openSUSE:Factory checked in at 2017-12-01 15:53:50
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openSUSE-release-tools (Old)
 and      /work/SRC/openSUSE:Factory/.openSUSE-release-tools.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "openSUSE-release-tools"

Fri Dec  1 15:53:50 2017 rev:24 rq:546700 version:20171130.3b99a9d

Changes:
--------
--- 
/work/SRC/openSUSE:Factory/openSUSE-release-tools/openSUSE-release-tools.changes
    2017-11-27 22:18:44.257923680 +0100
+++ 
/work/SRC/openSUSE:Factory/.openSUSE-release-tools.new/openSUSE-release-tools.changes
       2017-12-01 15:54:07.374990378 +0100
@@ -1,0 +2,12 @@
+Thu Nov 30 12:18:44 UTC 2017 - opensuse-releaset...@opensuse.org
+
+- Update to version 20171130.3b99a9d:
+  * compare_pkglist: add more features
+
+-------------------------------------------------------------------
+Mon Nov 27 12:29:51 UTC 2017 - opensuse-releaset...@opensuse.org
+
+- Update to version 20171127.60cdcec:
+  * check_source: Ignore download_files failure in some cases
+
+-------------------------------------------------------------------

Old:
----
  openSUSE-release-tools-20171127.3368dd5.obscpio

New:
----
  openSUSE-release-tools-20171130.3b99a9d.obscpio

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

Other differences:
------------------
++++++ openSUSE-release-tools.spec ++++++
--- /var/tmp/diff_new_pack.Z1vcDO/_old  2017-12-01 15:54:10.178889480 +0100
+++ /var/tmp/diff_new_pack.Z1vcDO/_new  2017-12-01 15:54:10.186889192 +0100
@@ -20,7 +20,7 @@
 %define source_dir osc-plugin-factory
 %define announcer_filename factory-package-news
 Name:           openSUSE-release-tools
-Version:        20171127.3368dd5
+Version:        20171130.3b99a9d
 Release:        0
 Summary:        Tools to aid in staging and release work for openSUSE/SUSE
 License:        GPL-2.0+ and MIT

++++++ _servicedata ++++++
--- /var/tmp/diff_new_pack.Z1vcDO/_old  2017-12-01 15:54:10.222887896 +0100
+++ /var/tmp/diff_new_pack.Z1vcDO/_new  2017-12-01 15:54:10.226887752 +0100
@@ -1,6 +1,6 @@
 <servicedata>
   <service name="tar_scm">
     <param 
name="url">https://github.com/openSUSE/osc-plugin-factory.git</param>
-    <param 
name="changesrevision">3368dd555d8cb1953738675345fcb10461de65a9</param>
+    <param 
name="changesrevision">3c8a8411cdc12accf623a9e829c68f9177c891f7</param>
   </service>
 </servicedata>

++++++ openSUSE-release-tools-20171127.3368dd5.obscpio -> 
openSUSE-release-tools-20171130.3b99a9d.obscpio ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20171127.3368dd5/check_source.pl 
new/openSUSE-release-tools-20171130.3b99a9d/check_source.pl
--- old/openSUSE-release-tools-20171127.3368dd5/check_source.pl 2017-11-27 
13:23:10.000000000 +0100
+++ new/openSUSE-release-tools-20171130.3b99a9d/check_source.pl 2017-11-30 
13:13:27.000000000 +0100
@@ -238,7 +238,7 @@
 chdir($dir) || die 'tempdir failed';
 if (system("/usr/lib/obs/service/download_files","--enforceupstream", "yes", 
"--enforcelocal", "yes", "--outdir", $tmpdir)) {
     print "Source URLs are not valid. Try \"osc service localrun 
download_files\"\n";
-    $ret = 1;
+    $ret = 2;
 }
 chdir($odir);
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20171127.3368dd5/check_source.py 
new/openSUSE-release-tools-20171130.3b99a9d/check_source.py
--- old/openSUSE-release-tools-20171127.3368dd5/check_source.py 2017-11-27 
13:23:10.000000000 +0100
+++ new/openSUSE-release-tools-20171130.3b99a9d/check_source.py 2017-11-30 
13:13:27.000000000 +0100
@@ -109,7 +109,12 @@
         output = '  '.join(checked).translate(None, '\033')
         os.chdir('/tmp')
 
-        if ret != 0:
+        # ret = 0 : Good
+        # ret = 1 : Bad
+        # ret = 2 : Bad but can be non-fatal in some cases
+        if ret > 1 and target_project.startswith('openSUSE:Leap:') and 
(source_project.startswith('SUSE:SLE-15:') or 
source_project.startswith('openSUSE:Factory')):
+            pass
+        elif ret != 0:
             shutil.rmtree(dir)
             self.review_messages['declined'] = "Output of check script:\n" + 
output
             return False
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' 
old/openSUSE-release-tools-20171127.3368dd5/compare_pkglist.py 
new/openSUSE-release-tools-20171130.3b99a9d/compare_pkglist.py
--- old/openSUSE-release-tools-20171127.3368dd5/compare_pkglist.py      
2017-11-27 13:23:10.000000000 +0100
+++ new/openSUSE-release-tools-20171130.3b99a9d/compare_pkglist.py      
2017-11-30 13:13:27.000000000 +0100
@@ -40,12 +40,15 @@
 http_POST = osc.core.http_POST
 
 class CompareList(object):
-    def __init__(self, old_prj, new_prj, verbose, newonly, removedonly, 
submit):
+    def __init__(self, old_prj, new_prj, verbose, newonly, removedonly, 
existin, submit, submitfrom, submitto):
         self.new_prj = new_prj
         self.old_prj = old_prj
         self.verbose = verbose
         self.newonly = newonly
+        self.existin = existin
         self.submit = submit
+        self.submitfrom = submitfrom
+        self.submitto = submitto
         self.removedonly = removedonly
         self.apiurl = osc.conf.config['apiurl']
         self.debug = osc.conf.config['debug']
@@ -59,6 +62,20 @@
 
         return packages
 
+    def item_exists(self, project, package=None):
+        """
+        Return true if the given project or package exists
+        """
+        if package:
+            url = makeurl(self.apiurl, ['source', project, package, '_meta'])
+        else:
+            url = makeurl(self.apiurl, ['source', project, '_meta'])
+        try:
+            http_GET(url)
+        except urllib2.HTTPError:
+            return False
+        return True
+
     def removed_pkglist(self, project):
         if project.startswith('SUSE:'):
             apiurl = 'https://api.suse.de'
@@ -112,16 +129,30 @@
 
     def crawl(self):
         """Main method"""
+        if self.submit:
+            if (self.submitfrom and not self.submitto) or (self.submitto and 
not self.submitfrom):
+                print("** Please give both --submitfrom and --submitto 
parameter **")
+                return
+            if not self.item_exists(self.submitfrom):
+                print("Project %s is not exist"%self.submitfrom)
+                return
+            if not self.item_exists(self.submito):
+                print("Project %s is not exist"%self.submitto)
+                return
+
         # get souce packages from target
         print 'Gathering the package list from %s' % self.old_prj
         source = self.get_source_packages(self.old_prj)
         print 'Gathering the package list from %s' % self.new_prj
         target = self.get_source_packages(self.new_prj)
         removed_packages = self.removed_pkglist(self.old_prj)
+        if self.existin:
+            print 'Gathering the package list from %s' % self.existin
+            existin_packages = self.get_source_packages(self.existin)
 
         if not self.removedonly:
             for pkg in source:
-                if pkg.startswith('000'):
+                if pkg.startswith('000') or pkg.startswith('_'):
                     continue
 
                 if pkg not in target:
@@ -130,9 +161,19 @@
                     if linked is not None:
                         continue
 
+                    if self.existin:
+                        if pkg not in existin_packages:
+                            continue
+
                     print("New package than {:<8} - {}".format(self.new_prj, 
pkg))
                     if self.submit:
-                        self.submit_new_package(self.old_prj, self.new_prj, 
pkg)
+                        if self.submitfrom and self.submitto:
+                            if not self.item_exists(self.submitfrom, pkg):
+                                print("%s not found in %s"%(pkg, 
self.submitfrom))
+                                continue
+                            self.submit_new_package(self.submitfrom, 
self.submitto, pkg)
+                        else:
+                            self.submit_new_package(self.old_prj, 
self.new_prj, pkg)
                 elif not self.newonly:
                     diff = self.check_diff(pkg, self.old_prj, self.new_prj)
                     if diff:
@@ -150,7 +191,7 @@
     osc.conf.config['debug'] = args.debug
 
     uc = CompareList(args.old_prj, args.new_prj, args.verbose, args.newonly,
-            args.removedonly, args.submit)
+            args.removedonly, args.existin, args.submit, args.submitfrom, 
args.submitto)
     uc.crawl()
 
 if __name__ == '__main__':
@@ -171,8 +212,14 @@
                         help='show new package only')
     parser.add_argument('--removedonly', action='store_true',
                         help='show removed package but exists in target')
-    parser.add_argument('--submit', action='store_true',
-                        help='submit new package to target')
+    parser.add_argument('--existin', dest='existin', metavar='PROJECT',
+                        help='the package exists in the project')
+    parser.add_argument('--submit', action='store_true', default=False,
+                        help='submit new package to target, FROM and TO can 
re-configureable by --submitfrom and --submitto')
+    parser.add_argument('--submitfrom', dest='submitfrom', metavar='PROJECT',
+                        help='submit new package from, define --submitto is 
required')
+    parser.add_argument('--submitto', dest='submitto', metavar='PROJECT',
+                        help='submit new package to, define --submitfrom is 
required')
 
     args = parser.parse_args()
 

++++++ openSUSE-release-tools.obsinfo ++++++
--- /var/tmp/diff_new_pack.Z1vcDO/_old  2017-12-01 15:54:10.902863427 +0100
+++ /var/tmp/diff_new_pack.Z1vcDO/_new  2017-12-01 15:54:10.902863427 +0100
@@ -1,5 +1,5 @@
 name: openSUSE-release-tools
-version: 20171127.3368dd5
-mtime: 1511785390
-commit: 3368dd555d8cb1953738675345fcb10461de65a9
+version: 20171130.3b99a9d
+mtime: 1512044007
+commit: 3b99a9d434c0d142996d94879ba47f94702a5178
 


Reply via email to