Hello community,

here is the log from the commit of package LHAPDF for openSUSE:Factory checked 
in at 2019-01-24 14:14:48
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/LHAPDF (Old)
 and      /work/SRC/openSUSE:Factory/.LHAPDF.new.28833 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "LHAPDF"

Thu Jan 24 14:14:48 2019 rev:14 rq:667896 version:6.2.1

Changes:
--------
--- /work/SRC/openSUSE:Factory/LHAPDF/LHAPDF.changes    2017-10-09 
19:40:38.231583436 +0200
+++ /work/SRC/openSUSE:Factory/.LHAPDF.new.28833/LHAPDF.changes 2019-01-24 
14:14:49.135265156 +0100
@@ -1,0 +2,8 @@
+Sat Jan 19 14:41:07 UTC 2019 - [email protected]
+
+- Add LHAPDF-pdfset-download-url-update.patch: Update to upstream
+  server's changed URL for downloading pdfsets; patch taken from
+  upstream mercurial.
+- Use %%license to install COPYING file.
+
+-------------------------------------------------------------------

New:
----
  LHAPDF-pdfset-download-url-update.patch

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

Other differences:
------------------
++++++ LHAPDF.spec ++++++
--- /var/tmp/diff_new_pack.x2O6py/_old  2019-01-24 14:14:49.679264528 +0100
+++ /var/tmp/diff_new_pack.x2O6py/_new  2019-01-24 14:14:49.683264523 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package LHAPDF
 #
-# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -23,11 +23,13 @@
 Version:        6.2.1
 Release:        0
 Summary:        A library for unified interface to PDF sets
-License:        GPL-3.0
+License:        GPL-3.0-only
 Group:          Development/Libraries/C and C++
 Url:            https://lhapdf.hepforge.org/
 Source:         
http://www.hepforge.org/archive/lhapdf/%{name}-%{version}.tar.gz
 Patch1:         sover.diff
+# PATCH-FIX-UPSTREAM LHAPDF-pdfset-download-url-update.patch 
[email protected] -- Update to upstream server's changed URL for downloading 
pdfsets; patch taken from upstream mercurial repository
+Patch2:         LHAPDF-pdfset-download-url-update.patch 
 %if 0%{?suse_version} > 1325
 BuildRequires:  libboost_headers-devel
 %else
@@ -97,6 +99,7 @@
 %prep
 %setup -q
 %patch -P 1 -p1
+%patch2 -p1
 
 %build
 autoreconf -fi
@@ -117,7 +120,8 @@
 
 %files devel
 %defattr(-, root, root)
-%doc AUTHORS ChangeLog COPYING
+%doc AUTHORS ChangeLog
+%license COPYING
 %{_bindir}/%{execname}
 %{_bindir}/%{execname}-*
 %{_datadir}/%{name}/

++++++ LHAPDF-pdfset-download-url-update.patch ++++++
# HG changeset patch
# User Graeme Watt <[email protected]>
# Date 1540393858 -3600
#      Wed Oct 24 16:10:58 2018 +0100
# Node ID 4cc834904ebe36c62b6a1bc03773bf86ef037bba
# Parent  750ef2c28181d05374f0e091ae187f59bdf87c61
Update lhapdf download script for new HepForge

diff --git a/bin/lhapdf.in b/bin/lhapdf.in
--- a/bin/lhapdf.in
+++ b/bin/lhapdf.in
@@ -21,7 +21,7 @@
 
 
 ## Base paths etc. for set and index file downloading
-urlbase = 'http://www.hepforge.org/archive/lhapdf/pdfsets/%s/' % major_version
+urlbase = 'https://lhapdf.hepforge.org/downloads?f=pdfsets/%s/' % major_version
 afsbase = '/afs/cern.ch/sw/lcg/external/lhapdfsets/current/'
 cvmfsbase='/cvmfs/sft.cern.ch/lcg/external/lhapdfsets/current/'
 index_filename = 'pdfsets.index'
@@ -277,7 +277,7 @@
             import urllib2 as urllib
         try:
             u = urllib.urlopen(url)
-            file_size = int(u.info().get('Content-Length')[0])
+            file_size = int(u.info().get('Content-Length', [0])[0])
         except urllib.URLError:
             e = sys.exc_info()[1]
             logging.error('Unable to download %s' % url)
@@ -286,7 +286,10 @@
         logging.debug('Downloading from %s' % url)
         logging.debug('Downloading to %s' % dest_filepath)
         if dryrun:
-            logging.info('%s [%s]' % (os.path.basename(url), 
convertBytes(file_size)))
+            if file_size:
+                logging.info('%s [%s]' % (os.path.basename(url), 
convertBytes(file_size)))
+            else:
+                logging.info('%s' % os.path.basename(url))
             return False
 
         try:
@@ -306,7 +309,10 @@
                     dest_file.write(buffer)
 
                     status  = chr(13) + '%s: ' % os.path.basename(url)
-                    status += r'%s [%3.1f%%]' % 
(convertBytes(file_size_dl).rjust(10), file_size_dl * 100. / file_size)
+                    if file_size:
+                        status += r'%s [%3.1f%%]' % 
(convertBytes(file_size_dl).rjust(10), file_size_dl * 100. / file_size)
+                    else:
+                        status += r'%s' % convertBytes(file_size_dl).rjust(10)
                     sys.stdout.write(status+' ')
             except urllib.URLError:
                 e = sys.exc_info()[1]


Reply via email to