#742 [backend] add a possibility to disable appstream builder for a project
Merged 6 months ago by praiskup. Opened 6 months ago by frostyx.
copr/ frostyx/copr appstream-attribute  into  master

@@ -115,6 +115,14 @@ 

  

  def add_appdata(path, username, projectname, lock=None):

      out = ""

+ 

+     # We need to have a possibility to disable an appstream builder for some projects

+     # because it doesn't properly scale up for a large ammount of packages

+     parent_dir = os.path.dirname(os.path.normpath(path))

+     assert parent_dir.endswith(os.path.join(username, projectname))

+     if os.path.exists(os.path.join(parent_dir, ".disable-appstream")):

+         return out

+ 

      kwargs = {

          "packages_dir": path,

          "username": username,

os.path.join(username, projectname) ?

Metadata Update from @frostyx:
- Pull-request tagged with: needs-work

6 months ago

rebased onto df8f0cede2044be97e328aa4aee843f0fd3cec8a

6 months ago

I've switched to os.path.join, os.path.exists and os.path.realpath as it was suggested on meeting.

Metadata Update from @frostyx:
- Pull-request untagged with: needs-work

6 months ago

Sorry, I probably meant os.path.normpath. Even though we don't use symlinks, realpath() has some potential to cause problems in future...

rebased onto aed994cf31a6224497aabc80741222c245e1a043

6 months ago

Sorry, I probably meant os.path.normpath.

Fixed :-)

rebased onto f61db18

6 months ago

Thanks, please merge (for some reason I can not, again ..).

Pull-Request has been merged by praiskup

6 months ago