Mailinglist Archive: opensuse-buildservice (65 mails)
< Previous | Next > |
Re: [opensuse-buildservice] Copypac'ing a package that is a link and preserve that link (and why does that not work when using osc copypac -K aka --keep-link)
- From: Marcus Hüwe <suse-tux@xxxxxx>
- Date: Thu, 6 Sep 2018 00:04:21 +0200
- Message-id: <20180905220421.ukecmhnwzcynr2dr@linux.fritz.box>
Hi,
On 2018-09-05 22:37:19 +0200, Johannes Kastl wrote:
link (see below).
following:
Case 1: tprj/tpkg is a link
Case 1.1: tprj/tpkg is a branch
That is, tpkg contains a _link file. Let's assume the _link points to
the foo/bar package. After running the copypac, tprj/tpkg contains
the _link file (*) and all files from sprj/spkg's "expanded" revision.
The tprj/tpkg package is still a branch that points to the foo/bar package.
(*) the _link file might have a different baserev (this is done so that
we do not end up with a broken link)
Case 1.2: tprj/tpkg is not a branch
Again, it keeps/updates the _link file in the tprj/tpkg package. For the
details have a look at sub keeplink in BSSrcServer/Link.pm :)
Case 2: tprj/tpkg is not a link
In this case, "osc copypac -K sprj spkg tprj tpkg" is the same as
"osc copypac -e sprj spkg tprj tpkg".
Marcus
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx
On 2018-09-05 22:37:19 +0200, Johannes Kastl wrote:
today we stumbled upon a snag in osc copypac. The task was to copy aYes, that's the intended behavior.
package, that is a link with a link diff, to another project within the
same (private) buildservice instance. In our case the link was to a
package on the openSUSE buildservice.
We found that using "osc copypac -e" works as expected, the resulting
package is no longer a link.
We also found that using no options (no -e, no -K) copies the link, i.e.Yes, that's the intended behavior.
the new package is still a link with a link diff, pointing to the
original target.
But we found that using -K, which is also called --keep-link, does notYes, that's the intended behavior if the new/target package is _not_ a
keep the link. Instead we had the same result as when calling osc
copypac with -e.
link (see below).
Unfortunately, the man page is pretty confusing here.Let's assume we run "osc copypac -K sprj spkg tprj tpkg". This does the
-K, --keep-link keep the source link in target, this also expands
the source
But this is also not consistent, we got the same state three times while
copying another package, i.e. copying with "-e", "-K" or without options
resulted in a package that was no link anymore. We found no consistent
explanation for that behaviour.
I'll try to set up a reproducible example on the openSUSE build service
tomorrow.
In the meantime, can someone please explain what "-K" aka "--keep-link"
is supposed to do?
following:
Case 1: tprj/tpkg is a link
Case 1.1: tprj/tpkg is a branch
That is, tpkg contains a _link file. Let's assume the _link points to
the foo/bar package. After running the copypac, tprj/tpkg contains
the _link file (*) and all files from sprj/spkg's "expanded" revision.
The tprj/tpkg package is still a branch that points to the foo/bar package.
(*) the _link file might have a different baserev (this is done so that
we do not end up with a broken link)
Case 1.2: tprj/tpkg is not a branch
Again, it keeps/updates the _link file in the tprj/tpkg package. For the
details have a look at sub keeplink in BSSrcServer/Link.pm :)
Case 2: tprj/tpkg is not a link
In this case, "osc copypac -K sprj spkg tprj tpkg" is the same as
"osc copypac -e sprj spkg tprj tpkg".
Marcus
--
To unsubscribe, e-mail: opensuse-buildservice+unsubscribe@xxxxxxxxxxxx
To contact the owner, e-mail: opensuse-buildservice+owner@xxxxxxxxxxxx
< Previous | Next > |