@@ -139,7 +139,7 @@ def populate(self, values):
139
139
def files_list (self ):
140
140
data_file = io .TextIOWrapper (io .BytesIO (self .files ), encoding = 'UTF-8' )
141
141
try :
142
- info = parse_info (data_file )
142
+ info = parse_info (self . name , 'BytesIO' , data_file )
143
143
except UnicodeDecodeError :
144
144
logger .warning ("Could not correctly decode files list for %s" ,
145
145
self .name )
@@ -523,7 +523,7 @@ def filesonly_update(archname, reponame, pkgs, force=False):
523
523
logger .info ('Finished updating arch: %s' , archname )
524
524
525
525
526
- def parse_info (iofile ):
526
+ def parse_info (pkgname , filename , iofile ):
527
527
"""
528
528
Parses an Arch repo db information file, and returns variables as a list.
529
529
"""
@@ -540,7 +540,7 @@ def parse_info(iofile):
540
540
elif blockname :
541
541
store [blockname ].append (line )
542
542
else :
543
- raise Exception ("Read package info outside a block: %s" % line )
543
+ raise Exception ("%s: Read package info outside a block while reading from %s : %s" % ( pkgname , filename , line ) )
544
544
return store
545
545
546
546
@@ -581,7 +581,7 @@ def parse_repo(repopath):
581
581
data_file = repodb .extractfile (tarinfo )
582
582
data_file = io .TextIOWrapper (io .BytesIO (data_file .read ()), encoding = 'UTF-8' )
583
583
try :
584
- pkgs [pkgid ].populate (parse_info (data_file ))
584
+ pkgs [pkgid ].populate (parse_info (pkgid , fname , data_file ))
585
585
except UnicodeDecodeError :
586
586
logger .warning ("Could not correctly decode %s, skipping file" , tarinfo .name )
587
587
data_file .close ()
0 commit comments