obsolete_package: Obsolete a DataONE Package with a new version

View source: R/obsolete_package.R

obsolete_packageR Documentation

Obsolete a DataONE Package with a new version

Description

This function obsoletes a DataONE package with a newer version by merging the two version chains. The ideal use case for this function is when the only option to fix a broken package is by re-uploading a previous version and merging the two version chains. In other cases arcticdatautils::publish_update() should be used.

Usage

obsolete_package(mn, metadata_obsolete, metadata_new)

Arguments

mn

(MNode) The DataONE member node.

metadata_obsolete

(character) The metadata PID of the old, or broken, version. Any metadata PID from the obsolete version chain can be used - sets the PID to the end of the version chain.

metadata_new

(character) The metadata PID of the new version. Any metadata PID from the new version chain can be used - sets the PID to the beginning of the version chain.

Value

(logical) TRUE/FALSE

Author(s)

Dominic Mullen, dmullen17@gmail.com

Examples

## Not run: 
cn <- dataone::CNode("STAGING")
mn <- dataone::getMNode(cn,"urn:node:mnTestARCTIC")

pkg_old <- arcticdatautils::create_dummy_package(mn)
pkg_new <- arcticdatautils::create_dummy_package(mn)

obsolete_package(mn, pkg_old$metadata, pkg_new$metadata)

## End(Not run)

NCEAS/datamgmt documentation built on June 5, 2023, 6:14 a.m.