Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses
 
PerlMonks  

PPM performs uneeded checks

by biohisham (Priest)
on Jan 13, 2010 at 12:18 UTC ( [id://817158]=perlquestion: print w/replies, xml ) Need Help??

biohisham has asked for the wisdom of the Perl Monks concerning the following question:

G'day dear monks, I have been using the Perl Package Manager utility, I find it easier and more effective than downloading a .zip version of a certain module and compiling it manually on my Windows XP, however, lately, after having installed BioPerl, which required configuring many repositories I started to notice that the ppm-terminal takes forever to perform its tasks because it goes downloading each one of these repositories packlists individually and this behavior is teasingly unnerving that even if I wanted to install a module right away the ppm terminal would still go ahead and check through all these steps "
ppm 4.05 (ActivePerl 1005) Copyright (C) 2009 ActiveState Software Inc. All rights reserved. ppm> search DB_File Downloading ActiveState Package Repository packlist...done Downloading BioPerl-Release Candidates packlist...redirect Downloading BioPerl-Release Candidates packlist...done Downloading BioPerl-Release Candidates BioPerl-DB PPD...not modified Downloading BioPerl-Release Candidates BioPerl-Network PPD...not modif +ied Downloading BioPerl-Release Candidates BioPerl-Run PPD...not modified Downloading BioPerl-Release Candidates BioPerl PPD...done Downloading BioPerl-Regular Releases packlist...not modified Downloading Kobes packlist...done Updating Kobes database...done Downloading Bribes packlist... 62%
"

This way, an otherwise simple few minutes job does take 15 minutes on average. My question is, can there possibly be anyways I can let the ppm bypass/circumvent these steps and go directly to do what I want it to do instead? (Read, downloading from a single repository and avoiding these unnecessary checks). Reading through the "Manage and search repositories" in ppm's help did not provide any insights and as you could see from the above snapshot, I was just searching for the module "DB_File", so going through all these steps in order to tell me that this module exists in "ActiveState Package Repository" is impractical..

1: Bundle-Tie-DB_File-SplitHash A bundle to install all Tie::DB_File::SplitHash related modules Version: 1.01 Released: 1999-06-18 Author: Benjamin Franz <snowhare@nihongo.org> Provide: Bundle::Tie::DB_File::SplitHash version 1.01 Repo: ActiveState Package Repository CPAN: http://search.cpan.org/dist/Bundle-Tie-DB_File-SplitHash-1.01 +/

UPDATE: Acting on the tip from Marshall I ran the PPM GUI and went to Edit|Preferences|Repositories and just disabled the repositories I did not want PPM to check by clicking on the small icons to the left and it just worked fine alright.

BrowserUk has provided a direct way to perform the same and to view the repositories tied to the PPM and enabling/disabling them in the ppm-shell environment itself.

Now both the ppm-shell and GUI are lighter and thunder-speed, thanks..


Excellence is an Endeavor of Persistence. Chance Favors a Prepared Mind.

Replies are listed 'Best First'.
Re: PPM performs uneeded checks
by BrowserUk (Patriarch) on Jan 13, 2010 at 13:33 UTC

    If you know the url of the .PPD file for the module you wish to install, then you can completely bypass the search:

    PPM> install http://www.bribes.org/perl/ppm/SomePackage.ppd
    

    Google's usually much quicker to find them than the built-in search.

    Alternatively, if you know which repository has the module you want, you can disable the others before doing the search:

    ppm> repo list
    ┌────┬───────┬────────────────────────────────┐
    │ id │ pkgs  │ name                           │
    ├────┼───────┼────────────────────────────────┤
    │  1 │ 12055 │ ActiveState Package Repository │
    │  2 │   n/a │ www.Bribes.org                 │
    │  3 │     0 │ cpan.uwinnipeg.ca              │
    └────┴───────┴────────────────────────────────┘
     (2 enabled repositories)
    ppm> repo off 3
    ppm> repo list
    ┌────┬───────┬────────────────────────────────┐
    │ id │ pkgs  │ name                           │
    ├────┼───────┼────────────────────────────────┤
    │  1 │ 12055 │ ActiveState Package Repository │
    │  2 │   n/a │ www.Bribes.org                 │
    │  3 │   n/a │ cpan.uwinnipeg.ca              │
    └────┴───────┴────────────────────────────────┘
     (1 enabled repository)
    ppm>
    

    At this point, a search would only download the packlist for the AS repo.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re: PPM performs uneeded checks
by Marshall (Canon) on Jan 13, 2010 at 12:49 UTC
    Geez, I am only using PPM 4.03. I just started it and repository sync took about 40 seconds for ActiveState and trouchelle. I haven't used the terminal I/F for more than a year+. I recommend using the PPM GUI.

    Type "ppm" at the command prompt and the GUI will start. No need to use the older command line version of this. Once DB sync is done, you have a list of all packages on all repositories that are available,upgradeable, etc.

    Go to Edit|Preferences|Repositories to modify the places that PPM looks at. It will be faster with fewer repositories.

    Update: I just ran this thing 5 times. It sync's with the ActiveState repository very fast (some 5-10 seconds with repeated starts...I guess it knows if there is something new there or not). It could possibly be that one of your repositories is slow and this hangs things up? Anyway once the GUI syncs, the "search" is sub-second fast as all data is resident on your computer.

Re: PPM performs uneeded checks
by Anonymous Monk on Jan 13, 2010 at 17:07 UTC
    Don't forget that it also runs ActivePerl::DocTools::WriteTOC() after every install (even modifies ExtUtils::MakeMaker (or Install) to run it) which gets very slow when installing more than one module.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://817158]
Approved by Corion
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (5)
As of 2024-04-19 15:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found