[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#516530: [unpack,reporting] support multiple sections



Raphael Geissert <atomo64+debian@gmail.com> writes:
> Raphael Geissert wrote:
>> Russ Allbery wrote:

>>> Oh, I owed you another reply.  Sorry, didn't realize that.

>>> Looking at the last patch, though, I still don't see any sign of
>>> this change to the package list format.  The only data being
>>> included is still just:

[...]

>> No, not at all. I missed that part, although I did modify
>> lib/Read_pkglists.pm so that it could read that info. I'll make those
>> changes and re-send it to the BTS. Thanks for reviewing it.

> I'm confused now. Just noticed that I had indeed, as I originally
> suspected, made the change on my local repo, and confirmed it in the
> last mbox I sent.

Oh, there was another patch in there on top of the previous one.  I'm
used to that now, but that confused me previously.

However, now this patch doesn't apply at all.

error: patch failed: man/lintian.1:287
error: man/lintian.1: patch does not apply
error: patch failed: reporting/html_reports:517
error: reporting/html_reports: patch does not apply
error: patch failed: unpack/list-binpkg:85
error: unpack/list-binpkg: patch does not apply
error: patch failed: unpack/list-srcpkg:82
error: unpack/list-srcpkg: patch does not apply
error: patch failed: unpack/list-udebpkg:86
error: unpack/list-udebpkg: patch does not apply

because of the renaming of section to area.  Could you rebase this patch
on the current Git repository and resubmit it?

In the process, I'd really rather not do this:

-.BR \-\-section " release"
+.BR \-\-section " release[,release[,...]]"
 When scanning for packages in the distdir, select only packages from
-section
+section(s)

+my @packages = glob("$LINTIAN_ARCHIVEDIR/dists/$LINTIAN_DIST/{$LINTIAN_SECTION}/".
+               "binary-$LINTIAN_ARCH/Packages");

I think this is a really weird use of glob, and this:

-    section      => $LINTIAN_SECTION,
+    section      => join(', ', glob("{$LINTIAN_SECTION}")),

is particularly weird.  A comma-separated set of archive areas (which
also aren't releases; the man page could use an update there as well) is
a fine syntax, but let's not then treat that as a bash glob expression.
It's not that much harder to properly split apart the list of areas:

    my @areas = split(',', $areas);
    my $base = "$LINTIAN_ARCHIVEDIR/dists/$LINTIAN_DIST";
    my @packages = map { "$base/$_/binary-$LINTIAN_ARCH/Packages" } @areas;

glob is not a frequently-used Perl function, and I think the above is a
lot clearer and easier to understand than the glob version.  I expect
glob to match files in the file system and only return matching files,
and while that happens not to be the case for the {,} construct, it's
really confusing to use glob for things where we want everything whether
it exists in the file system or not.

-- 
Russ Allbery (rra@debian.org)               <http://www.eyrie.org/~eagle/>



Reply to: