Hello community, here is the log from the commit of package b4 for openSUSE:Factory checked in at 2020-11-23 15:50:25 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/b4 (Old) and /work/SRC/openSUSE:Factory/.b4.new.5913 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "b4" Mon Nov 23 15:50:25 2020 rev:6 rq:850164 version:0.5.2+9 Changes: -------- --- /work/SRC/openSUSE:Factory/b4/b4.changes 2020-08-20 22:29:55.864012254 +0200 +++ /work/SRC/openSUSE:Factory/.b4.new.5913/b4.changes 2020-11-23 18:37:55.912587726 +0100 @@ -1,0 +2,12 @@ +Mon Nov 23 10:21:55 UTC 2020 - jsl...@suse.cz + +- Update to version 0.5.2+9: + * Fix crasher when attempting a 3-way prep + * Fix handling of series with the [PATCHvX] defect + * Fix header encoding introduced by earlier fix + * Fix some cherry-picking corner cases + * Don't crash when no valid patches are found + * Use bytes when dumping to stdout + * Set charset in order to generate MIME headers + +------------------------------------------------------------------- Old: ---- b4-0.5.2+2.obscpio New: ---- b4-0.5.2+9.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ b4.spec ++++++ --- /var/tmp/diff_new_pack.0ZmFNr/_old 2020-11-23 18:37:56.488588321 +0100 +++ /var/tmp/diff_new_pack.0ZmFNr/_new 2020-11-23 18:37:56.492588326 +0100 @@ -17,9 +17,9 @@ %define skip_python2 1 -%define version_unconverted 0.5.2+2 +%define version_unconverted 0.5.2+9 Name: b4 -Version: 0.5.2+2 +Version: 0.5.2+9 Release: 0 Summary: Helper scripts for kernel.org patches License: GPL-2.0-or-later ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.0ZmFNr/_old 2020-11-23 18:37:56.532588367 +0100 +++ /var/tmp/diff_new_pack.0ZmFNr/_new 2020-11-23 18:37:56.532588367 +0100 @@ -1,4 +1,4 @@ <servicedata> <service name="tar_scm"> <param name="url">git://git.kernel.org/pub/scm/utils/b4/b4.git</param> - <param name="changesrevision">347edcdd1e7104484777e286ed30f327de17ff8d</param></service></servicedata> \ No newline at end of file + <param name="changesrevision">46b9e092457c2921653704a4f824c9674f5967cb</param></service></servicedata> \ No newline at end of file ++++++ b4-0.5.2+2.obscpio -> b4-0.5.2+9.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/b4-0.5.2+2/b4/__init__.py new/b4-0.5.2+9/b4/__init__.py --- old/b4-0.5.2+2/b4/__init__.py 2020-08-18 17:54:58.000000000 +0200 +++ new/b4-0.5.2+9/b4/__init__.py 2020-11-17 21:54:52.000000000 +0100 @@ -499,10 +499,14 @@ at = 1 atterrors = list() for lmsg in self.patches[1:]: - if cherrypick is not None and at not in cherrypick: - at += 1 - logger.debug(' skipped: [%s/%s] (not in cherrypick)', at, self.expected) - continue + if cherrypick is not None: + if at not in cherrypick: + at += 1 + logger.debug(' skipped: [%s/%s] (not in cherrypick)', at, self.expected) + continue + if lmsg is None: + logger.critical('CRITICAL: [%s/%s] is missing, cannot cherrypick', at, self.expected) + raise KeyError('Cherrypick not in series') if lmsg is not None: if self.has_cover and covertrailers and self.patches[0].followup_trailers: lmsg.followup_trailers.update(self.patches[0].followup_trailers) @@ -692,7 +696,7 @@ return None, None logger.debug('Looking at %s', lmsg.full_subject) lmsg.load_hashes() - if not len(lmsg.blob_indexes): + if not lmsg.blob_indexes: logger.critical('ERROR: some patches do not have indexes') logger.critical(' unable to create a fake-am range') return None, None @@ -1389,7 +1393,7 @@ subject = re.sub(r'^\w+:\s*\[', '[', subject) # Fix [PATCHv3] to be properly [PATCH v3] - subject = re.sub(r'^\[\s*(patch)(v\d+).*', '[$1 $2$3', subject, flags=re.I) + subject = re.sub(r'^\[\s*(patch)(v\d+)(.*)', '[\\1 \\2\\3', subject, flags=re.I) # Find all [foo] in the title while subject.find('[') == 0: diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/b4-0.5.2+2/b4/diff.py new/b4-0.5.2+9/b4/diff.py --- old/b4-0.5.2+2/b4/diff.py 2020-08-18 17:54:58.000000000 +0200 +++ new/b4-0.5.2+9/b4/diff.py 2020-11-17 21:54:52.000000000 +0100 @@ -102,6 +102,9 @@ lmbx = b4.LoreMailbox() for key, msg in mbx.items(): lmbx.add_message(msg) + if len(lmbx.series) < 1: + logger.critical('No valid patches found in %s', mboxfile) + sys.exit(1) if len(lmbx.series) > 1: logger.critical('More than one series version in %s, will use latest', mboxfile) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/b4-0.5.2+2/b4/mbox.py new/b4-0.5.2+9/b4/mbox.py --- old/b4-0.5.2+2/b4/mbox.py 2020-08-18 17:54:58.000000000 +0200 +++ new/b4-0.5.2+9/b4/mbox.py 2020-11-17 21:54:52.000000000 +0100 @@ -86,12 +86,12 @@ at = 0 for lmsg in lser.patches[1:]: at += 1 - if lmsg.msgid == msgid: + if lmsg and lmsg.msgid == msgid: cherrypick = [at] - cmdargs.cherrypick = '5' + cmdargs.cherrypick = f'<{msgid}>' break if not len(cherrypick): - logger.critical('Specified msgid is not present in the series, cannot cherry-pick') + logger.critical('Specified msgid is not present in the series, cannot cherrypick') sys.exit(1) elif cmdargs.cherrypick.find('*') >= 0: # Globbing on subject @@ -110,10 +110,14 @@ logger.critical('Writing %s', am_filename) mbx = mailbox.mbox(am_filename) - am_mbx = lser.save_am_mbox(mbx, noaddtrailers=cmdargs.noaddtrailers, - covertrailers=covertrailers, trailer_order=config['trailer-order'], - addmysob=cmdargs.addmysob, addlink=cmdargs.addlink, - linkmask=config['linkmask'], cherrypick=cherrypick) + try: + am_mbx = lser.save_am_mbox(mbx, noaddtrailers=cmdargs.noaddtrailers, + covertrailers=covertrailers, trailer_order=config['trailer-order'], + addmysob=cmdargs.addmysob, addlink=cmdargs.addlink, + linkmask=config['linkmask'], cherrypick=cherrypick) + except KeyError: + sys.exit(1) + logger.info('---') if cherrypick is None: @@ -153,7 +157,7 @@ logger.info('Prepared a fake commit range for 3-way merge (%.12s..%.12s)', rstart, rend) logger.critical('---') - if not lser.complete: + if not lser.complete and not cmdargs.cherrypick: logger.critical('WARNING: Thread incomplete!') if lser.has_cover and not cmdargs.nocover: @@ -234,8 +238,8 @@ am_mbx.close() if cmdargs.outdir == '-': logger.info('---') - with open(am_filename, 'r') as fh: - shutil.copyfileobj(fh, sys.stdout) + with open(am_filename, 'rb') as fh: + shutil.copyfileobj(fh, sys.stdout.buffer) os.unlink(am_filename) thanks_record_am(lser, cherrypick=cherrypick) @@ -511,8 +515,8 @@ mbx.close() if cmdargs.outdir == '-': logger.info('---') - with open(threadmbox, 'r') as fh: - shutil.copyfileobj(fh, sys.stdout) + with open(threadmbox, 'rb') as fh: + shutil.copyfileobj(fh, sys.stdout.buffer) os.unlink(threadmbox) return diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/b4-0.5.2+2/b4/ty.py new/b4-0.5.2+9/b4/ty.py --- old/b4-0.5.2+2/b4/ty.py 2020-08-18 17:54:58.000000000 +0200 +++ new/b4-0.5.2+9/b4/ty.py 2020-11-17 21:54:52.000000000 +0100 @@ -426,9 +426,10 @@ outgoing += 1 outfile = os.path.join(outdir, '%s.thanks' % slug) logger.info(' Writing: %s', outfile) - bout = msg.as_string(policy=b4.emlpolicy) - with open(outfile, 'wb') as fh: - fh.write(bout.encode('utf-8')) + msg.set_charset('utf-8') + msg.replace_header('Content-Transfer-Encoding', '8bit') + with open(outfile, 'w') as fh: + fh.write(msg.as_string(policy=b4.emlpolicy)) logger.debug('Cleaning up: %s', jsondata['trackfile']) fullpath = os.path.join(datadir, jsondata['trackfile']) os.rename(fullpath, '%s.sent' % fullpath) ++++++ b4.obsinfo ++++++ --- /var/tmp/diff_new_pack.0ZmFNr/_old 2020-11-23 18:37:56.652588491 +0100 +++ /var/tmp/diff_new_pack.0ZmFNr/_new 2020-11-23 18:37:56.652588491 +0100 @@ -1,5 +1,5 @@ name: b4 -version: 0.5.2+2 -mtime: 1597766098 -commit: 347edcdd1e7104484777e286ed30f327de17ff8d +version: 0.5.2+9 +mtime: 1605646492 +commit: 46b9e092457c2921653704a4f824c9674f5967cb _______________________________________________ openSUSE Commits mailing list -- commit@lists.opensuse.org To unsubscribe, email commit-le...@lists.opensuse.org List Netiquette: https://en.opensuse.org/openSUSE:Mailing_list_netiquette List Archives: https://lists.opensuse.org/archives/list/commit@lists.opensuse.org