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

Merged
merged 45 commits into from Jun 14, 2013

Conversation

Projects
None yet
4 participants
@ghost
Contributor

ghost commented Apr 13, 2013

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
  • www.cpan.org 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

Report no reanimation even when build_dir empty
This fixes failing t/30shell.t with Expect introduced in
commit 27252dd.
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.
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
cleanup prepare() shortcut logic
Also moves when/how some related checks happen in make().
make goto stanzas consistent
They now are at the start of install/test/make/prepare/get and all
have debug statements attached
make shorcut_* more consistent
Adds success/goodbye helpers to shortcut_get.

Adds debug statments shorcut_* stanzas if they didn't have them.
fix prereq handling logic
This unbreaks configure_requires, which was broken somewhere in
refactoring.

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.
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.
fix bug merging requires and build_requires
Also adds CPAN::Meta::Requirements as prereq

xdg added some commits Apr 2, 2012

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

@dagolden dagolden referenced this pull request Apr 13, 2013

Closed

split prepare/make stuff #26

@miyagawa miyagawa referenced this pull request in miyagawa/cpanminus May 7, 2013

Closed

Never install recommended modules by default #252

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost May 22, 2013

Contributor

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

Contributor

ghost commented May 22, 2013

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

@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 14, 2013

Contributor

Thank you!

Contributor

ghost commented Jun 14, 2013

Thank you!

@andk

This comment has been minimized.

Show comment
Hide comment
@andk

andk Jun 14, 2013

Owner

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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm line 996.

Can you spot what needs to be done?

Owner

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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm 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/Reporter.pm line 996.

Can you spot what needs to be done?

@andk

This comment has been minimized.

Show comment
Hide comment
@andk

andk Jun 14, 2013

Owner

Oh, and it said

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

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

What's that?

Owner

andk commented Jun 14, 2013

Oh, and it said

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

  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

This comment has been minimized.

Show comment
Hide comment
@andk

andk Jun 14, 2013

Owner

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.
Owner

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.
@ghost

This comment has been minimized.

Show comment
Hide comment
@ghost

ghost Jun 15, 2013

Contributor

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.

Contributor

ghost commented Jun 15, 2013

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

This comment has been minimized.

Show comment
Hide comment
@andk

andk Jun 15, 2013

Owner

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

Owner

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

This comment has been minimized.

Show comment
Hide comment
@andk

andk Jun 16, 2013

Owner

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.

Owner

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