Check-in [9ed641685b]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | - abort if someone tries to build a .deb package with a capital letter in the name. Fixes: https://github.com/jordansissel/fpm/issues/43 |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
9ed641685bd2c90fd80e37b34417c21e |
| User & Date: | jls@semicomplete.com 2011-06-09 01:52:55 |
Context
|
2011-06-09
| ||
| 01:54 | - version bump check-in: 4c3e228550 user: jls@semicomplete.com tags: trunk | |
| 01:52 | - abort if someone tries to build a .deb package with a capital letter in the name. Fixes: https://github.com/jordansissel/fpm/issues/43 check-in: 9ed641685b user: jls@semicomplete.com tags: trunk | |
|
2011-06-08
| ||
| 07:43 | Merge branch 'master' of github.com:jordansissel/fpm check-in: 17fdbf1d4a user: jls@semicomplete.com tags: trunk | |
Changes
Added lib/fpm/errors.rb.
> > > | 1 2 3 | require "fpm/namespace" class FPM::InvalidPackageConfiguration < StandardError; end |
Changes to lib/fpm/target/deb.rb.
1 2 3 4 5 6 7 8 9 10 |
require "erb"
require "fpm/namespace"
require "fpm/package"
class FPM::Target::Deb < FPM::Package
def architecture
if @architecture.nil? or @architecture == "native"
# Default architecture should be 'native' which we'll need
# to ask the system about.
arch = %x{dpkg --print-architecture}.chomp
| > | 1 2 3 4 5 6 7 8 9 10 11 |
require "erb"
require "fpm/namespace"
require "fpm/package"
require "fpm/errors"
class FPM::Target::Deb < FPM::Package
def architecture
if @architecture.nil? or @architecture == "native"
# Default architecture should be 'native' which we'll need
# to ask the system about.
arch = %x{dpkg --print-architecture}.chomp
|
| ︙ | ︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
return @architecture
end # def architecture
def specfile(builddir)
"#{builddir}/control"
end
def build!(params)
control_files = [ "control", "md5sums" ]
# place the postinst prerm files
self.scripts.each do |name, path|
case name
when "pre-install"
| > > > > > > > > > > > > | 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 |
return @architecture
end # def architecture
def specfile(builddir)
"#{builddir}/control"
end
def name
if @name =~ /[A-Z]/
@logger.fatal("Debian tools (dpkg/apt) don't do well with packages " \
"that use capital letters in the name. In some cases it will " \
"automatically downcase them, in others it will not. It is confusing." \
"Best to not use any capital letters at all.")
raise FPM::InvalidPackageConfiguration.new(
"package name '#{@name}' contains capital letters, bad.")
end
return @name
end
def build!(params)
control_files = [ "control", "md5sums" ]
# place the postinst prerm files
self.scripts.each do |name, path|
case name
when "pre-install"
|
| ︙ | ︙ |