Giter VIP home page Giter VIP logo

Comments (11)

ohlol avatar ohlol commented on August 24, 2024

I just confirmed that it installs fine if I build with `--description'

from fpm.

jordansissel avatar jordansissel commented on August 24, 2024

confirmed. I'll fix it shortly.

from fpm.

ohlol avatar ohlol commented on August 24, 2024

Awesome. I just noticed that the .deb I built from the rails gem has a wrapping description but the second line is indented; that must be coming from the gem itself?

from fpm.

jordansissel avatar jordansissel commented on August 24, 2024

likely, it should be easy to mutate the description string in a way that deb packages can handle. Basically, 'blank' lines need to be literally " ." (space period)

from fpm.

jpluscplusm avatar jpluscplusm commented on August 24, 2024

I think this fixes both issues for .debs. Line-wrapping description works if you double-indent, and s/^$/./g for blank lines. Sorry for lack of commit/etc - it's late and I don't have time to learn git :)

root@bigben:/var/lib/gems/1.8/gems/fpm-0.2.35/templates# diff -u deb.erb deb.erb-new 
--- deb.erb     2011-06-21 00:41:42.000000000 +0100
+++ deb.erb-new 2011-06-21 00:40:22.000000000 +0100
@@ -17,5 +17,11 @@
 Section: <%= category or "unknown" %> 
 Priority: extra
 Homepage: <%= url or "http://nourlgiven.example.com/" %>
-Description: <%= description or "no description given" %>
+Description: <%= name %> (FPM-generated package)
+<% max_len = 74 %>
+<% if description %>
+<%= description.gsub(/^$/, ".").gsub(/(.{1,#{max_len}})( +|$)\n?|(.{#{max_len}})/,"  \\1\\3\n") %>
+<% else %>
+<%= "no description given" %>
+<% end %>

from fpm.

jordansissel avatar jordansissel commented on August 24, 2024

On Mon, Jun 20, 2011 at 4:48 PM, jpluscplusm <
[email protected]>wrote:

I think this fixes both issues for .debs. Line-wrapping description works
if you double-indent, and s/^$/./g for blank lines. Sorry for lack of
commit/etc - it's late and I don't have time to learn git :)

No worries, I take patches in all forms. :)

root@bigben:/var/lib/gems/1.8/gems/fpm-0.2.35/templates# diff -u
deb.erb deb.erb-new
--- deb.erb 2011-06-21 00:41:42.000000000 +0100
+++ deb.erb-new 2011-06-21 00:40:22.000000000 +0100
@@ -17,5 +17,11 @@
Section: <%= category or "unknown" %>
Priority: extra
Homepage: <%= url or "http://nourlgiven.example.com/" %>
-Description: <%= description or "none given" %>
+Description: <%= name %> (FPM-generated package)
+<% max_len = 74 %>
+<% if description %>
+<%= description.gsub(/^$/, ".").gsub(/(.{1,#{max_len}})(
+|$)\n?|(.{#{max_len}})/," \1\3\n") %>
+<% else %>
+<%= "no description given" %>
+<% end %>

I'll test this and commit it if it works! Thanks! :)

-Jordan

Reply to this email directly or view it on GitHub:
#52 (comment)

from fpm.

jpluscplusm avatar jpluscplusm commented on August 24, 2024

Nasty regex nicked from http://blog.macromates.com/2006/wrapping-text-with-regular-expressions/; no guarantees there aren't /far/ nicer ways to implement in ERB!

Double indenting and s/^$/./g both need to happen, regardless of the method, as they're the line-continuation mechanisms for .deb control file Description: sections.

from fpm.

jordansissel avatar jordansissel commented on August 24, 2024

On Mon, Jun 20, 2011 at 5:00 PM, jpluscplusm <
[email protected]>wrote:

Nasty regex nicked from
http://blog.macromates.com/2006/wrapping-text-with-regular-expressions/;
no guarantees there aren't /far/ nicer ways to implement in ERB!

Double indenting and s/^$/./g both need to happen, regardless of the
method, as they're the line-continuation mechanisms for .deb control file
Description: sections.

Nod. Good work :)

Patch committed! New release coming soon once I finish refactoring some
stuff for the recent puppet changes.

-Jordan

Reply to this email directly or view it on GitHub:
#52 (comment)

from fpm.

jordansissel avatar jordansissel commented on August 24, 2024

fpm 0.3.1 released and includes this patch.

from fpm.

jordansissel avatar jordansissel commented on August 24, 2024

If this problem is not fixed, feel free to reopen this or file a new bug. Thanks!

from fpm.

ajc avatar ajc commented on August 24, 2024

on the <%= description.gsub line, I needed to change it to finish with -%> or I got a stray newline inserted in my Package descriptions, which screwed up my apt repository.

from fpm.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.