#398 [dist-git] fix `cgit_pkg_list` script
Merged 5 years ago by clime. Opened 5 years ago by praiskup.
Unknown source fix-cgit-list  into  master

@@ -28,6 +28,7 @@

  Requires: python3-requests

  Requires: python3-rpkg

  Requires: python3-munch

+ Requires: findutils

  

  %{?fedora:Requires(post): policycoreutils-python-utils}

  %{?rhel:Requires(post): policycoreutils-python}

@@ -13,8 +13,12 @@

  

  newfile=`mktemp`

  

- cd /var/lib/dist-git/git/repositories

- ls > $newfile

- cp -fZ $newfile $destination

- rm $newfile

- chmod 644 $destination

+ # TODO: we should read the 'SetEnv GIT_PROJECT_ROOT /var/lib/dist-git/git'

+ # instead of hardcoding it here

+ cd /var/lib/dist-git/git

+ 

+ # We expect <user>/<copr>/<package>.git directories.

+ find -maxdepth 3 -mindepth 3 -type d -printf '%P\n' > "$newfile"

+ cp -fZ "$newfile" "$destination"

+ rm "$newfile"

+ chmod 644 "$destination"

rebased onto a8c131e

5 years ago

Still incomplete, I'll update ...

... no, this works fine for me.

Pull-Request has been merged by clime

5 years ago