From 30155ba17b84c4733e131db56807926246c7cc43 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Sun, 28 Apr 2013 22:36:51 +0200 Subject: [PATCH] Fix template-repo handling - chown it and clean only current one Without chown, normal user cannot remove it (in next prepare-repo-template). Also fix prepare-repo-template to clean only current repo, not all of them. --- Makefile | 2 +- scripts_archlinux/04_install_qubes.sh | 2 ++ scripts_fedora/00_prepare.sh | 1 + 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index bfdc67d..964ad98 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ update-repo-installer: ln -f rpm/noarch/qubes-template-$(TEMPLATE_NAME)-$(VERSION)-$(shell cat build_timestamp_$(DIST))*.noarch.rpm $$UPDATE_REPO/rpm prepare-repo-template: - rm -rf yum_repo_qubes/* + rm -rf yum_repo_qubes/$(DIST) mkdir -p yum_repo_qubes/$(DIST)/rpm yum_repo_qubes/$(DIST)/repodata clean: diff --git a/scripts_archlinux/04_install_qubes.sh b/scripts_archlinux/04_install_qubes.sh index a6ffaeb..728bd8a 100755 --- a/scripts_archlinux/04_install_qubes.sh +++ b/scripts_archlinux/04_install_qubes.sh @@ -25,6 +25,8 @@ sudo mount --bind $CUSTOMREPO $INSTALLDIR/mnt/qubes-rpms-mirror-repo sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "cd /mnt/qubes-rpms-mirror-repo/;repo-add pkgs/qubes.db.tar.gz pkgs/*.pkg.tar.xz" +chown -R --reference=$CUSTOMREPO $CUSTOMREPO + sudo ./mnt_archlinux_dvd/usr/bin/arch-chroot $INSTALLDIR sh -c "pacman -Sy" echo "--> Installing qubes-packages..." diff --git a/scripts_fedora/00_prepare.sh b/scripts_fedora/00_prepare.sh index a351ebf..f7a9fa5 100755 --- a/scripts_fedora/00_prepare.sh +++ b/scripts_fedora/00_prepare.sh @@ -7,3 +7,4 @@ ln -sf base_rpms_$DIST base_rpms popd createrepo -q -g $PWD/comps-qubes-template.xml yum_repo_qubes/$DIST -o yum_repo_qubes/$DIST +chown -R --reference=yum_repo_qubes/$DIST yum_repo_qubes/$DIST