Skip to content

DAGOLDEN unified mega patch -- prepare/make, fix prereqs, recommends/suggests, default mirror #38

merged 45 commits into from Jun 14, 2013

4 participants


This patch includes all my work since Paris last year:

  • prepare/make split (mst's work)
  • fixing various prereq bugs
  • refactor get/prepare/make/test/install shorcut logic
  • recommends/suggests policies and support
  • as default mirror

I suggest it be merged to master so further work can build on it and if there any remaining bugs, we'll squash them as we go.

shadowcat-mst and others added some commits Nov 18, 2011
@shadowcat-mst shadowcat-mst factor prepare() out of make() in CPAN::Distribution (first cut) 7f21891
@shadowcat-mst shadowcat-mst factor prereq_for_slot out of unsat_prereq 34b0159
@shadowcat-mst shadowcat-mst make MM versus MB choice during prepare, not get 587b914
@xdg xdg Report no reanimation even when build_dir empty
This fixes failing t/30shell.t with Expect introduced in
commit 27252dd.
@xdg xdg make t/30shell.t tests less sensitive to output line order c0590b7
@shadowcat-mst shadowcat-mst make prepare skip already-written correctly d1b4bbf
@xdg xdg Shortcut prereq_pm if no Makefile/Build exists
If configuration aborts with "exit 0", no Makefile and
no Build file will exist.  In such a case, we shouldn't
continue checking for prerequisites.

This avoids a late, confusing warning warning about being unable to read
META if a distribution has no META.  The warning was being triggered at
the end of queue processing, when color_cmd_tmps is called to reset
everything and calls prereq_pm.
@xdg xdg xdg XXX notes aefb1ed
@xdg xdg factor out get() shortcut logic 8f943ed
@xdg xdg clean up shortcut_get code
This cleanup preserves the logic, but simplifies the code through
a a more consistent parallel structure

I added additional comments where error handling seemed unclear
or potentially incorrect
@xdg xdg have get() return true on success 4d0facb
@xdg xdg factor out prepare() shortcut logic 2a17fbb
@xdg xdg allow customizing t/30shell.t timeout with CPAN_EXPECT_TIMEOUT 9c546d7
@xdg xdg rearranging get/prepare shortcut logic 4d2689d
@xdg xdg move get's goto check into shortcut_get method 4dc1f81
@xdg xdg refactor disabled checks 94d60a1
@xdg xdg xdg question on isa_perl handling 7fe518d
@xdg xdg cleanup prepare() shortcut logic
Also moves when/how some related checks happen in make().
@xdg xdg refactor make shortcut logic c6b9c1b
@xdg xdg refactor test shortcut logic f41a54f
@xdg xdg refactor install shortcut logic e3b6eb8
@xdg xdg disabled checks can be delegated down to get() e36534e
@xdg xdg make goto stanzas consistent
They now are at the start of install/test/make/prepare/get and all
have debug statements attached
@xdg xdg make shorcut_* more consistent
Adds success/goodbye helpers to shortcut_get.

Adds debug statments shorcut_* stanzas if they didn't have them.
@xdg xdg fix indent level of shortcut_prepare 6852965
@xdg xdg Fix bugs in shortcut logic 1270d02
@xdg xdg improve configuration status message dc22709
@xdg xdg only complain about missing YAML once 4037039
@xdg xdg eliminate extra newline in missing YAML message c999f72
@xdg xdg format success() messages like goodbye() messages 98ed77d
@xdg xdg fix prereq handling logic
This unbreaks configure_requires, which was broken somewhere in

The change makes satisfy_configure_requires and satisfy_requires
have similar return logic.

It changes how queuerunner deals with return values so that
regardless of the success/failure of the method, the item processed
gets removed from the queue.

If there are prereqs that need to be satisfied first, the item was
requeued anyway.
@xdg xdg add diagnostics to delete_first 659aa40
@xdg xdg Ensure items are deleted from queue on success.
If an object is queued multiple times, it can be purged from
the queue once it completes successfully.

Now that various functions return false when prereqs are not
satisfied, this now appears safe to do.
@xdg xdg fix return value of test() based on test results e65b878
@xdg xdg fix install/test/make/prepare/get return logic 59580fc
@xdg xdg add recommends/suggests_policy options 116ffa5
@xdg xdg add interesting modules to Makefile.PL b3e14ea
@xdg xdg fix bug merging requires and build_requires
Also adds CPAN::Meta::Requirements as prereq
@xdg xdg First cut implementation of recommends/suggests support 75d95e0
@xdg xdg don't flag missing optional prereqs 3564e15
@xdg xdg note optional modules in the failure report
When failures are reported, any optional prerequisites
have "(optional)" prepended to the line to clearly
indicate the nature of the failing distribution
@xdg xdg xdg annotation 2bb6788
@xdg xdg store persistent state if prepare() is successful e3613dc
@xdg xdg make the default CPAN mirror e3e878b
@xdg xdg Update Changes for dagolden-unified branch 2b57787

Nudge. Now that 5.18 is shipped, could you please consider this for merging? Thanks!

@andk andk merged commit 2b57787 into andk:master Jun 14, 2013

Thank you!

andk commented Jun 14, 2013

This jumbo patch contains a bit too much to be practical to deal with. Please bear with me in the future and hack pull requests smaller. I decided to merge it in because it is still the beginning of a perl release cycle and we have a bit of time.

I checked the result out on my smoker and tried only one command:

force test CPAN::Test::Dummy::Perl5::Build::Fails

I got a lot of noise back:

Use of uninitialized value $prereqs{"opt_build_requires"} in concatenation (.) or string at /home/src/perl/repoperls/installed-perls/perl/v5.19.0-546-gf378d7a/127e/lib/site_perl/5.19.1/CPAN/ line 1462.
Use of uninitialized value $prereqs{"requires"} in concatenation (.) or string at /home/src/perl/repoperls/installed-perls/perl/v5.19.0-546-gf378d7a/127e/lib/site_perl/5.19.1/CPAN/ line 1462.
Use of uninitialized value $prereqs{"opt_requires"} in concatenation (.) or string at /home/src/perl/repoperls/installed-perls/perl/v5.19.0-546-gf378d7a/127e/lib/site_perl/5.19.1/CPAN/ line 1462.
Use of uninitialized value $need_length in numeric gt (>) at /home/src/perl/repoperls/installed-perls/perl/v5.19.0-546-gf378d7a/127e/lib/site_perl/5.19.1/CPAN/ line 975.
Use of uninitialized value $need_length in numeric gt (>) at /home/src/perl/repoperls/installed-perls/perl/v5.19.0-546-gf378d7a/127e/lib/site_perl/5.19.1/CPAN/ line 975.
Use of uninitialized value $need_length in numeric gt (>) at /home/src/perl/repoperls/installed-perls/perl/v5.19.0-546-gf378d7a/127e/lib/site_perl/5.19.1/CPAN/ line 975.
Use of uninitialized value $need in sprintf at /home/src/perl/repoperls/installed-perls/perl/v5.19.0-546-gf378d7a/127e/lib/site_perl/5.19.1/CPAN/ line 996.
Use of uninitialized value $need in sprintf at /home/src/perl/repoperls/installed-perls/perl/v5.19.0-546-gf378d7a/127e/lib/site_perl/5.19.1/CPAN/ line 996.
Use of uninitialized value $need in sprintf at /home/src/perl/repoperls/installed-perls/perl/v5.19.0-546-gf378d7a/127e/lib/site_perl/5.19.1/CPAN/ line 996.

Can you spot what needs to be done?

andk commented Jun 14, 2013

Oh, and it said

CPAN::Reporter: test results were not valid, Prerequisite missing:

  Module             Need            Have
  ------------------ --------------- ----
! build_requires     HASH(0xd8f6da0) n/a 
! opt_build_requires                 n/a 
! opt_requires                       n/a 
! requires                           n/a 

What's that?

andk commented Jun 14, 2013

Also watch what my make test says:

Test Summary Report
t/30shell.t          (Wstat: 65280 Tests: 200 Failed: 0)
  Non-zero exit status: 255
  Parse errors: Bad plan.  You planned 223 tests but ran 200.
t/44cpanmeta.t       (Wstat: 2048 Tests: 55 Failed: 8)
  Failed tests:  20, 25, 30, 35, 40, 45, 50, 55
  Non-zero exit status: 8
Files=21, Tests=533, 256 wallclock secs ( 0.51 usr  0.04 sys + 11.12 cusr  1.46 csys = 13.13 CPU)
Result: FAIL
Failed 2/21 test programs. 8/533 subtests failed.

Sorry about the size of it. It was originally a merge of work I did with work that mst did, with subsequent work that would have clashed with both if done separately. I wish I could have chunked it up more. Sort of the story of whoever said "I apologize for the length of this letter; I didn't have time to write a shorter one".

I'll look into the issues and see what we can do.

andk commented Jun 15, 2013

I have reverted four of the ~60 commits and all tests pass again. Suggests* and Recommends* are now incomplete or rather only rudimentary features.

andk commented Jun 16, 2013

I got a confirmation from github that the issue tracker for a pullrequest is automatically closed when a merge happens and cannot be reopened. Please direct any further discussion on this to new tickets.

@dagolden dagolden deleted the dagolden:dagolden-unified branch Mar 18, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.