Skip to content

Commit

Permalink
Changes setup option --freedom to manditory.
Browse files Browse the repository at this point in the history
Reason:

Nopony should be by mistake install non-free ponies thinking that
that are free because the license of ponysay itself is free.
But nopony should either just make in installation and miss out
one all the ponies just because the he had not read the information
on how to install the package.
  • Loading branch information
maandree committed Nov 3, 2012
1 parent 5ca031a commit 71a3ffe
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 12 deletions.
2 changes: 1 addition & 1 deletion CHANGELOG
Expand Up @@ -31,7 +31,7 @@ Version 3.0

Setup option --sysconf-dir with default value /etc added.

Setup option --freedom with default value sloppy added.
New manditory setup option --freedom.


Version 2.9.1
Expand Down
29 changes: 20 additions & 9 deletions manuals/ponysay.texinfo
Expand Up @@ -623,7 +623,7 @@ you may want to do, everything in the source code can be used directly as long a
is defined before @file{~/.ponysayrc} is interpreted.

@file{~/.ponysayrc} is a fallback for @file{~/.config/ponysay/ponysayrc}, which in
turn is a fallback for @file{${XDG_CONFIG_HOME}/ponysay/ponysayrc}. If neither of
turn is a fallback for @file{$@{XDG_CONFIG_HOME@}/ponysay/ponysayrc}. If neither of
those exist, @file{/etc/ponysayrc} is used if that exists.


Expand Down Expand Up @@ -1539,9 +1539,13 @@ If you have @command{git} you can @command{clone} the project URL
@url{https://github.com/erkin/ponysay.git}.

In the terminal, @command{cd} into the ponysay directory and execute
@command{./setup.py install} or @command{python3 setup.py install}. This will install
@command{./setup.py --freedom=parital install} or
@command{python3 setup.py --freedom=parital install}. This will install
@command{ponysay} into @file{/usr}, normally meaning you need to run as root, e.g. by
running @command{sudo ./setup.py install}.
running @command{sudo ./setup.py --freedom=parital install}.

The @command{--freedom} option and manditory, if you only want completely free
ponies, use @command{--freedom=strict} instread of @command{--freedom=partial}.

Now you will be to use ponysay, run: @command{ponysay "I am just the cutest pony!"},
or if have a specific pony in your mind: @command{ponysay -f pinkie "Partay!~"}.
Expand Down Expand Up @@ -1949,14 +1953,17 @@ Recognised arguments are @code{copy}, @code{hard} and @code{symbolic}.
or @code{hard} is used. This is because it does link reading and not content or
inode comparison.

@item --freedom=sloppy
@item --freedom=MANDITORY!
@opindex @option{--freedom}
@cindex full freedom
@cindex freedom, full
Set your freedom. If you the any of the values @code{strict}, @code{full} or @code{yes},
the setup will make sure that only completly free parts of the package is installed.
This should be used (@code{--freedom=strict}) on distributions for GNU endorsed (endorsable)
GNU/Linux-libre distributions.

If you do not want this, will need to explicity say so (you do also need to say if you
do want it) by using either of the values @code{sloppy}, @code{partial} or @code{no}.
@end table

Recognised compressions are @option{gz} which uses @option{gzip -9}, and @option{xz}
Expand Down Expand Up @@ -2522,7 +2529,11 @@ build()
cd ponysay ; git checkout "$pkgver"
./setup.py --everything --without-pdf-compression \
--bin-dir=/usr/bin --dest-dir="$pkgdir" build
--bin-dir=/usr/bin --dest-dir="$pkgdir" \
--freedom=parital build
# CHANGE --freedom=parital to --freedom=strict
# FOR ONLY COMPLETELY FREE PONIES
@}
package()
Expand Down Expand Up @@ -2587,7 +2598,7 @@ Pony files located in @file{/usr/share/ponysay}.
@itemx usrponies
@cindex homeponies
@cindex usrponies
Pony files located in @file{${XDG_DATA_HOME}/ponysay} or @file{~/.local/share/ponysay} (fallback).
Pony files located in @file{$@{XDG_DATA_HOME@}/ponysay} or @file{~/.local/share/ponysay} (fallback).

@item browser ponies
@cindex browser ponies
Expand Down Expand Up @@ -2721,7 +2732,7 @@ Environment variable @env{PONYSAY_WRAP_LIMIT} has been added.
@item
Environment variable @env{PONYSAY_WRAP_EXCEED} has been added.
@item
Added support for @file{~/.ponysayrc} with the alternatives: @file{${XDG_CONFIG_HOME}/ponysay/ponysayrc}
Added support for @file{~/.ponysayrc} with the alternatives: @file{$@{XDG_CONFIG_HOME@}/ponysay/ponysayrc}
and @file{~/.config/ponysay/ponysayrc} as well as the global fallback @file{/etc/ponysayrc}
@item
@option{-f}, @option{+f} and @option{-q} may be unargumented if that are at the end of the command line.
Expand All @@ -2733,7 +2744,7 @@ and @file{~/.config/ponysay/ponysayrc} as well as the global fallback @file{/etc
Pony metadata tags @var{BALLOON TOP} and @var{BALLOON BOTTOM} can be used to specify how much extra
height the balloon causes at the top and at the bottom of the pony.
@item
@file{${XDG_DATA_HOME}/ponysay/*} is allowed in favour of @file{${HOME}/.local/share/ponysay/*}
@file{$@{XDG_DATA_HOME@}/ponysay/*} is allowed in favour of @file{$@{HOME@}/.local/share/ponysay/*}
@item
Balloons can be have and explicit minimum column span with placement justification.
@item
Expand All @@ -2742,7 +2753,7 @@ dimension files generated), however if no pony fits, any of the can be randomly
@item
Setup option @option{--sysconf-dir} with default value @file{/etc} added,
@item
Setup option @option{--freedom} with default value @code{sloppy} added,
New manditory setup option @option{--freedom}.
@end itemize


Expand Down
15 changes: 13 additions & 2 deletions setup.py
Expand Up @@ -234,7 +234,7 @@ def __init__(self):
alternatives = ['--linking'], arg='TYPE')


opts.add_argumented (help = 'Do only install fully free parts of the pacakge\nDefault = sloppy, use strict, full or yes if you want to do this',
opts.add_argumented (help = 'Install all ponies or only the completely free ponies\nThis option is manditory, use strict, full or yes for only free ponies,\nand partial, sloppy or no for all ponies',
alternatives = ['--freedom'], arg='FREEDOM')


Expand All @@ -247,10 +247,21 @@ def __init__(self):
self.linking = opts.opts['--linking'][0]


self.free = False
self.free = None
if opts.opts['--freedom'] is not None:
if opts.opts['--freedom'][0].lower() in ('strict', 'full', 'yes'):
self.free = True
elif opts.opts['--freedom'][0].lower() in ('partial', 'sloppy', 'no'):
self.free = False
if self.free is None:
print('')
print('You need to select your freedom, add --freedom=strict or --freedom=partial.')
print('')
print('--freedom=strict will install only ponies that are completely free.')
print('--freedom=partial will install all ponies, even if they are not free.')
print('')
print('')
exit(255)


if (opts.opts['---DESTDIR'] is not None) and (opts.opts['--dest-dir'] is None):
Expand Down

2 comments on commit 71a3ffe

@JotaRandom
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this mean that ./setup.py look like --freedom=false/true install right?? and fail to build if you not add --freedom in the ./setup.py right??

@maandree
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes (I will add the value variants 'true' and 'false')

Please sign in to comment.