Skip to content

Instantly share code, notes, and snippets.

@abutcher
Created October 19, 2013 20:31
Show Gist options
  • Select an option

  • Save abutcher/7061148 to your computer and use it in GitHub Desktop.

Select an option

Save abutcher/7061148 to your computer and use it in GitHub Desktop.
diff --git a/VERSION b/VERSION
index 09a3acf..7ceb040 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-0.6.0
\ No newline at end of file
+0.6.1
\ No newline at end of file
diff --git a/docs/man/man1/juicer-admin.1 b/docs/man/man1/juicer-admin.1
index 6eace62..1437222 100644
--- a/docs/man/man1/juicer-admin.1
+++ b/docs/man/man1/juicer-admin.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: juicer-admin
-.\" Author: [see the "AUTHOR" section]
+.\" Author: :doctype:manpage
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 10/10/2013
+.\" Date: 10/19/2013
.\" Manual: Pulp repos and release carts
-.\" Source: Juicer 0.6.0
+.\" Source: Juicer 0.6.1
.\" Language: English
.\"
-.TH "JUICER\-ADMIN" "1" "10/10/2013" "Juicer 0\&.6\&.0" "Pulp repos and release carts"
+.TH "JUICER\-ADMIN" "1" "10/19/2013" "Juicer 0\&.6\&.1" "Pulp repos and release carts"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -209,3 +209,9 @@ Juicer is released under the terms of the GPLv3+ License\&.
\fBPulp User Documentation\fR \(em https://pulp\-user\-guide\&.readthedocs\&.org/en/pulp\-2\&.0/
.sp
The Juicer Homepage: https://github\&.com/juicer/juicer/
+.SH "AUTHOR"
+.PP
+\fB:doctype:manpage\fR
+.RS 4
+Author.
+.RE
diff --git a/docs/man/man1/juicer.1 b/docs/man/man1/juicer.1
index 2a0f536..630929d 100644
--- a/docs/man/man1/juicer.1
+++ b/docs/man/man1/juicer.1
@@ -1,13 +1,13 @@
'\" t
.\" Title: juicer
-.\" Author: [see the "AUTHOR" section]
+.\" Author: :doctype:manpage
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 10/10/2013
+.\" Date: 10/19/2013
.\" Manual: Pulp repos and release carts
-.\" Source: Juicer 0.6.0
+.\" Source: Juicer 0.6.1
.\" Language: English
.\"
-.TH "JUICER" "1" "10/10/2013" "Juicer 0\&.6\&.0" "Pulp repos and release carts"
+.TH "JUICER" "1" "10/19/2013" "Juicer 0\&.6\&.1" "Pulp repos and release carts"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -416,3 +416,9 @@ Juicer is released under the terms of the GPLv3+ License\&.
\fBjuicer\-admin\fR(1), \fBjuicer\&.conf\fR(5)
.sp
The Juicer Homepage: https://github\&.com/juicer/juicer/
+.SH "AUTHOR"
+.PP
+\fB:doctype:manpage\fR
+.RS 4
+Author.
+.RE
diff --git a/docs/man/man5/juicer.conf.5 b/docs/man/man5/juicer.conf.5
index aefffe4..9a7292d 100644
--- a/docs/man/man5/juicer.conf.5
+++ b/docs/man/man5/juicer.conf.5
@@ -1,13 +1,13 @@
'\" t
.\" Title: juicer.conf
-.\" Author: [see the "AUTHOR" section]
+.\" Author: :doctype:manpage
.\" Generator: DocBook XSL Stylesheets v1.78.1 <http://docbook.sf.net/>
-.\" Date: 10/10/2013
+.\" Date: 10/19/2013
.\" Manual: Pulp repos and release carts
-.\" Source: Juicer 0.6.0
+.\" Source: Juicer 0.6.1
.\" Language: English
.\"
-.TH "JUICER\&.CONF" "5" "10/10/2013" "Juicer 0\&.6\&.0" "Pulp repos and release carts"
+.TH "JUICER\&.CONF" "5" "10/19/2013" "Juicer 0\&.6\&.1" "Pulp repos and release carts"
.\" -----------------------------------------------------------------
.\" * Define some portability stuff
.\" -----------------------------------------------------------------
@@ -276,3 +276,9 @@ Juicer is released under the terms of the GPLv3+ License\&.
\fBjuicer\fR(1), \fBjuicer\-admin\fR(1)
.sp
The Juicer Homepage: https://github\&.com/juicer/juicer/
+.SH "AUTHOR"
+.PP
+\fB:doctype:manpage\fR
+.RS 4
+Author.
+.RE
diff --git a/docs/markdown/install.md b/docs/markdown/install.md
index f1f20e3..48c5f23 100644
--- a/docs/markdown/install.md
+++ b/docs/markdown/install.md
@@ -13,6 +13,7 @@ You'll need these dependencies to run Juicer:
7. pymongo
8. python2-devel
9. python-argparse
+10. python-magic
When the dependencies are satisfied:
diff --git a/juicer.spec.in b/juicer.spec.in
index d8e1f0f..b8fc158 100644
--- a/juicer.spec.in
+++ b/juicer.spec.in
@@ -16,7 +16,7 @@ Url: https://github.com/juicer
BuildArch: noarch
BuildRequires: python2-devel
-Requires: juicer-common
+Requires: juicer-common = %VERSION%
%description
Pulp stuff, oh -- and release carts.
@@ -33,6 +33,7 @@ Requires: PyYAML
Requires: python-progressbar
Requires: python >= 2.5
Requires: pymongo
+Requires: python-magic
%description common
Provides common resources like documentation, shared libraries, and
@@ -43,7 +44,7 @@ utilities for juicer and juicer-admin.
%package admin
Group: Development/Libraries
Summary: Manage a pulp repository server
-Requires: juicer-common
+Requires: juicer-common = %VERSION%
%description admin
The juicer-admin utility lets you manage users, user roles, create,
@@ -94,6 +95,11 @@ rm -rf $RPM_BUILD_ROOT
######################################################################
%changelog
+* Sat Oct 19 2013 Andrew Butcher <abutcher@redhat.com> - 0.6.1-1
+- Release of 0.6.1, "Lemon Squeezings Hotfix"
+- Bug Fixes/Features: 167, 168, 171
+- Added python-magic dep
+
* Thu Oct 10 2013 Tim Bielawa <tbielawa@redhat.com> - 0.6.0-1
- Release of 0.6.0, "Lemon Squeezings"
- Bug Fixes/Features galore: 160, 157, 155, 102, 105, 104, 139, 154, 133, 152, 121, 136, 144
diff --git a/juicer/__init__.py b/juicer/__init__.py
index 1f62816..237fbf9 100644
--- a/juicer/__init__.py
+++ b/juicer/__init__.py
@@ -17,4 +17,4 @@
# Juicer package
-__version__ = '0.6.0-159cc80'
+__version__ = '0.6.1-0599564'
diff --git a/juicer/utils/Upload.py b/juicer/utils/Upload.py
index f81c334..8a481b9 100644
--- a/juicer/utils/Upload.py
+++ b/juicer/utils/Upload.py
@@ -95,7 +95,7 @@ class Upload(object):
_r = self.connector.post(query, data)
- if not _r.status_code == Constants.PULP_POST_OK:
+ if not _r.status_code == Constants.PULP_POST_OK or not _r.status_code == Constants.PULP_POST_ACCEPTED:
juicer.utils.Log.log_error("Import error importing '%s'... server said: \n %s", (self.pkg_name,
juicer.utils.load_json_str(_r.content)))
_r.raise_for_status()
diff --git a/juicer/utils/__init__.py b/juicer/utils/__init__.py
index 96b5fe4..620ccfc 100644
--- a/juicer/utils/__init__.py
+++ b/juicer/utils/__init__.py
@@ -421,13 +421,14 @@ def is_rpm(path):
is raised then this is not an RPM.
"""
- try:
- ts = rpm.TransactionSet()
- fd = os.open(path, os.O_RDONLY)
- ts.hdrFromFdno(fd)
- os.close(fd)
+ import magic
+ m = magic.open(magic.MAGIC_MIME)
+ m.load()
+ mime = m.file(path)
+ # rpms or directories are cool
+ if 'rpm' in mime or 'directory' in mime:
return True
- except:
+ else:
juicer.utils.Log.log_info("error: File `%s` is not an rpm" % path)
return False
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment