Skip to content

Commit

Permalink
Merge pull request #4 from miracl/mergefix
Browse files Browse the repository at this point in the history
Mergefix
  • Loading branch information
nicolaasuni authored Mar 24, 2017
2 parents c4df12c + dce6e28 commit 0a00cb8
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 19 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -72,3 +72,6 @@ ENV/

# Rope project settings
.ropeproject

# Temporary folder
.mkrepo/
14 changes: 9 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,13 +33,17 @@ Python libraries:
So you may skip them in command line invocation in case you have aws config.

``` bash
mkrepo.py [-h] [--s3-access-key-id S3_ACCESS_KEY_ID]
[--s3-secret-access-key S3_SECRET_ACCESS_KEY]
[--s3-endpoint S3_ENDPOINT] [--s3-region S3_REGION]
[--sign]
path [path ...]
mkrepo.py [-h]
[--temp-dir TEMP_DIR]
[--s3-access-key-id S3_ACCESS_KEY_ID]
[--s3-secret-access-key S3_SECRET_ACCESS_KEY]
[--s3-endpoint S3_ENDPOINT]
[--s3-region S3_REGION]
[--sign]
path [path ...]
```

* `--temp-dir` - /(optional)/directory used to store temporary artifacts (default is ./.mkrepo)
* `--s3-access-key-id` - /(optional)/ specify S3 access key ID
* `--s3-secret-access-key` - /(optional)/ specify S3 secret key
* `--s3-endpoint` - /(optional)/ specify S3 server URI
Expand Down
9 changes: 0 additions & 9 deletions debrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -253,15 +253,6 @@ def split_pkg_path(pkg_path):

component = 'main'

#package = match.group('package')
# if package is None:
# package = 'none'
#version = match.group('version')
# if version is None:
# version = '0.0.0-0'
#revision = match.group('revision')
# if revision is None:
# revision = ''
dist = match.group('dist')
if dist is None:
dist = 'all'
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ <h2 id="command-line-reference">Command-line reference</h2>
[<span class="kw">--sign</span>]
<span class="kw">path</span> [path ...]</code></pre></div>
<ul>
<li><code>--temp-dir</code> - /(optional)/directory used to store temporary artifacts</li>
<li><code>--temp-dir</code> - /(optional)/directory used to store temporary artifacts (default is ./.mkrepo)</li>
<li><code>--s3-access-key-id</code> - /(optional)/ specify S3 access key ID</li>
<li><code>--s3-secret-access-key</code> - /(optional)/ specify S3 secret key</li>
<li><code>--s3-endpoint</code> - /(optional)/ specify S3 server URI</li>
Expand Down
2 changes: 1 addition & 1 deletion mkrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def main():

parser.add_argument(
'--temp-dir',
default=None,
default="./.mkrepo",
help='directory used to store temporary artifacts'
)

Expand Down
6 changes: 3 additions & 3 deletions rpmrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

try:
import xml.etree.cElementTree as ET
except BaseException:
except ImportError:
import xml.etree.ElementTree as ET


Expand Down Expand Up @@ -93,12 +93,12 @@ def sign_metadata(repomdfile):
exit(1)


def setup_repository(repo):
def setup_repository(repo, tempdir):
"""Make sure a repo is present at repopath"""
if repo._grab.storage.exists("repodata/repomd.xml"):
return

tmpdir = tempfile.mkdtemp()
tmpdir = tempfile.mkdtemp('', 'tmp', tempdir)
cmd = ['createrepo', '--no-database', tmpdir]
subprocess.check_output(cmd)
repo._grab.syncdir(os.path.join(tmpdir, "repodata"), "repodata")
Expand Down

0 comments on commit 0a00cb8

Please sign in to comment.