Check-in [0b26058d1e]
Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | Coarse filter to strip leading directory structures (reimporting systme packages to local paths, etc.) |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
0b26058d1ef78c050b55887140647248 |
| User & Date: | mario 2014-12-24 14:43:41 |
Context
|
2014-12-25
| ||
| 17:55 | Remove vendor/vnd/pkg/ target dir prefixes, retain just Vnd/Pkg/.. tree, package names "php-composer-" are now just "php-", and sysphars become "phar-vnd-pkg". check-in: 68191c9343 user: mario tags: trunk | |
|
2014-12-24
| ||
| 14:43 | Coarse filter to strip leading directory structures (reimporting systme packages to local paths, etc.) check-in: 0b26058d1e user: mario tags: trunk | |
| 04:46 | Add attributes and support comma-separated version/dependency lists. check-in: c688acd9f5 user: mario tags: trunk | |
Changes
Added lib/fpm/package/filter_unprefix.rb.
> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# Strips anything but the given prefix dir from staging_path.
# -u unprefix=/usr/share/pkg/
# Will move the contents of that folder into the top level path.
#
# (It's kind of like the --chdir option for input,
# except that it works after input package extraction.)
require "fpm/package"
require "fpm/util"
require "fileutils"
# find manpages, compress them
class FPM::Package::Filter_unprefix < FPM::Package
def update(opts=nil)
if opts and opts.count == 1
staging_from = "#{staging_path}/#{opts.first}"
if File.exist?(staging_from)
staging_keep = ::Dir.mktmpdir("package-#{type}-staging")
if File.directory?(staging_keep)
FileUtils.mv(::Dir.glob("#{staging_from}/*"), staging_keep)
logger.debug("Exchanging staging path", :path => staging_path, :new => staging_keep)
FileUtils.rm_r(staging_path)
FileUtils.mv(staging_keep, staging_path)
end
else
logger.error("Prefix directory doesn't exist in staging path", :path => opts.first)
end
end # opts
end # update
end # class
|