arr-pm 0.0.8 → 0.0.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of arr-pm might be problematic. Click here for more details.
- checksums.yaml +13 -5
- data/arr-pm.gemspec +1 -1
- data/lib/arr-pm/file.rb +11 -3
- data/lib/arr-pm/file/header.rb +0 -1
- metadata +8 -7
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
ZTNjMjFhNWE2MmQ0MDhhOWZlNjBhZDYwNzI3MzI5NTM4MTMyZTJlYQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
NDllNDRiN2NhODY3ZmRhNDYxNTk5MmU4OTA4Y2FmZTA3NDhkYWZkOQ==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZTAwZWViMjNkZWI4MmJmMjFhNjI2MGNiYmIyZmFjNjhkNGI4ZmQwMjU1NDY5
|
10
|
+
YWY4YjY5MmE2MGNmMTNkYWI0MDRiMTdmZTg0ODE4YmM5MzU3YWY0M2JjYmNl
|
11
|
+
NGM0ZGUzYWIwZmIzODE4ODI4MzVjMzY1NDhhYTJiNjI2NjcyN2U=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MWNkZWU2ODFlMmMxNzEzOTYzYzllMTIwN2Y3YjBmYTc0ZjE2M2I1YjljYWFk
|
14
|
+
NjFhM2VkZmVhYjNmYzIxNzE1YTZjNzFkZjExMmMzMDRjYjA2MzA2MDc3MjI3
|
15
|
+
N2VmYWU0YjBhZTlhM2FkZGUxMGYzMmFhMWIwZmM0MWNiMmI1NjE=
|
data/arr-pm.gemspec
CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |spec|
|
|
2
2
|
files = %x{git ls-files}.split("\n")
|
3
3
|
|
4
4
|
spec.name = "arr-pm"
|
5
|
-
spec.version = "0.0.
|
5
|
+
spec.version = "0.0.9"
|
6
6
|
spec.summary = "RPM reader and writer library"
|
7
7
|
spec.description = "This library allows to you to read and write rpm " \
|
8
8
|
"packages. Written in pure ruby because librpm is not available " \
|
data/lib/arr-pm/file.rb
CHANGED
@@ -2,6 +2,7 @@ require File.join(File.dirname(__FILE__), "namespace")
|
|
2
2
|
require File.join(File.dirname(__FILE__), "file", "header")
|
3
3
|
require File.join(File.dirname(__FILE__), "file", "lead")
|
4
4
|
require File.join(File.dirname(__FILE__), "file", "tag")
|
5
|
+
require "fcntl"
|
5
6
|
|
6
7
|
# Much of the code here is derived from knowledge gained by reading the rpm
|
7
8
|
# source code, but mostly it started making more sense after reading this site:
|
@@ -210,16 +211,23 @@ class RPM::File
|
|
210
211
|
begin
|
211
212
|
output << lister.read_nonblock(16384)
|
212
213
|
rescue Errno::EAGAIN
|
213
|
-
#
|
214
|
+
# Nothing to read, move on!
|
214
215
|
end
|
215
216
|
end
|
216
217
|
lister.close_write
|
218
|
+
|
217
219
|
# Read remaining output
|
218
220
|
begin
|
219
|
-
|
221
|
+
output << lister.read
|
220
222
|
rescue Errno::EAGAIN
|
221
|
-
|
223
|
+
# Because read_nonblock enables NONBLOCK the 'lister' fd,
|
224
|
+
# and we may have invoked a read *before* cpio has started
|
225
|
+
# writing, let's keep retrying this read until we get an EOF
|
226
|
+
retry
|
227
|
+
rescue EOFError
|
228
|
+
# At EOF, hurray! We're done reading.
|
222
229
|
end
|
230
|
+
|
223
231
|
# Split output by newline and strip leading "."
|
224
232
|
@files = output.split("\n").collect { |s| s.gsub(/^\./, "") }
|
225
233
|
return @files
|
data/lib/arr-pm/file/header.rb
CHANGED
@@ -12,7 +12,6 @@ class RPM::File::Header
|
|
12
12
|
attr_accessor :data_length # rpmlib calls this field 'dl' unhelpfully
|
13
13
|
|
14
14
|
HEADER_SIGNED_TYPE = 5
|
15
|
-
#HEADER_MAGIC = "\x8e\xad\xe8\x01\x00\x00\x00\x00".force_encoding("BINARY")
|
16
15
|
|
17
16
|
if RUBY_VERSION =~ /^2\./
|
18
17
|
# Ruby 2 forces all strings to be UTF-8, so "\x01" becomes "\u0001"
|
metadata
CHANGED
@@ -1,27 +1,27 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: arr-pm
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jordan Sissel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-02-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cabin
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - '>'
|
17
|
+
- - ! '>'
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - '>'
|
24
|
+
- - ! '>'
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
description: This library allows to you to read and write rpm packages. Written in
|
@@ -61,18 +61,19 @@ require_paths:
|
|
61
61
|
- lib
|
62
62
|
required_ruby_version: !ruby/object:Gem::Requirement
|
63
63
|
requirements:
|
64
|
-
- - '>='
|
64
|
+
- - ! '>='
|
65
65
|
- !ruby/object:Gem::Version
|
66
66
|
version: '0'
|
67
67
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
|
-
- - '>='
|
69
|
+
- - ! '>='
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '0'
|
72
72
|
requirements: []
|
73
73
|
rubyforge_project:
|
74
|
-
rubygems_version: 2.
|
74
|
+
rubygems_version: 2.1.11
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
77
|
summary: RPM reader and writer library
|
78
78
|
test_files: []
|
79
|
+
has_rdoc:
|