Sloppy regular expression handling in --exclude etc. causes --exclude tex to exclude text also.

Bug #307011 reported by Cameron Kerr
2
Affects Status Importance Assigned to Milestone
debmirror (Debian)
Won't Fix
Unknown
debmirror (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: debmirror

This bug affects all versions of debmirror available in Ubuntu and Debian (although I have previously sent a patch to Debian)

When specifying --exclude tex to exclude the 'tex' section, the code that formulates the regular expression does not anchor the beginning or end, thus the 'text' section is also excluded. Upon further inspection there are other options that this affects as well. Here is a patch against debmirror:

782c782
< $exclude = "(".join("|", @excludes).")" if @excludes;
---
> $exclude = '^('.join("|", @excludes).')$' if @excludes;
784c784
< "(".join("|", @excludes_deb_section).")" if @excludes_deb_section;
---
> '^('.join("|", @excludes_deb_section).')$' if @excludes_deb_section;
786,787c786,787
< "(".join("|", @limit_priority).")" if @limit_priority;
< $include = "(".join("|", @includes).")" if @includes;
---
> '^('.join("|", @limit_priority).')$' if @limit_priority;
> $include = '^('.join("|", @includes).')$' if @includes;

Revision history for this message
KarlGoetz (kgoetz) wrote :

can someone delete the upstream bug link? it was intended for a different report.

Revision history for this message
KarlGoetz (kgoetz) wrote :

Attempting to update the bug watch to the correct link

Revision history for this message
KarlGoetz (kgoetz) wrote :

I note this bug is tagged 'wontfix' by the debian maintainer, so if its fixed in ubuntu it will likely be an ongoing delta.

Changed in debmirror (Debian):
status: Unknown → Won't Fix
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.