Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problems adding additional repotype #7679

Open
rhabacker opened this issue Jun 4, 2019 · 3 comments
Open

Problems adding additional repotype #7679

rhabacker opened this issue Jun 4, 2019 · 3 comments
Labels
Backend Things regarding the OBS backend

Comments

@rhabacker
Copy link
Contributor

rhabacker commented Jun 4, 2019

I tried to add an additional reptype "rpmdb" to bs_publish to allow direct access to Windows Installer and portable binary packages in rpm containers (e.g. https://build.opensuse.org/package/view_file/windows:mingw:win32/mingw32-dbus-1/mingw32-dbus-1-installer.spec?expand=1) and got lost in the details of the huge publish() function (

).

While creating and deleting entire repositories is very easy (since only two additional small functions are required), this cannot be said for installing, removing and updating packages implemented in a single 1100-line function that covers all cases and repository types together. It's also not easy to see which part of this function is for which repo type, which is important to add new repo types completely.

To facilitate maintenance and further expansion, it would be nice if this function were refactoed. A variant would be:

  1. a common setup function for all repo types
  2. single functions for publishing parts and repo types, similar to creating and deleting repositories
  3. a common post-setup function.

This would make adding new repository types much easier.

@dmarcoux dmarcoux added the Backend Things regarding the OBS backend label Jun 5, 2019
@dmarcoux
Copy link
Contributor

dmarcoux commented Jun 5, 2019

@mlschroe, please have a look.

@rhabacker
Copy link
Contributor Author

If someone like to know how the "rpmdb" support is intended to work:

  1. The project need to have set Repotype: rpmdb in the project config

  2. publishing a repository: a rpm database is created in the published directory.

  3. unpublishing a repository: the database and all installed files are deleted.

  4. publishing new rpm packages: they are installed with rpm -i using the published directory as database root dir.
    Note: This case relates to packages, which are in the list to publish but not installed in the rpmdb.

  5. unpublishing packages: package to unpublish are removed by running rpm -e with the published directory as database root dir.
    Note: The "unpublishing a package" case relates to packages, which are installed but not in the list of packages to publish.

  6. updating packages: The related package is updated with rpm -U
    Note: This case relates to packages, which are installed and are in the list of packages to publish, but with a different version.

Explained with the initial example in the repository after publishing there are the following files/dirs

 .../
  openSUSE_Leap_42.3/
    dbus-1-1.12.14-bin.7z
    dbus-1-1.12.14-setup.exe
    dbus-1-1.12.14-debug.7z
    dbus-1-1.12.14-src.7z
    var/ # rpmdb

rhabacker added a commit to rhabacker/open-build-service that referenced this issue Jul 10, 2019
This refactoring provides the counterpart of deleterepo() to increase
code readability.

see openSUSE#7679
rhabacker added a commit to rhabacker/open-build-service that referenced this issue Jul 10, 2019
This refactoring provides the counterpart of deleterepo() to increase
code readability.

see openSUSE#7679
rhabacker added a commit to rhabacker/open-build-service that referenced this issue Jul 11, 2019
This refactoring provides the counterpart of deleterepo() to increase
code readability.

see openSUSE#7679
rhabacker added a commit to rhabacker/open-build-service that referenced this issue Jul 12, 2019
This refactoring provides the counterpart of deleterepo() to increase
code readability.

see openSUSE#7679
@rhabacker
Copy link
Contributor Author

Is there any progress with this issue ?

Windows binaries created on obs are used to provide snapshots for KMyMoney (see https://kmymoney.org/snapshots.php) and people are still forced to use 7zip to unpack the containers to get the portable package or the installer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend Things regarding the OBS backend
Projects
None yet
Development

No branches or pull requests

2 participants