Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 578084 - app-portage/grs: fail to rotate files if some other files exists
Summary: app-portage/grs: fail to rotate files if some other files exists
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Unspecified (show other bugs)
Hardware: All Linux
: Normal minor
Assignee: Anthony Basile
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-03-23 14:39 UTC by Matteo Contri
Modified: 2016-03-23 15:08 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
skip the extra file/dir that don't match pattern (0135-changed-glob-more-stricter.patch,1004 bytes, patch)
2016-03-23 14:47 UTC, Matteo Contri
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matteo Contri 2016-03-23 14:39:40 UTC
the rotate module use a wide glob but the subsequent
match expect a stricter regex.
I changed the glob (it's not perfect, but it's an improvement) and i
insert a simple if.

Reproducible: Always

Steps to Reproduce:
1. touch /var/log/grs/${build}.log.xyz




Traceback (most recent call last):
  File "/usr/bin/grsrun", line 93, in <module>
    main()
  File "/usr/bin/grsrun", line 87, in main
    mr.start()
  File "/usr/lib64/python3.4/site-packages/grs/Daemon.py", line 116, in start
    self.run()
  File "/usr/lib64/python3.4/site-packages/grs/Interpret.py", line 162, in run
    _se.seed()
  File "/usr/lib64/python3.4/site-packages/grs/Seed.py", line 46, in seed
    self.full_rotate(directory)
  File "/usr/lib64/python3.4/site-packages/grs/Rotator.py", line 68, in full_rotate
    self.rotate(obj, upper_limit=upper_limit)
  File "/usr/lib64/python3.4/site-packages/grs/Rotator.py", line 49, in rotate
    indexed_obj[int(_match.group(1))] = _obj
AttributeError: 'NoneType' object has no attribute 'group'
Comment 1 Matteo Contri 2016-03-23 14:47:22 UTC
Created attachment 428836 [details, diff]
skip the extra file/dir that don't match pattern
Comment 2 Anthony Basile gentoo-dev 2016-03-23 15:08:12 UTC
(In reply to Matteo Contri from comment #1)
> Created attachment 428836 [details, diff] [details, diff]
> skip the extra file/dir that don't match pattern

okay committed.  i made the commit message shorter.  try to stick to this style:

path/file: short description of change

So in this case:

grs/Rotator.py: make glob more strict

Also write the commit message in the active and present voice.