thaljef / Pinto

Curate your own repository of Perl modules
https://metacpan.org/module/Pinto::Manual
66 stars 49 forks source link

Unable to remove a FUBAR'ed distribution from the repository. #162

Closed hartzell closed 9 years ago

hartzell commented 10 years ago

I have a patched distribution of Bio-SamTools. I tar'ed it up on a Mac, which seems to have been a mistake. That's a tale for another story.

I re-tar'ed it and wanted to replace the copy in the repo but am unable to. This is similar to a problem I reported to Jeff via email earlier in the week. I am unsure if the Problem Exists Between Keyboard And Chair or if there is a Pinto issue.

I tried to unregister it. Could not because it is pinned. Unpinned it, unregistered it, tried to add the new one, couldn't.

Updated Pinto, just incase. Still no joy.

georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 list
georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 unregister Bio::DB::Sam
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Bam::AlignWrapper~0 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Bam::Alignment~0 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Bam::FetchIterator~0 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Bam::Pileup~0 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Bam::PileupWrapper~0 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Bam::Query~0 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Bam::ReadIterator~0 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Bam::Target~0 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Sam~1.39 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Sam::Constants~0 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Sam::SamToGBrowse~0 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/Bio::DB::Sam::Segment~0 because it is pinned to stack master
Cannot unregister package GEORGEWH/Bio-SamTools_GNE-1.39/MyModuleBuilder~0 because it is pinned to stack master
Unable to unregister distribution GEORGEWH/Bio-SamTools_GNE-1.39.tar.gz from stack master
georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 unpin Bio::DB::Sam
georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 unregister Bio::DB::Sam
georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 add Bio-SamTools_GNE-1.39.tar.gz
A distribution already exists as GEORGEWH/Bio-SamTools_GNE-1.39.tar.gz
georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 help
[...]
georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 delete Bio-SamTools_GNE-1.39.tar.gz
Invalid distribution target: Bio-SamTools_GNE-1.39.tar.gz
georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 delete GEORGEWH/Bio-SamTools_GNE-1.39.tar.gz
GEORGEWH/Bio-SamTools_GNE-1.39.tar.gz is pinned to a stack and cannot be deleted
georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 list

TIME PASSES, pinto updated to 0.09994

georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 delete GEORGEWH/Bio-SamTools_GNE-1.39.tar.gz
GEORGEWH/Bio-SamTools_GNE-1.39.tar.gz is pinned to a stack and cannot be deleted
georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 unpin GEORGEWH/Bio-SamTools_GNE-1.39.tar.gz
GEORGEWH/Bio-SamTools_GNE-1.39.tar.gz is not registered on stack master
georgewh@rescomp232:tmp>pinto -r http://gpan.gene.com:5000 add Bio-SamTools_GNE-1.39.tar.gz
A distribution already exists as GEORGEWH/Bio-SamTools_GNE-1.39.tar.gz

The tarball is still in the repository but the packages are not in the master stack's index.

georgewh@resgpan01:v3>find authors/ | grep Sam
authors/id/G/GE/GEORGEWH/Bio-SamTools_GNE-1.39.tar.gz
georgewh@resgpan01:v3>zcat stacks/master/modules/02packages.details.txt.gz  | grep -i samto
georgewh@resgpan01:v3>
thaljef commented 10 years ago

It looks like the dist in question is pinned on some stack other than master. Do you have any other stacks?

hartzell commented 10 years ago

There should be no other stacks, and the stacks command agrees with my belief.

resgpan@resgpan01:gpan>pinto -r file://`pwd`/v3.BROKEN stacks
*  master  May 29, 2014 11:42:45 AM  georgewh  a5916bd4: Unregister GEORGEWH/Bio-SamTools_GNE-1.3...
resgpan@resgpan01:gpan>

g.

thaljef commented 10 years ago

I think I was able to reproduce the situation, and using the delete command with the --force option seems to have fixed it, but I don't yet know why.

Beware that delete is nasty. The effect on revision history is not well defined, and it may make it impossible to revert to certain revisions where the deleted distribution was present.

hartzell commented 10 years ago

Fair enough. As long as you have the issue in your sights, I'm good w/ closing this.

thaljef commented 10 years ago

I’ve found the problem and I can fix it tomorrow. But the nastiness of delete will remain. I’m open to suggestions if you have any ideas how it should behave.