Bug 6356 - ability to mirror specific packages desired
: ability to mirror specific packages desired
Status: RESOLVED FIXINSOURCE
Product: pkg
cli
: unspecified
: ANY/Generic OpenSolaris
: P3 enhancement (vote)
: ---
Assigned To: Shawn Walker
: pkg/depot watcher
:
: UC2 jsc-qa
:
: 8898
:
  Show dependency treegraph
 
Reported: 2009-02-04 02:19 UTC by Rudolf Kutina
Modified: 2009-05-27 09:04 UTC (History)
6 users (show)

See Also:


Attachments


Note

You need to log in before you can comment on or make changes to this bug.


Description Rudolf Kutina 2009-02-04 02:19:40 UTC
When cloning package from one REPOsitory to another with PKGrev/PKGsend there
is no easy way how to keep same FMRI (Timestamp).

Ideally will be if I can force timesmap on "close"
Comment 1 Danek Duvall 2009-02-04 06:31:52 UTC
You're going to need to expand your rationale for this one.
Comment 2 Dan Price 2009-02-06 14:09:08 UTC
I presume he's attempting to use pkgrecv/pkgsend to exactly duplicate a
repository.
Comment 3 Shawn Walker 2009-02-06 14:10:59 UTC
(In reply to comment #2)
> I presume he's attempting to use pkgrecv/pkgsend to exactly duplicate a
> repository.

If that's the case; I'd rather not oblige.  It's a horribly inefficient way to
mirror a repository.
Comment 4 Rudolf Kutina 2009-02-06 23:04:22 UTC
Yes, to have exact clone of some relatively small subset of resporitoy (of
course, not a whole one) , for example create a local copy of Live-CD content
to test image update which is generated with AI or DC, to generate demo repo
for AI and DC Virtual Applicens and so on.

On discusion threads are scripts which use wget and undocumented repo feautures
to make whole REPO clone (which I will never need), it will be nice if I can do
it right with "pkg recv from public/pkg send to local" and get exact same FMRI
(timestaps).

Alternative option of cource is to supply official tool to which I can put as
parameter a list of FMRIs and get a exact local copy of them.
Comment 5 Shawn Walker 2009-02-06 23:24:42 UTC
(In reply to comment #4)
> Alternative option of cource is to supply official tool to which I can put as
> parameter a list of FMRIs and get a exact local copy of them.

I think the tool approach is better as I wouldn't want to solve a
*non*-publishing problem using publishing tools.

It would be far more efficient (and less prone to error) to have a tool focused
on repository management.

It seems like the previously discused "depotadm", once implemented, could have
a "copy" subcommand where you could specify a list (or file containing a list
of) of fmris to copy from another repository.

That would also match up better with the local publishing work I'm doing for
bug 2691 as you could use the tool to easily copy specific packages from one
disk repository to another without ever having to run a daemon process.
Comment 6 Shawn Walker 2009-02-06 23:28:51 UTC
Please note that there may be some interesting considerations to resolve here
in regards to authorities.
Comment 7 Joe Di Pol 2009-03-04 09:02:14 UTC
We (the Update Center project) in SWI also have the need to
be able to selectively copy packages from one repository 
to another without the timestamp being modified.
Comment 8 Tom Mueller 2009-04-13 07:39:12 UTC
Making this bug dependent on bug 5562 because of the problem that local times
causes when trying to copy a package from one repository to another.  If the
source repository was running in a timezone east of GMT, then if updatelog
entries are copied directly to a repository that is going to run in a timezone
west of GMT, the catalog update logic will not work correctly in the resulting
repository. If bug 5562 is fixed, then this would not be a problem.
Comment 9 Shawn Walker 2009-05-27 09:00:23 UTC
Updatelog entries are really about when a package was added to a repository,
and not when it was necessarily, originally published.

As such, this really isn't dependent on the server local time being UTC.

Doing this is dependent on being able to specify a timestamp when opening a
publishing transaction though.

Also, this functionality was implemented in the changes for bug 6342 and bug
8898.
Comment 10 Shawn Walker 2009-05-27 09:01:22 UTC
As for the differing timezone aspect, the best advice I can provide to someone
is to ensure their timezone matches the source repository's until bug 5562 is
resolved.

Implemented in changeset 1118 / f2dd6916517307b5b0dfb4b21de56afed63ec577.
Comment 11 Shawn Walker 2009-05-27 09:04:13 UTC
Please note that since the new pkgrecv capabilities are essentially just
republishing an existing package, but with the exact same timestamp as the
original server's, that it doesn't really matter if the destination
repository's timezone matches the source repository's timezone since new
updatelog entries are added to the destination; not copied from the source.

I should also note that while the updatelog entries on the source server are
done in local time, the timestamps assigned to package FMRIs at original
publication are in UTC:

open_time = datetime.datetime.utcnow()