Bug 1197512 - Failure to create link when branching packages from linked projects
Summary: Failure to create link when branching packages from linked projects
Status: NEW
Alias: None
Product: openSUSE.org
Classification: openSUSE
Component: BuildService (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Marco Strigl
QA Contact: Adrian Schröter
URL: https://build.opensuse.org/package/sh...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-03-25 09:40 UTC by Ralf Habacker
Modified: 2022-07-21 09:08 UTC (History)
0 users

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Screenshot 1 (139.89 KB, image/png)
2022-03-25 09:40 UTC, Ralf Habacker
Details
Screenshot showing linked package (46.15 KB, image/png)
2022-03-25 09:41 UTC, Ralf Habacker
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ralf Habacker 2022-03-25 09:40:12 UTC
Created attachment 857358 [details]
Screenshot 1

I have linked the project windows:mingw:win32 with home:rhabacker:linkedprojecttest 

The project meta data is as: 

<project name="home:rhabacker:linkedprojecttest">
  <title>Testproject to show issues with linked projects</title>.
  <description/>
  <link project="windows:mingw:win32"/>
  <person userid="rhabacker" role="maintainer"/>
  <build>
    <disable/>
  </build>
  <publish>
    <disable/>
  </publish>
  <repository name="openSUSE_Leap_15.3" linkedbuild="all">
    <path project="windows:mingw:win32" repository="openSUSE_Leap_15.3"/>
    <path project="windows:mingw" repository="openSUSE_Leap_15.3"/>
    <arch>x86_64</arch>
  </repository>
</project>

I checked out the package mingw32-expat with osc, updated the package to a newer version by replacing the tarball and ran osc ci. osc asked me if I wanted to create a local branch, which I confirmed.

Some of the packages are links to another project!
Create a local branch before committing? (y|N) y
Branching mingw32-expat from windows:mingw:win32 to home:rhabacker:linkedprojecttest
Delete expat-2.2.4.tar.bz2
Deleting mingw32-expat-2.2.4-rpmlintrc
Sending mingw32-expat.changes
Shipping mingw32-expat.spec
Shipping expat-2.4.7.tar.xz
Sending mingw32-expat-rpmlintrc
File data transfer ....
Transmitted revision 2.

In the project view, the package was moved from the "inherited packages" list to the "packages" list (see attached screenshot).

The problem is that this project is not linked to the original package, although it was branched. 

After I added a link afterwards with  

osc linkpac windows:mingw:win32 mingw32-expat home:rhabacker:linkedprojecttest mingw32-expat

the old tarball is still included and cannot be deleted (see screenshot 2).
 
Even clicking on the diff link does not show that the original tarball has been removed.

The link points to the latest file

<link project="windows:mingw:win32" package="mingw32-expat">
<patches>
  <!-- <branch /> for a full copy, default case -->
  <!-- <apply name="patch" /> apply a patch on the source directory -->
  <!-- <topadd>%define build_with_feature_x 1</topadd> add a line on the top (spec file only) -->
  <!-- <add name="file.patch" /> add a patch to be applied after %setup (spec file only) -->
  <!-- <delete name="filename" /> delete a file -->
</patches>
</link>
Comment 1 Ralf Habacker 2022-03-25 09:41:17 UTC
Created attachment 857359 [details]
Screenshot showing linked package
Comment 2 Ralf Habacker 2022-03-25 11:26:51 UTC
As a test I linked another package first with 

    $ osc linkpac windows:mingw:win32 mingw32-freetype home:rhabacker:linkedprojecttest

then checked it out with osc co, modified it and checked it in again with osc ci. In this case the problem does not occur. The difference is that in this case the _link file contains the deleted files as patches:

    <link project="windows:mingw:win32" package="mingw32-freetype" baserev="c1e13cf1c1f60a14cd507945f48ffef9">
      <patches>
        <delete name="freetype-2.4.12-pkgconfig.patch"/>
        <delete name="freetype-2.4.12.tar.bz2"/>
        <delete name="freetype-doc-2.4.12.tar.bz2"/>
        <apply name="project.diff"/>
      </patches>
    </link>
 
From this follows that with the described creation of the branched project the creation of the _link file does not work.

For testing, osc was used with the following version: 

    $osc --version
    0.172.0
Comment 3 Ralf Habacker 2022-03-25 11:30:39 UTC
(In reply to Ralf Habacker from comment #2)
> From this follows that with the described creation of the branched project
> the creation of the _link file does not work.

Correction: From this follows that with the described creation of the branched package the creation of the _link file does not work.
Comment 4 Ralf Habacker 2022-07-21 09:08:01 UTC
(In reply to Ralf Habacker from comment #0)
> The problem is that this project is not linked to the original package,
> although it was branched. 

This issue is still present.