aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-25 18:08:27 +0000
committerMartin Whitaker <mageia@martin-whitaker.me.uk>2018-11-25 18:29:06 +0000
commit4c5a904babd8dbeb3a002ef928fa42d70e6aed58 (patch)
tree0d57a9bebca89727d9e2320c6d0a570d33383c26
parentf2caaa0e357b2a321fe5e26b08c4c1ad50c96be2 (diff)
downloadqarepo-4c5a904babd8dbeb3a002ef928fa42d70e6aed58.tar
qarepo-4c5a904babd8dbeb3a002ef928fa42d70e6aed58.tar.gz
qarepo-4c5a904babd8dbeb3a002ef928fa42d70e6aed58.tar.bz2
qarepo-4c5a904babd8dbeb3a002ef928fa42d70e6aed58.tar.xz
qarepo-4c5a904babd8dbeb3a002ef928fa42d70e6aed58.zip
Use file:// prefix when adding local repository, to only allow local path.
-rw-r--r--qarepo1
-rwxr-xr-xqarepo-helper2
2 files changed, 2 insertions, 1 deletions
diff --git a/qarepo b/qarepo
index 29962c5..b7629d7 100644
--- a/qarepo
+++ b/qarepo
@@ -386,6 +386,7 @@ sub set_qa_repo_info {
my $repo_name_and_url = `urpmq --list-url | grep '$qa_repo_name '`;
chomp($repo_name_and_url);
+ $repo_name_and_url =~ s#file://##;
$active_qa_repo = $repo_name_and_url =~ s/\Q$qa_repo_name\E\s+(\S+)\/$arch/$1/r;
diff --git a/qarepo-helper b/qarepo-helper
index 00107fa..49a4b61 100755
--- a/qarepo-helper
+++ b/qarepo-helper
@@ -1,6 +1,6 @@
#!/bin/sh
case $1 in
disable) /usr/sbin/urpmi.removemedia "QA Testing ($2-bit)";;
- enable) /usr/sbin/urpmi.addmedia --update "QA Testing ($2-bit)" $3;;
+ enable) /usr/sbin/urpmi.addmedia --update "QA Testing ($2-bit)" file://$3;;
update) /usr/sbin/urpmi.update "QA Testing ($2-bit)";;
esac